Repository navigation
Links and backlinks now come from Craft's own /internal-links endpoint (experimental, also behind the Craft MCP internal-links get) instead of the title-search heuristic.
craft links in <docId> # who references this doc: titles + reference counts
craft links out <docId> # what this doc references
craft links in <docId> --level block # exact source blocks
craft links in <cardId> # cards and blocks: document found via the local Craft cache
craft links map --from-date today # what today's daily note links to- Finds links with custom link text, results past the old top-20 search cutoff, and date mentions. On our space: 77 documents link to the SKILLS database; the old title search found 1.
- Card and block ids are mapped to their document through the local cache. Without it (
--source api), pass--doc <rootId>or--scan; otherwise the command exits 4 instead of returning an empty list. --linksondocs get,blocks getandcatuses the same path and shows source document titles and counts.- The old path stays as
--legacy(--textand--exhaustiveimply it) and is used automatically only when the endpoint is unavailable. - JSON from
linksand thebacklinksarray now use the/internal-linksitem shape.
Library: client.links.page/all/findRoot, native backlinks/outgoing, LinkScopeError, isInternalLinksUnavailable.
Verified against the live API: new links e2e suite (5 pass), full integration suite (33 pass), unit tests (233 pass), typecheck, build.