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.

Latest PyPi Version Latest Conda Version PyPi Downloads per month Parallel read/write safe GitHub Repository stars

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.py and you’re done. The extension automatically collects your documentation and generates both llms.txt and llms-full.txt during your normal Sphinx build.

Intelligent Content Processing

Automatically resolves include directives, 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.