Turn docs into agent-ready discovery files.
llms-txt-generator crawls a URL or scans local docs and outputs:
llms.txtfor fast agent-readable summariesagent.jsonfor structured metadata (docs, capabilities, endpoints, auth hints)
Traditional docs are written for humans. Agents need predictable structure. This project helps you ship an agent-friendly layer without hand-writing metadata.
| Input | Output | Use case |
|---|---|---|
| Website docs URL | llms.txt + agent.json |
Publish agent-discoverable metadata for public docs |
| Local docs folder | llms.txt + agent.json |
Generate artifacts from markdown/html docs in a repo |
| Zipped docs upload (web) | llms.txt + agent.json zip download |
Non-CLI users and quick sharing |
cd llms-txt-generator
pnpm installpnpm --filter llms-txt-cli build
pnpm --filter llms-txt-cli exec node dist/index.js https://example.com --out ./outputcat ./output/llms.txt
cat ./output/agent.jsonflowchart LR
A["Input Source"] --> B["Core Parser + Crawler"]
B --> C["Summarization + Inference"]
C --> D["llms.txt"]
C --> E["agent.json"]
A1["CLI: URL or local folder"] --> A
A2["Web: URL or ZIP upload"] --> A
# acme-docs
> Generated from crawled website pages. Key topics: api, authentication, models.
## Pages
- Intro (/docs/intro)
Learn how to authenticate and call the models endpoint.{
"name": "acme-docs",
"sourceType": "url",
"docs": [
{
"source": "https://docs.example.com/intro",
"title": "Intro",
"summary": "Learn how to authenticate and call the models endpoint."
}
],
"endpoints": [
{ "method": "GET", "path": "/v1/models", "auth": "api_key" }
]
}pnpm --filter llms-txt-cli exec node dist/index.js https://docs.example.com --out ./output --max-pages 25pnpm --filter llms-txt-cli exec node dist/index.js ./docs --local --out ./output| Flag | Description | Default |
|---|---|---|
--local |
Treat target as local directory | false |
--out <dir> |
Output directory | ./output |
--exclude <glob...> |
Exclude file/path patterns | none |
--max-pages <n> |
Max pages to crawl in URL mode | 20 |
--name <name> |
Override generated project name | inferred |
Run locally:
pnpm --filter llms-txt-web devOpen http://localhost:3000 and choose:
Website URLZip Upload(.md,.mdx,.txt,.html,.htm)
You will receive llms-txt-output.zip with both files.
.
├── apps
│ ├── cli
│ └── web
├── packages
│ ├── core
│ └── schemas
└── README.mdMIT. See LICENSE.