Skip to content

Comments

Add llms.txt support for documentation#22463

Merged
zanieb merged 1 commit intoastral-sh:mainfrom
zaniebot:claude/add-llms-txt-setup-ZXvWS
Jan 9, 2026
Merged

Add llms.txt support for documentation#22463
zanieb merged 1 commit intoastral-sh:mainfrom
zaniebot:claude/add-llms-txt-setup-ZXvWS

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Jan 8, 2026

Matching uv.

Add mkdocs-llmstxt plugin configuration to generate llms.txt files
for LLM-friendly documentation access. This follows the same pattern
used in the uv documentation.
@zanieb zanieb added the documentation Improvements or additions to documentation label Jan 8, 2026
@zanieb zanieb marked this pull request as ready for review January 9, 2026 15:56
@zanieb zanieb merged commit a6df4a3 into astral-sh:main Jan 9, 2026
40 checks passed
dhruvmanila pushed a commit to astral-sh/ty that referenced this pull request Jan 28, 2026
## Summary

Add mkdocs-llmstxt plugin configuration to generate llms.txt for
LLM-friendly documentation access.
Matches [uv](https://docs.astral.sh/uv/llms.txt) and
[ruff](https://docs.astral.sh/ruff/llms.txt).

See astral-sh/uv#13929 and astral-sh/ruff#22463 for more information.

## Test Plan

1. Serve with
```shell
uvx --with-requirements docs/requirements.txt -- mkdocs serve -f mkdocs.yml
```
2. Inspect http://127.0.0.1:8000/ty/llms.txt

The generated file should look like:
```
# ty

> ty is an extremely fast Python type checker.

ty is an extremely fast Python type checker written in Rust. It can type check
large Python codebases in seconds, providing fast feedback during development.

ty includes both a CLI (`ty check`) and a language server for editor integration.

When fetching documentation, use explicit `index.md` paths for directories, e.g.,
`https://docs.astral.sh/ty/features/index.md`. This returns clean markdown instead
of rendered HTML with JS/CSS.


## Guides

- [Editor integration](http://127.0.0.1:8000/ty/editors/index.md)
- [Installation](http://127.0.0.1:8000/ty/installation/index.md)
- [Type checking](http://127.0.0.1:8000/ty/type-checking/index.md)

## Concepts

- [Configuration](http://127.0.0.1:8000/ty/configuration/index.md)
- [File exclusions](http://127.0.0.1:8000/ty/exclusions/index.md)
- [Module discovery](http://127.0.0.1:8000/ty/modules/index.md)
- [Python version](http://127.0.0.1:8000/ty/python-version/index.md)
- [Rules](http://127.0.0.1:8000/ty/rules/index.md)
- [Suppression](http://127.0.0.1:8000/ty/suppression/index.md)

## Features

- [Diagnostics](http://127.0.0.1:8000/ty/features/diagnostics/index.md)
- [Language server](http://127.0.0.1:8000/ty/features/language-server/index.md)
- [Type system](http://127.0.0.1:8000/ty/features/type-system/index.md)

## Reference

- [CLI](http://127.0.0.1:8000/ty/reference/cli/index.md)
- [Configuration](http://127.0.0.1:8000/ty/reference/configuration/index.md)
- [Editor settings](http://127.0.0.1:8000/ty/reference/editor-settings/index.md)
- [Environment variables](http://127.0.0.1:8000/ty/reference/environment/index.md)
- [Exit codes](http://127.0.0.1:8000/ty/reference/exit-codes/index.md)
- [Rules](http://127.0.0.1:8000/ty/reference/rules/index.md)
- [Typing FAQ](http://127.0.0.1:8000/ty/reference/typing-faq/index.md)
```

Note: the loopback address links are expected when serving locally, and
will be replaced with the fully-qualified domain name (i.e.
docs.astral.sh) when deployed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants