Skip to content
NeuralRepo
Get Support

nrepo diff

Terminal window
nrepo diff <id> [id2] [options]

Compares two ideas across five fields — title, body, status, source, and tags — and prints only the ones that differ.

FlagTypeDefaultDescription
--jsonbooleanfalseOutput both ideas plus a field-by-field diff as JSON.
--humanbooleanForce human-readable output. Wins over --json.
Terminal window
nrepo diff 391 402
diff #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, themes

Identical ideas print No differences found. An empty field renders as (empty).

With one ID, the CLI picks the comparison target itself, in this order:

  1. The idea’s parent_id — set when it was created by nrepo branch.
  2. A parent relation.
  3. A duplicate relation.
  4. The highest-scoring relation of any type.
Terminal window
nrepo diff 402
# Compares #43 against the idea it was branched from

An 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"}.

Terminal window
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.