Generate Markdown documentation for your Click application
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file click_docs-0.2.0.tar.gz.
File metadata
- Download URL: click_docs-0.2.0.tar.gz
- Upload date:
- Size: 125.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88dd88ff7d736e5e770a0637aaf9c9f216bcdbb64b937f802d3e7780da73ae98
|
|
| MD5 |
4c31d5e7f519a22edc73ff03ec5ded8e
|
|
| BLAKE2b-256 |
9ed431ce98039c301f34bb7bc66d45ddce1d4ad82dc0d747c67032889032ef14
|
File details
Details for the file click_docs-0.2.0-py3-none-any.whl.
File metadata
- Download URL: click_docs-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d6acd2f95320e8412f53ec215ed5a5c9ee1e64cf661adc47a2aec510a4b25e2
|
|
| MD5 |
b5adf7ef8e18027fcc2265bcaaf36c73
|
|
| BLAKE2b-256 |
0cb02649e67045540c83708619fafaab187ae194a77776333475154dd55b02a0
|