Skip to main content

Mkdocs rich argparse

github repo badge github license badge RSD workflow pypi badge fair-software badge CI

An MkDocs plugin to generate documentation for a rich argparse parser. It renders commands, sub commands and sub-sub commands which can have rich help messages.

Installation

Install from Pypi:

pip install mkdocs-rich-argparse

Usage

In your mkdocs.yml configuration file, add the plugin and configure it with the module and factory to document:

plugins:
    - mkdocs-rich-argparse:
        module: my_module
        factory: my_factory_function

nav:
   - CLI Reference: cli.md

Where my_module is the Python module containing your argparse parser factory function, and my_factory_function is the specific function that returns an argparse parser object. It should be callable without arguments. You can optionally add path to specify the path to the module if it's not in the Python path.

When serving or building your MkDocs site, the plugin will generate a cli.md file containing the documentation for the specified argparse parser.

See the example/ directory for a minimal example and a custom styled example.

Screenshot of example

Colors in Continuous Integration

If you are building the mkdocs site in a Continuous Integration (CI) environment, the colors might not render correctly. To fix this add TTY_COMPATIBLE=1 and TTY_INTERACTIVE=0 environment variables to your CI configuration.

For example in GitHub Actions add the following to your workflow file:

env:
    TTY_COMPATIBLE: '1'
    TTY_INTERACTIVE: '0'

Contributing

If you want to contribute to the development of mkdocs_rich_argparse, have a look at the contribution guidelines.

Metadata

Release files for mkdocs-rich-argparse 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-rich-argparse 0.1.3
File Size Uploaded
mkdocs_rich_argparse-0.1.3.tar.gz 178.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-rich-argparse 0.1.3
File Interpreter ABI Platform
mkdocs_rich_argparse-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 192.4 kB

Release files / mkdocs_rich_argparse-0.1.3.tar.gz

Download URL mkdocs_rich_argparse-0.1.3.tar.gz
Size 178.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8354cc76ed08e316c3a42b359faf0dceb19ca2312ea4e6643ba85c258ab906b2
BLAKE2b-256 checksum
How to use checksums
d9ca9d7ece07900e162e69b76a0e288d101ff24d0ca3dfb85c52402a85c454f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.

Transparency log

Release files / mkdocs_rich_argparse-0.1.3-py3-none-any.whl

Download URL mkdocs_rich_argparse-0.1.3-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e137de0e86a824dba87bdc60e1c0c218ed43fa12ccce63f1f99cd0fe22f1abd4
BLAKE2b-256 checksum
How to use checksums
c0553cc3955e7665f2a5896645479d429cf1bb959319679f9a6c98c33236888e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page