nrepo diff
nrepo diff <id> [id2] [options]Compares two ideas across five fields — title, body, status, source, and tags — and prints only the ones that differ.
Options
Section titled “Options”| Flag | Type | Default | Description |
|---|---|---|---|
--json | boolean | false | Output both ideas plus a field-by-field diff as JSON. |
--human | boolean | — | Force human-readable output. Wins over --json. |
Output
Section titled “Output”nrepo diff 391 402diff #42 → #43────────────────────────────────────────────────────────────
Title - Add dark mode to dashboard + Add dark mode and a theme picker
Body Switch the dashboard to support both schemes. - Use CSS custom properties. + Use CSS custom properties and a picker in Settings.
Tags - ui, frontend + ui, frontend, themesIdentical ideas print No differences found. An empty field renders as (empty).
Comparing against a related idea
Section titled “Comparing against a related idea”With one ID, the CLI picks the comparison target itself, in this order:
- The idea’s
parent_id— set when it was created bynrepo branch. - A
parentrelation. - A
duplicaterelation. - The highest-scoring relation of any type.
nrepo diff 402# Compares #43 against the idea it was branched fromAn idea with none of those has nothing to compare against:
No parent or related idea to diff against.Usage: nrepo diff 402 <other-id>That case exits 0 in human mode. With --json it exits 1 and prints
{"error":"...","code":"no_diff_target"}.
JSON output
Section titled “JSON output”nrepo diff 391 402 --json{ "a": { "id": 391, "number": 42, "title": "Add dark mode to dashboard" }, "b": { "id": 402, "number": 43, "title": "Add dark mode and a theme picker" }, "diff": [ { "field": "Title", "a": "Add dark mode to dashboard", "b": "Add dark mode and a theme picker", "changed": true }, { "field": "Body", "a": "...", "b": "...", "changed": true }, { "field": "Status", "a": "exploring", "b": "exploring", "changed": false }, { "field": "Source", "a": "cli", "b": "cli", "changed": false }, { "field": "Tags", "a": "ui, frontend", "b": "ui, frontend, themes", "changed": true } ]}a and b are the full idea objects; diff carries every field, including unchanged ones.
Next Steps
Section titled “Next Steps” nrepo branch Create the variant that nrepo diff compares against its parent.
nrepo merge Fold one of the two ideas into the other once you have decided.
nrepo duplicate Review pairs the system flagged as near-identical.
nrepo show Read either idea in full instead of a field summary.