llms.txt
Auto-generated, whole-codebase context for LLMs at /llms.txt and /llms-full.txt.
An LLM doesn't browse; it ingests. HTML docs and the interactive Scalar reference at /api/docs are built for a human clicking around; /llms.txt hands an agent the same knowledge as flat markdown it can read top to bottom, with no JavaScript and no navigation to crawl. Both are generated from the docs at build time, so they never drift from the pages they mirror.
Two shapes:
/llms.txt: an index. Lists every docs page (each linked as its.mdalias) plus a link to the blog. The/llms.txt/docsand/llms.txt/blogsection indexes are served as their own routes too./llms-full.txt: everything in one file. A# {site.name}title (with anLLM Context Filelabel) and> {site.description}blockquote, thenllmsFullPreamblefrompackages/config/src/site.ts(the monorepo layout, import map, stack, and conventions), then every docs and blog page concatenated with---separators.
Every page is also available on its own as plain text: append .md or .txt to any docs or blog URL, e.g. /docs/manage/llms-txt.md.
In development, curl "$(bunx portless get zerostarter)/llms-full.txt" hands an agent the whole project as one file before it writes a line, which is exactly what the codebase-map skill does to orient.
How they're generated
Two force-static route handlers (both revalidate = 60) build the files from Fumadocs sources:
web/next/src/app/(llms.txt)/llms.txt/[[...slug]]/route.ts: the/llms.txtindex, the/docsand/blogsection indexes, and every per-page alias. It sorts docs bymeta.jsonorder and lists only published blog posts. Console docs are excluded on purpose (privacy boundary).web/next/src/app/(llms.txt)/llms-full.txt/route.ts: the single-file dump, preamble first.
The docs and blog are features: turn one off and its pages, section index, and per-page aliases drop from both files, so /llms.txt never points at a route that 404s.
Page bodies come from getLLMText in web/next/src/lib/llms.ts. It reads each page's processed markdown (available because every collection in web/next/source.config.ts sets includeProcessedMarkdown: true), runs decodeHTML to undo Fumadocs' HTML-escaping, and prefixes a # [title](url) heading that links back to the live page. Each per-page docs alias also appends a footer pointing back to /llms.txt, so an agent that lands on one page can find the rest of the navigation.
Only /docs and /blog aliases are routes
The per-page .md/.txt rewrites (in web/next/next.config.ts) cover /docs/* and /blog/* only. The top-level /docs.md, /docs.txt, /blog.md, and /blog.txt forms are not routes and 404. Use /llms.txt/docs and /llms.txt/blog for the section indexes.
Next
- Working with Agents: the loop that leans on this context.
- Content: where the pages come from, and the
includeProcessedMarkdownflag.