click-docs
Generate Markdown documentation from your Click application — automatically, from source, with no manual editing required.
About
Click applications document themselves — click-docs reads that information and turns it into clean Markdown. Point it at a Python file, get a complete reference page: usage lines, options tables, nested subcommands, the works.
It introspects Click objects directly and never executes your application, so there are no side effects and the output is always in sync with your source.
Features
- Zero-execution introspection — reads Click objects, never runs your app
- Nested command support — recursively documents subcommands with configurable depth
- Two option styles —
plain(preformatted text) ortable(Markdown table) - Configurable via
pyproject.toml— set defaults once in[tool.click-docs] - Subcommand TOC — optional bulleted table of contents at the top
- Filtering — exclude specific commands, skip hidden commands, strip ASCII art blocks
Installation
$ pip install click-docs
Or with uv:
$ uv add click-docs
Requirements: Python 3.10+, Click 8.1+
Quick start
Given a file deployer.py containing a Click application:
$ click-docs deployer.py --program-name deployer --output docs/cli-reference.md
That's it. docs/cli-reference.md now contains the full Markdown reference for every command and option.
Common options
| Option | Description |
|---|---|
--program-name TEXT |
Display name in headings and usage lines |
--output FILE |
Write to file instead of stdout |
--style plain|table |
Options rendering style |
--depth N |
Max subcommand depth (0 = root only) |
--exclude PATH |
Exclude a command by dotted path (repeatable) |
--list-subcommands |
Prepend a TOC of subcommands |
--remove-ascii-art |
Strip \b-prefixed ASCII art blocks |
Run click-docs --help for the full list.
Configure defaults in pyproject.toml
Set project-wide defaults so you don't repeat flags on every run:
[tool.click-docs]
program-name = "my-tool"
style = "table"
list-subcommands = true
remove-ascii-art = true
output = "docs/cli-reference.md"
Documentation
Full documentation, tutorials, and API reference: callowayproject.github.io/click_docs
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Development setup
$ git clone https://github.com/callowayproject/click-docs.git
$ cd click-docs
$ uv sync
$ uv run pytest
License
click-docs is licensed under the Apache 2.0 license. See the LICENSE file for details.
Metadata
Release files for click-docs 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| click_docs-0.3.0.tar.gz | 126.3 kB | Without provenance | Details for click_docs-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| click_docs-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for click_docs-0.3.0-py3-none-any.whl |
Total release size: 138.1 kB
Release files / click_docs-0.3.0.tar.gz
| Download URL | click_docs-0.3.0.tar.gz |
|---|---|
| Size | 126.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7402f402733709fe68f8858c74fd9fa57e1a63f429d5f212771ea8b541090bb2
|
|
BLAKE2b-256 checksum How to use checksums |
6c449e9e0234bc7a6f4b0528698c32378b6677d91303c69e9fdfc92848107f5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / click_docs-0.3.0-py3-none-any.whl
| Download URL | click_docs-0.3.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da8e5fde4cdb21b7303ee1094174730d004d27894f8b1eceb19cdbc9edee3135
|
|
BLAKE2b-256 checksum How to use checksums |
ab068828ac54f7ef9941779697e2fa5976b737e33f4d10173532c13eb60c1890
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for click-docs 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.