skillfed

sphinxcontrib-typer

Auto generate docs for typer commands.

sphinxcontrib-typer v0.9.1 80.0K downloads/30d#14,325 on PyPI26
Permissive license MIT Active released

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-typer

uv

uv add sphinxcontrib-typer

poetry

poetry add sphinxcontrib-typer

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: Web EnvironmentFramework :: SphinxFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DocumentationTopic :: Documentation :: SphinxTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

sphinx typer documentationauto-generate CLI docstyper command documentationsphinx CLI extensioncommand help documentationtyper sphinx pluginCLI reference generation
cli-documentationsphinx-extensiontyper

More Python Modules packages