Skip to content

Commit cb2983d

Browse files
committed
feat(docs): Generate llms.txt for the published site
LLM-driven coding assistants look for /llms.txt at a docs site root to discover the canonical reference. Emitting one alongside the pdoc output makes the published Python SDK docs directly consumable by those tools without forcing them to crawl the HTML.
1 parent 4c5c47c commit cb2983d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

scripts/docs.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,27 @@ if [ ! -f docs/_site/index.html ] && [ -f docs/_site/workos.html ]; then
88
fi
99
uv run --group docs pydoc-markdown -p workos --render-toc > docs/_site/workos.md
1010
cp docs/_site/workos.md docs/_site/index.md
11+
12+
version=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
13+
cat > docs/_site/llms.txt <<EOF
14+
# WorkOS Python SDK
15+
16+
> Official Python client for the WorkOS API. Provides synchronous and
17+
> asynchronous clients for SSO, Directory Sync, User Management, Audit Logs,
18+
> Organizations, Events, Webhooks, and more. Current version: ${version}.
19+
20+
The full API reference is available as markdown at [index.md](index.md).
21+
HTML documentation is at [index.html](index.html).
22+
23+
## Docs
24+
25+
- [Full API reference (markdown)](index.md): every public class and function in the \`workos\` package
26+
- [HTML API reference](index.html): browsable pdoc-rendered site
27+
- [WorkOS product documentation](https://workos.com/docs): guides, concepts, and REST API reference
28+
- [Python SDK guide](https://workos.com/docs/sdks/python): installation and getting started
29+
30+
## Source
31+
32+
- [GitHub repository](https://github.com/workos/workos-python)
33+
- [PyPI package](https://pypi.org/project/workos/)
34+
EOF

0 commit comments

Comments
 (0)