Suggest missing wikilinks for plain-text mentions of other wiki pages, or repair broken internal links when the fix is unambiguous. Report-only by default — mutations require explicit flags.
Usage
wiki link
wiki link wiki/Some_Page.md
wiki link wiki/A.md wiki/B.md
wiki link -v
wiki link --check
wiki link --dry-run --apply
wiki link --apply
wiki link --fix-broken
wiki link --fix-broken --dry-run
Options
| Flag | Description |
|---|---|
FILE... |
Optional markdown paths; otherwise entire wiki |
--apply |
Insert internal links for each suggestion (body only, never frontmatter); format from link.style in wiki.yaml (standard or wikilink) |
--fix-broken |
Repair unambiguous broken wikilinks and internal markdown page links |
-n, --dry-run |
Preview --apply or --fix-broken without writing files |
-c, --check |
Exit 1 if opportunities or broken links remain (CI gate) |
-v, --verbose |
Include target titles in report output; print changed files when applying |
Detection rules
Missing-link suggestions skip:
- Existing wikilinks and markdown links
- Fenced and inline code
- Self-links and overlapping aliases (longest alias wins)
- Short single-word acronyms (for example
HTML,JSON) unless the page slug humanizes to the same text
Broken-link repair (--fix-broken) only runs when:
- The target page rename is listed in
link.renames(see Wiki Configuration) - A unique fuzzy route match exists among wiki pages
- A unique fuzzy heading fragment exists on the target page
It never auto-creates pages or deletes links. Asset links, metadata CURIEs, and ambiguous matches stay manual.
Why not check or lint?
wiki lintis the convention lane — broken links, filename pattern, heading style, and link style. It reports but does not edit files; repair iswiki link --fix-broken. Missing wikilinks are optional enrichment, not a lint violation.wiki checkis the integrity lane — SHACL, JSON Schema frontmatter, routes, collisions, layout frontmatter. It does not scan prose for broken links.wiki linkrequires explicit--applyor--fix-brokenbecause suggestions are heuristic and repairs are conservative by design.- See Design Philosophies for the full lane model.
Related
- Wiki Subcommand lint — convention lane (
lint.broken_links) - Wiki Subcommand check — integrity lane (SHACL, JSON Schema, routes, layout)
- Style Guide — internal link conventions
- Wiki CLI