skillfed

sphinx-click

Sphinx extension that automatically documents click applications

sphinx-click v6.2.0 779.7K downloads/30d#5,083 on PyPI222
Permissive license MIT License AGING released

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

uv

uv add sphinx-click

poetry

poetry add sphinx-click

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: DocumentationTopic :: Documentation :: SphinxTopic :: Utilities

Tags

sphinx click cli documentationauto-generate cli docs sphinxclick command documentation pluginsphinx extension click appscli help to sphinx docsclick parser documentation sphinx
cli-documentationsphinx-plugin

More Utilities packages