From 37a5ae546c5a8256c994e95327bd3fdd31e25cf1 Mon Sep 17 00:00:00 2001 From: Sidharth Menon Date: Fri, 9 Oct 2026 18:48:09 -0700 Subject: [PATCH] improvement: improve diffr onboarding guidance Agent-Session: 01a12325-f61d-73b2-846e-9886a80037d5 Agent-Session: 01a12327-e4f9-7652-bc41-f37bec9965f4 Agent-Session: 8881e3f3-a916-4405-9706-bb6e3a2f193d Agent-Session: 4a101efe-1011-4d6d-8449-748e19db920f --- diffr/src/init.rs | 13 ++++++++++++- diffr/src/install.rs | 9 +++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/diffr/src/init.rs b/diffr/src/init.rs index ec54a961b..7e91bb0c9 100644 --- a/diffr/src/init.rs +++ b/diffr/src/init.rs @@ -443,6 +443,17 @@ fn prompt(state: &State) -> Result { } (Err(error), None) => return Err(error), } - cliclack::outro("diffr is ready to use! Hope you enjoy some beautiful diffs")?; + let usage: String = answers + .agents + .iter() + .map(|agent| format!("{}\n", agent.usage())) + .collect(); + cliclack::outro(format!( + "diffr is ready to use! +Run `diffr ` with the same arguments you'd pass to `git diff`, e.g. `diffr main..HEAD`. +To change diffr settings at any time, run `diffr config`. +{usage} +Hope you enjoy some beautiful diffs." + ))?; Ok(0) } diff --git a/diffr/src/install.rs b/diffr/src/install.rs index 00be56000..10b35cf57 100644 --- a/diffr/src/install.rs +++ b/diffr/src/install.rs @@ -58,6 +58,15 @@ impl Agent { } } + /// How to reach diffr from inside the agent, shown once its plugin is installed. + pub(crate) fn usage(self) -> &'static str { + match self { + Agent::ClaudeCode => { + "In Claude Code, run `/diffr `, or ask Claude to show you a change with diffr." + } + } + } + /// `step` hears what each slow command is about to do. pub(crate) fn install(self, step: &mut dyn FnMut(&str)) -> Result<()> { match self {