Sphinx llms.txt Generator¶
A Sphinx extension that generates a summary llms.txt file, written in Markdown, and a single combined documentation llms-full.txt file, written in reStructuredText.
Demo¶
This Sphinx project’s llms.txt and llms-full.txt files as an example of the default output format.
Alternative output formats are also available. For example: Markdown and reStructuredText.
Highlights¶
- Zero Configuration
Add the extension to your
conf.pyand you’re done. The extension automatically collects your documentation and generates bothllms.txtandllms-full.txtduring your normal Sphinx build.- Intelligent Content Processing
Automatically resolves
includedirectives, transforms relative paths, and handles your documentation structure without manual intervention.- Customizable When Needed
Filter content, include source code files, or integrate with alternative output formats like Markdown for even better LLM compatibility. See Getting Started for output format options and Project Configuration Values for all settings.
See also
For better default output without configuration, see sphinx-llm from NVIDIA. sphinx-llms-txt is best when customized with alternative output formats, content filtering, or source code inclusion.