wiki file refs
List a page's place in the link graph: the pages that link to it (inbound) and the pages it links to (outbound). Check refs before moving or deleting a page to see which pages an edit would touch.
Usage
wiki file refs wiki/Alpha.md
wiki file refs wiki/Alpha.md --json
PATH is relative to the config root, as in wiki edit and wiki file show.
Options
| Flag | Default | Description |
|---|---|---|
-f, --format |
text |
text or json. |
--json |
— | Shorthand for --format json. |
JSON output
{
"version": 1,
"path": "wiki/Beta.md",
"route": "Beta",
"inbound": [{ "route": "Alpha", "path": "wiki/Alpha.md" }],
"outbound": [{ "route": "Alpha", "path": "wiki/Alpha.md" }]
}
Inbound pages come in document order and outbound pages in first-link order, each listed once. Both use the link index behind wiki lint's broken-link audit: wikilinks and Markdown page links in the body, skipping links inside code. Links that resolve to no page are left out; wiki lint reports those.
Exit codes
| Code | Meaning |
|---|---|
0 |
Printed. |
2 |
Usage error, including a PATH that is not a document. |
See also
- wiki file show — one page's frontmatter, outline, and hash
- wiki link — suggest and repair links