nrepo graph
nrepo graph <id> [options]Walks outward from one idea through its relations and prints what it finds as a tree. Relations are followed in both directions, so an idea that only ever appears as a target still shows up.
Options
Section titled “Options”| Flag | Type | Default | Description |
|---|---|---|---|
--depth <n> | number | 1 | Hops to traverse. Clamped to a maximum of 5. |
--type <types> | string | (all) | Comma-separated relation types to follow: related, blocks, inspires, supersedes, parent, duplicate. |
--json | boolean | false | Output nodes and edges as JSON. |
--human | boolean | — | Force human-readable output. Wins over --json. |
Output
Section titled “Output”nrepo graph 391 --depth 2#42 Rewrite auth flow [exploring]├── blocks → #43 Add dark mode and a theme picker [exploring]│ └── related → #61 Design tokens audit [captured]└── related → #18 Session cookie cleanup [captured]Each branch is labelled with the relation type that produced it. An idea with no relations prints just itself:
#42 Rewrite auth flow [exploring] No connections foundFiltering by type
Section titled “Filtering by type”# Just the dependency chainnrepo graph 391 --depth 3 --type blocks --json
# Structural relations onlynrepo graph 391 --type parent,supersedes--type matches exact type names. An unknown name is not an error — it simply matches nothing,
and you get the root alone.
JSON output
Section titled “JSON output”nrepo graph 391 --depth 2 --json{ "root": 391, "depth": 2, "types": null, "nodes": [ { "id": 391, "number": 42, "title": "Rewrite auth flow", "status": "exploring", "depth": 0 }, { "id": 402, "number": 43, "title": "Add dark mode and a theme picker", "status": "exploring", "depth": 1 } ], "edges": [ { "source": 391, "target": 402, "type": "blocks" } ]}depth echoes the clamped value you asked for, not how far the walk actually reached. types is
null when --type was not passed. Edges keep their original direction regardless of which way
the traversal crossed them, so the output can be fed straight into a graph layout tool.
Each idea appears once: the first time the walk reaches it. In a diamond-shaped graph only the
first edge into a node is drawn in the tree, though every edge is present in edges.