llms-map is a local-first CLI for auditing llms.txt and llms-full.txt files before they ship.
It parses a documentation map, checks local links, estimates context budget, flags duplicate or weak entries, and writes Markdown plus JSON reports that work in CI.
llms.txt gives LLMs and coding agents a compact entrypoint into project documentation. As more documentation platforms support it, maintainers need a local check that answers:
- Does the file have a clear title and useful sections?
- Are local links valid before publishing?
- Are entries described well enough for an agent to choose the right page?
- Is the map too large for the intended context budget?
- Can the result be enforced in CI?
llms-map fills that audit layer. It does not generate docs for a platform and does not crawl arbitrary external websites by default.
npm install -g llms-mapFor local development:
npm install
npm run checkllms-map audit <llms.txt> --root <dir> --out <dir> [--full <llms-full.txt>] [--max-tokens <n>]
llms-map demo --out <dir>
llms-map --help
llms-map --versionRun the built-in demo:
llms-map demo --out reports/demoAudit the included example:
llms-map audit examples/llms.txt --root examples --out reports/example --full examples/llms-full.txtOutputs:
llms-map.report.md: human-readable score, entries, link status, and diagnostics.llms-map.report.json: machine-readable audit result for CI or automation.
- Top-level heading.
- Recommended sections:
Docs,API, andExamples. - Markdown links and descriptions.
- Duplicate links.
- Local relative links resolved against
--root. - Missing local targets.
- Approximate token budget for
llms.txtand optionalllms-full.txt. - Remote links are counted as unchecked and are not fetched.
npm install -g llms-map
llms-map audit docs/llms.txt --root docs --out reports/llms-map --full docs/llms-full.txt --max-tokens 12000The command exits with code 1 when a local linked target is missing or when no links are found. Warnings still produce reports and exit 0.
llms-map does not:
- crawl external websites by default;
- validate remote URL status;
- generate a full documentation site;
- replace platform-specific
llms.txtgenerators; - send documentation content to an external service.
It is a deterministic static audit tool for local files and CI.
- English:
README.md,CHANGELOG.md,CONTRIBUTING.md,SECURITY.md - Simplified Chinese:
README.zh-CN.md,CHANGELOG.zh-CN.md,CONTRIBUTING.zh-CN.md,SECURITY.zh-CN.md
npm install
npm run check
node dist/cli.js demo --out reports/demo
npm pack --dry-run --ignore-scriptsMIT