sphinxcontrib-typer
Auto generate docs for typer commands.
What it is and what it does
sphinxcontrib-typer is a Sphinx extension that introspects Typer CLI applications and automatically generates formatted documentation from their command definitions, options, and help text. It bridges the gap between your CLI code and your Sphinx documentation by rendering command help output directly into your docs in HTML, SVG, or plain text formats, using Typer's rich console formatting for polished output.
You add the extension to your Sphinx conf.py, then use a simple typer directive in your .rst files to point at a Typer app object. The extension imports and inspects that app, extracts its structure and help text, and renders it as formatted documentation. It supports documenting callback functions, individual commands, and subcommands, with options to control output width, format preference, and console rendering behavior.
Use it for:
- Generate formatted command reference pages in your project documentation from live Typer CLI code.
- Keep CLI documentation in sync with code by auto-rendering help text instead of maintaining separate docs.
- Export CLI help as SVG diagrams for inclusion in HTML or PDF documentation.
- Document multi-command Typer applications with separate sections for each subcommand.
- Create polished, styled CLI reference documentation with rich formatting without manual markup.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Sphinx extension that auto-generates documentation for Typer CLI applications, rendering command help text in HTML, SVG, or text format using Typer's rich console formatting.
Yes. Active maintenance, no known vulnerabilities, low install friction, and a clear niche: if you document Typer CLIs in Sphinx, this extension saves you from manually maintaining duplicate help text. The MIT license is unrestricted. Not needed if you use Click directly or prefer other documentation approaches.
Install
sphinxcontrib-typer on PyPI
pip
pip install sphinxcontrib-typeruv
uv add sphinxcontrib-typerpoetry
poetry add sphinxcontrib-typerInstalling sphinxcontrib-typer
Before you install
Low friction install with just two runtime dependencies (sphinx and typer). Active maintenance with a recent release 46 days ago and no known vulnerabilities.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.
Quickstart
pip install sphinxcontrib-typer
# In conf.py:
extensions = [
'sphinxcontrib.typer',
]
# In your .rst file:
# .. typer:: examples.example.app
# :prog: example1
# :preferred: html
Your Typer application must be importable from the Python path when Sphinx builds the docs; add the path to sys.path in conf.py before the extension loads.
Verify before relying
- Whether the package handles complex nested subcommand structures beyond the documented examples.
- Performance characteristics when documenting very large CLI applications with many commands.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — sphinx, typer |
| Maintenance | actively maintained — 46 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,001/month — #14,325 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinxcontrib_typer-0.9.1-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
sphinx-clickSphinx-click is a Sphinx extension that…
permissive · top 15,000 on PyPI
typer-slimtyper-slim is a deprecated migration shim that…
permissive · top 5,000 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
typer-configAdds configuration-file support to typer CLI…
permissive · top 15,000 on PyPI
sphinx-promptSphinx Prompt is a Sphinx extension that…
permissive · top 5,000 on PyPI
cycloptsCyclopts is a CLI framework that converts…
permissive · top 1,000 on PyPI
sphinx_mdincludeSphinx extension that lets you include and…
permissive · top 15,000 on PyPI
sphinxcontrib-programoutputA Sphinx extension that executes arbitrary…
permissive · top 15,000 on PyPI
sphinxcontrib-bibtexA Sphinx extension that enables BibTeX-style…
permissive · top 5,000 on PyPI
sphinx_tippyAdds interactive tooltips to Sphinx…
permissive · top 15,000 on PyPI