Skip to content

Getting Started

Create your first llms.txt in 5 minutes

llms.txt is a Markdown file placed at /llms.txt on your website. It helps language models (Claude, ChatGPT, Gemini) understand your site structure and find the right information.

  • LLM context windows are limited (typically 100-200K tokens)
  • HTML pages contain lots of “noise” (navigation, ads, scripts)
  • LLMs cannot process an entire website at once

The llms.txt file provides:

  • A brief project description
  • A structured list of important pages
  • Descriptions of each resource for LLMs

Create a llms.txt file in your site’s root:

# My Project
> Brief project description — what it does and who it's for.
Additional information about the project to help LLMs understand the context.
## Documentation
- [Quick Start](https://example.com/docs/quickstart): Step-by-step guide for new users
- [Installation](https://example.com/docs/installation): Requirements and installation instructions
- [API Reference](https://example.com/docs/api): Complete description of all endpoints
## Guides
- [Authentication](https://example.com/guides/auth): How to set up authorization
- [Deploy](https://example.com/guides/deploy): Production deployment
## Optional
- [Changelog](https://example.com/changelog): Version history
- [Contributing](https://example.com/contributing): How to contribute to the project

The file should be accessible at:

https://yoursite.com/llms.txt

Open the URL in a browser and make sure the file displays correctly.

For large sites, use automation tools:

Окно терминала
# Generate from sitemap.xml
npx llmstxt gen https://example.com/sitemap.xml > llms.txt
# Generate with full content
npx llmstxt gen-full https://example.com/sitemap.xml > llms-full.txt

Use the starlight-llms-txt plugin:

Окно терминала
pnpm add starlight-llms-txt
astro.config.mjs
import starlightLlmsTxt from 'starlight-llms-txt'
export default defineConfig({
integrations: [
starlight({
plugins: [starlightLlmsTxt()],
}),
],
})
Окно терминала
npm install vitepress-plugin-llms
Окно терминала
npm install docusaurus-plugin-llms-txt