Skip to content

Repository files navigation

llms-map

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.

Why This Exists

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.

Install

npm install -g llms-map

For local development:

npm install
npm run check

Commands

llms-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 --version

Quick Start

Run the built-in demo:

llms-map demo --out reports/demo

Audit the included example:

llms-map audit examples/llms.txt --root examples --out reports/example --full examples/llms-full.txt

Outputs:

  • llms-map.report.md: human-readable score, entries, link status, and diagnostics.
  • llms-map.report.json: machine-readable audit result for CI or automation.

What It Checks

  • Top-level heading.
  • Recommended sections: Docs, API, and Examples.
  • Markdown links and descriptions.
  • Duplicate links.
  • Local relative links resolved against --root.
  • Missing local targets.
  • Approximate token budget for llms.txt and optional llms-full.txt.
  • Remote links are counted as unchecked and are not fetched.

CI Example

npm install -g llms-map
llms-map audit docs/llms.txt --root docs --out reports/llms-map --full docs/llms-full.txt --max-tokens 12000

The 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.

Boundaries

llms-map does not:

  • crawl external websites by default;
  • validate remote URL status;
  • generate a full documentation site;
  • replace platform-specific llms.txt generators;
  • send documentation content to an external service.

It is a deterministic static audit tool for local files and CI.

Documentation

  • 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

Development

npm install
npm run check
node dist/cli.js demo --out reports/demo
npm pack --dry-run --ignore-scripts

License

MIT

About

Audit llms.txt and llms-full.txt files for local CI-friendly LLM documentation readiness.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages