Getting Started
Create your first llms.txt in 5 minutes
What is llms.txt?
Section titled “What is llms.txt?”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.
The Problem
Section titled “The Problem”- 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 Solution
Section titled “The Solution”The llms.txt file provides:
- A brief project description
- A structured list of important pages
- Descriptions of each resource for LLMs
Creating llms.txt Manually
Section titled “Creating llms.txt Manually”Step 1: Create the File
Section titled “Step 1: Create the File”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 projectStep 2: Deploy to Your Site
Section titled “Step 2: Deploy to Your Site”The file should be accessible at:
https://yoursite.com/llms.txtStep 3: Verify
Section titled “Step 3: Verify”Open the URL in a browser and make sure the file displays correctly.
Automatic Generation
Section titled “Automatic Generation”For large sites, use automation tools:
# Generate from sitemap.xmlnpx llmstxt gen https://example.com/sitemap.xml > llms.txt
# Generate with full contentnpx llmstxt gen-full https://example.com/sitemap.xml > llms-full.txtIntegrations
Section titled “Integrations”Astro + Starlight
Section titled “Astro + Starlight”Use the starlight-llms-txt plugin:
pnpm add starlight-llms-txtimport starlightLlmsTxt from 'starlight-llms-txt'
export default defineConfig({ integrations: [ starlight({ plugins: [starlightLlmsTxt()], }), ],})VitePress
Section titled “VitePress”npm install vitepress-plugin-llmsDocusaurus
Section titled “Docusaurus”npm install docusaurus-plugin-llms-txtNext Steps
Section titled “Next Steps”- File Format — detailed specification
- Sections — required and optional sections
- Tools — generation automation