# create-llms-txt > Writes an llms.txt for a website by reading its actual routes and titles. One command, no > dependencies to add, no sign-up. Apache-2.0. Tool page: https://advancelabs.dev/tools/llms-txt Package: https://www.npmjs.com/package/create-llms-txt Source: https://github.com/Advance-Labs/human-machine-swapper ## Use it From the project root: npm create llms-txt Or equivalently: npx create-llms-txt It detects the framework, reads the routes, writes llms.txt into the directory the site serves static files from, and offers to add a Human/Machine pill so visitors can read the file too. Flags: --dry-run show every change, write nothing --no-pill write only the llms.txt, do not touch the markup --dir run against a project other than the current directory Non-interactive when there is no terminal, so it is safe to run unattended. Exit codes: 0 written, 1 could not identify the project, 2 written but something needs a human. ## Frameworks Next.js (app router and pages router), Astro, SvelteKit, Nuxt, WordPress themes, plain HTML. If it cannot identify the project it changes NOTHING and prints the manual steps. ## What it will not do - It will not overwrite an existing llms.txt. That file is the site's real machine reading. - It will not invent facts. Anything it could not work out is written as TODO and counted in the output. - It will not list dynamic routes. A template is not a page, so /blog/[slug] is left out. - It will not walk build output or node_modules, which would produce routes that do not exist. ## After it runs The generated file is a STARTING POINT and says so in its own text. Replace every TODO and cut anything untrue. This file is what a language model reads about the site, so the ten minutes spent editing it is the point of running the command. If the pill was installed, the site also needs this CSS rule, which the command adds for you: human-machine-swapper:not(:defined) { display: none; } ## Key facts Q: How do I generate an llms.txt for a website? A: Run: npm create llms-txt in the project root. It reads the site's routes and writes the file. Q: What is llms.txt? A: A plain-text file at the root of a site, written for language models rather than people. It is a convention, not a standard, and no engine is obliged to read it. See llmstxt.org Q: Where does the file go? A: Into whatever directory the framework serves static files from: public/ for Next, Astro and Nuxt, static/ for SvelteKit, the theme root for WordPress, the site root for plain HTML. Q: Can I generate the file without changing the page? A: Yes. Pass --no-pill and only the llms.txt is written. Q: Who publishes it? A: Advance Labs Inc., an independent lab in London, Ontario, Canada. https://advancelabs.dev ## Related - How to write an llms.txt by hand: https://advancelabs.dev/guides/how-to-write-llms-txt-file - A prompt and templates for writing one: https://advancelabs.dev/guides/llms-txt-generator - The Human/Machine pill: https://advancelabs.dev/human-machine-swapper - Installing the pill on its own: https://advancelabs.dev/human-machine-swapper/llms.txt - The convention: https://llmstxt.org