sphinx-click
Sphinx extension that automatically documents click applications
What it is and what it does
Sphinx-click is a Sphinx extension that bridges Click CLI applications and Sphinx documentation by automatically extracting command definitions, options, and help text from a Click parser and rendering them as formatted HTML documentation with proper links and styling.
You enable it in your Sphinx conf.py, then use a simple directive to point to your Click application's parser. The extension introspects the Click command structure and generates formatted documentation that matches your Sphinx theme. This is most useful when you want to keep your CLI help text as the single source of truth and automatically include it in your project's documentation without manual duplication.
Use it for:
- Document a Click-based CLI tool by automatically rendering its command structure, options, and help text into your Sphinx docs.
- Keep CLI documentation in sync with your application code by extracting it directly from Click decorators at build time.
- Generate nested command documentation with proper HTML links and styling for complex multi-level CLI applications.
- Include CLI reference pages in your project documentation without manually rewriting command definitions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sphinx-click is a Sphinx extension that automatically extracts and renders documentation from Click-based CLI applications directly into your Sphinx docs.
Yes, if you maintain a Click-based CLI and use Sphinx for documentation. The extension solves a real problem—keeping CLI docs synchronized with code—and has no security vulnerabilities. The aging maintenance status (253 days since last release) is a minor concern but not a blocker, since the package is stable, has low dependencies, and the repository remains active. Install it if you want to automate CLI documentation; skip it if you don't use Click or Sphinx.
Install
sphinx-click on PyPI
pip
pip install sphinx-clickuv
uv add sphinx-clickpoetry
poetry add sphinx-clickInstalling sphinx-click
Before you install
Low install friction; depends only on sphinx, click, and docutils. Maintenance shows aging status with last commit in December 2025 and no releases in the past 253 days, but the repository remains active and not archived.
License in practice
MIT License (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install sphinx-click
In conf.py:
extensions = ['sphinx_click']
In your .rst file:
.. click:: myapp:cli
:prog: myapp
Both your Click application and any of its dependencies must be installed and importable for sphinx-click to extract documentation from it.
Verify before relying
- Whether the 253-day gap since last release indicates active maintenance or dormancy relative to typical Sphinx extension update cycles.
- Compatibility with recent Sphinx and Click versions beyond the stated Python >=3.10 requirement.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — sphinx, click, docutils |
| Maintenance | aging — 253 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 779,718/month — #5,083 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinx_click-6.2.0-py3-none-any.whl
Keywords: sphinx, click
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
readthedocs-sphinx-searchA Sphinx extension that adds real-time…
permissive · top 15,000 on PyPI
sphinx-data-viewerAdds an interactive data viewer to Sphinx…
permissive · top 15,000 on PyPI
sphinx-gallerySphinx-Gallery is a Sphinx extension that…
permissive · top 15,000 on PyPI
sphinxcontrib-typerA Sphinx extension that auto-generates…
permissive · top 15,000 on PyPI
click-extraClick Extra is a wrapper around Click that adds…
copyleft · top 15,000 on PyPI
sphinx-last-updated-by-gitA Sphinx extension that automatically extracts…
permissive · top 15,000 on PyPI
autodocsummA Sphinx extension that enhances autodoc with…
permissive · top 5,000 on PyPI
sphinx-codeautolinksphinx-codeautolink automatically converts code…
unclear · top 15,000 on PyPI
sphinx-hoverxrefSphinx extension that displays tooltips with…
permissive · top 15,000 on PyPI
sphinx-automodapiSphinx extension that automatically generates…
permissive · top 15,000 on PyPI