Skip to content

diffr: onboarding text, the agents' plugin guide, and the summaries toggle - #1063

Closed
sidkmenon wants to merge 4 commits into
sm/diffr-plugin-checkfrom
sm/diffr-docs
Closed

sidkmenon wants to merge 4 commits into
sm/diffr-plugin-checkfrom
sm/diffr-docs

Conversation

@sidkmenon

Copy link
Copy Markdown
Contributor

diffr: guide agents through plugins, and document setup

  • docs/agents.md, at the end of diffr --help, is a plugins guide for
    agents: set a field on a bundled plugin first, otherwise write, build,
    configure and test a plugin.
  • The man page gains the commands, files and environment, and the same
    agent section last.
  • The README leads with the install script; plugin.md is reworded.
  • The Claude Code plugin's open tool points the model at diffr --help,
    and a diffr that prints no version says what one looks like.

diffr: ask whether to write summaries, then which provider

diffr config init asks yes or no for pseudocode summaries, then, on
yes, the provider, then that provider's key unless one is saved or in
the environment. The key can't be left blank.

With --json, the answers' summaries is "off" or {"provider": ...},
so no other combination can be written; left out, summaries stay as
they are. Each question's text is written once and shared by both
modes. KEY_INSTRUCTIONS tells the person how to provide a key.

Tests: the new answer shapes, and leaving summaries out keeps the
saved provider.

diffr: offer to put diffr on PATH, and point install failures at issues

On a first install in a terminal, install.sh offers to add its
directory to PATH in the shell's startup file (zsh, bash or fish).
Declined, or without a terminal, it prints the directory to add.

Every install.sh failure ends by asking the person to file an issue.
install.sh, diffr upgrade and diffr uninstall are reworded.

Tests: a diffr bundled in an app refuses to upgrade or uninstall and
touches nothing, whatever its message says.

https://claude.ai/code/session_01LYrgBPQFAiQVjNV6D7UkQv

- docs/agents.md, at the end of `diffr --help`, is a plugins guide for
  agents: set a field on a bundled plugin first, otherwise write, build,
  configure and test a plugin.
- The man page gains the commands, files and environment, and the same
  agent section last.
- The README leads with the install script; plugin.md is reworded.
- The Claude Code plugin's open tool points the model at `diffr --help`,
  and a diffr that prints no version says what one looks like.

Claude-Session: https://claude.ai/code/session_01LYrgBPQFAiQVjNV6D7UkQv
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: b5985b3c-e5d2-4bb4-b6ac-7fec168d8328
Agent-Session: 01a11ecf-aa86-7a81-a5e6-c5dfe72d48eb
`diffr config init` asks yes or no for pseudocode summaries, then, on
yes, the provider, then that provider's key unless one is saved or in
the environment. The key can't be left blank.

With `--json`, the answers' `summaries` is "off" or {"provider": ...},
so no other combination can be written; left out, summaries stay as
they are. Each question's text is written once and shared by both
modes. KEY_INSTRUCTIONS tells the person how to provide a key.

Tests: the new answer shapes, and leaving `summaries` out keeps the
saved provider.

Claude-Session: https://claude.ai/code/session_01LYrgBPQFAiQVjNV6D7UkQv
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: b5985b3c-e5d2-4bb4-b6ac-7fec168d8328
Agent-Session: 01a11ecf-aa86-7a81-a5e6-c5dfe72d48eb
On a first install in a terminal, install.sh offers to add its
directory to PATH in the shell's startup file (zsh, bash or fish).
Declined, or without a terminal, it prints the directory to add.

Every install.sh failure ends by asking the person to file an issue.
install.sh, `diffr upgrade` and `diffr uninstall` are reworded.

Tests: a diffr bundled in an app refuses to upgrade or uninstall and
touches nothing, whatever its message says.

Claude-Session: https://claude.ai/code/session_01LYrgBPQFAiQVjNV6D7UkQv
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: b5985b3c-e5d2-4bb4-b6ac-7fec168d8328
Agent-Session: 01a11ecf-aa86-7a81-a5e6-c5dfe72d48eb
`config init` named one step, "Saving", for everything it did, so adding
the plugin marketplace (a clone) looked like a hang. Each step now gets
its own spinner, ticked off when the next starts: the marketplace, the
plugin, then the settings. A failed step shows its error in place,
once, instead of again after the prompts. `diffr upgrade` and
`diffr uninstall` print the same steps.

Claude-Session: https://claude.ai/code/session_01LYrgBPQFAiQVjNV6D7UkQv
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: b5985b3c-e5d2-4bb4-b6ac-7fec168d8328
Agent-Session: 01a11ecf-aa86-7a81-a5e6-c5dfe72d48eb
Agent-Session: 01a11f51-383b-7f63-a323-39195d82ab2e
@sidkmenon

Copy link
Copy Markdown
Contributor Author

Folded into #1066, which carries these commits rebased onto main beneath #1019.

@sidkmenon sidkmenon closed this Oct 9, 2026
sidkmenon added a commit that referenced this pull request Oct 9, 2026
One command installs diffr and its Claude Code plugin:

```sh
curl -fsSL https://install.dev.fast/diffr | sh
```

Commit by commit:
- **`DIFFR_CONFIG_DIR`**: a host such as Whiteboard can keep its own
diffr config file. Without the variable, diffr reads the same file as
before.
- **`--help` guides**: `diffr --help` ends with a guide for agents
(`docs/agents.md`), and `diffr config --help` with the plugins guide
(`docs/plugin.md`). `-h` stays short. An agent runs `diffr --help` in
its shell, so what it reads always matches the installed diffr.
- **`diffr config init`**: in a terminal, asks which agents get the
diffr plugin and which provider writes summaries, and asks for a key
only when neither the config nor the environment has one. Without a
terminal, `config init --json` prints the questions and a schema, and
`config init --json ANSWERS` applies them; the key never goes through
`--json`. Claude Code is the only agent: `claude plugin install
diffr@devfast` after adding or updating the devfast marketplace, the
same marketplace Whiteboard's plugin uses. Installed agents are recorded
in `$XDG_STATE_HOME/diffr/install.json`, outside the synced config
directory.
- **`install.sh`**: finds the newest `diffr/X.Y.Z` release (or
`DIFFR_VERSION`), checks the archive against the release's SHA256SUMS,
installs diffr and diffr-tui in `DIFFR_INSTALL_DIR` (`~/.local/bin` by
default), then runs `diffr config init` on a first install.
- **Install module**: what `config init` installs moves to `install.rs`,
so `upgrade` and `uninstall` use it without the prompts. No behavior
change.
- **`diffr upgrade` and `diffr uninstall`**: work the way diffr was
installed, read from where the binary is (Homebrew, Cargo, inside
`node_modules`: refuse, otherwise install.sh). After an upgrade, each
recorded agent updates its plugin. `uninstall` keeps `~/.config/diffr`,
which Whiteboard shares.
- **Docs**: the plugins guide for agents, the man page's commands, files
and environment, and a README that leads with the install script.
- **Summaries**: `config init` asks yes or no for pseudocode summaries,
then the provider, then its key.
- **PATH and failures**: install.sh offers to put diffr on PATH and
points install failures at the issue tracker.
- **Steps**: setup shows each step as it runs.

## Before the install route goes live
- Release `diffr/0.1.18` after this and #1019 merge. install.sh installs
the newest `diffr/*` release; 0.1.17 has no `config init` or `upgrade`,
and the plugin needs 0.1.18.
- Then merge Fix-Fast/dev#1119, which points `install.dev.fast/diffr` at
`diffr/install.sh` on main.

## Testing
- `cargo fmt --check` and `cargo test`, including the CLI tests for
`DIFFR_CONFIG_DIR`, the `--help` guides, `config init --json`, `upgrade`
and `uninstall`.

Replaces #1039, #1040, #1054, #1056, #1057 and #1063.

Stack: #1065 → #1066 → #1019 → #1023 → #1024 → #1025 → #1026

https://claude.ai/code/session_01HNbERuYJjvvAjBN19zEDbo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant