Skip to content

0.11.0: native links and backlinks

Latest

Choose a tag to compare

@pa1ar pa1ar released this 02 Nov 21:45

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.
  • --links on docs get, blocks get and cat uses the same path and shows source document titles and counts.
  • The old path stays as --legacy (--text and --exhaustive imply it) and is used automatically only when the endpoint is unavailable.
  • JSON from links and the backlinks array now use the /internal-links item 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.