sphinx-llm-friendly
Sphinx extension that makes documentation LLM-friendly:
A Markdown version of every page, next to its HTML version.
llms.txt, with a link to the Markdown version of every page.
llms-full.txt, with the Markdown version of all pages.
HTML pages point to their Markdown version with a <link rel="alternate" type="text/markdown"> tag, and get a button to copy their Markdown version.
Setup
Install it:
pip install sphinx-llm-friendlyAdd it to extensions in conf.py:
extensions = [ # … "sphinx_llm_friendly", ]Build your documentation:
sphinx-llm-friendly build docs docs/_buildThe output is in docs/_build/all.
It runs the html, llm_markdown and llm_singlemarkdown builders in parallel, into subdirectories of docs/_build, and merges their output. In the Markdown output, links to sites from intersphinx_mapping that serve Markdown point to the Markdown version of their pages.
From Python, call sphinx_llm_friendly.build(source_dir, build_dir), which returns the output directory.
Configuration
- llm_friendly_exclude
List of patterns, with the syntax of exclude_patterns, of documents to leave out of the Markdown output and llms.txt. Default: [].
- llm_friendly_llms_full_txt_exclude
List of patterns, with the syntax of exclude_patterns, of documents to leave out of llms-full.txt only. Default: [].
- llm_friendly_llms_txt_summary
Summary for llms.txt. Default: the first paragraph of the root document.
- llm_friendly_llms_txt_toctree_only
If True, llms.txt only lists documents reachable through toctrees from the root document. Default: False.
Nodes from third-party extensions need Markdown handlers, registered with app.add_node() for the llm_markdown and llm_singlemarkdown builders.
Release files for sphinx-llm-friendly 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinx_llm_friendly-0.2.0.tar.gz | 67.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_llm_friendly-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.4 kB
Release files / sphinx_llm_friendly-0.2.0.tar.gz
| Download URL | sphinx_llm_friendly-0.2.0.tar.gz |
|---|---|
| Size | 67.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4331cf750c5c58556e8b5dfff2dc98ca2dfc3994dd5028c944a14b1fb5b7651
|
|
BLAKE2b-256 checksum How to use checksums |
15bf431989e0a41365b70ce3517a8bd68b592aefecc47c4a4022711ff12fdfd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logRelease files / sphinx_llm_friendly-0.2.0-py3-none-any.whl
| Download URL | sphinx_llm_friendly-0.2.0-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7682772fba2cdcb3b7864a22634d9476725751b3e27a67f0b9fb8f8dee3e99bd
|
|
BLAKE2b-256 checksum How to use checksums |
a829177f54dda5b45469c544c665d2d6fca6183551ff04800fa7449955d9fd57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency log