Skip to main content

Click Extra

Last release Python versions Downloads Unittests status Documentation status DOI

What is Click Extra?

It should be easy to write a good CLI in Python. Click makes it so. But there are still hundreds of tweaks to implement by yourself to have a user-friendly CLI.

Click Extra is a ready-to-use wrapper around Click to make your CLI look good and behave well. It is a drop-in replacement with good defaults that saves lots of boilerplate code and frustration by making all parts working together.

It also comes with workarounds and patches that have not reached upstream yet (or are unlikely to).

Who is this for?

Anyone building a CLI who doesn't have time to assemble the pieces from scratch:

  • You use Click and want professional defaults without the boilerplate.
  • You're a security researcher turning a proof-of-concept into a presentable tool to hand off, demo, or attach to an advisory.
  • You're a DevOps engineer or sysadmin whose one-off script grew into a team tool and needs --help, --verbose, --config, and colored output.

Click Extra's defaults-first design means one decorator gets you there. See the 30-second quick start.

Demo

You can try Click Extra right now in your terminal, without installing any dependency or virtual env thanks to uvx:

$ uvx click-extra

This is a great way to play with Click Extra and check that it runs fine on your system, and renders properly in your terminal.

Example

It transforms this vanilla click CLI:

click CLI help screen

Into this:

click-extra CLI help screen

And here is the entire diff between the two. Click Extra proxies the whole click namespace, so aliasing it back leaves every decorator and call untouched:

-import click
+import click_extra as click

The colors, and every option below --name, come from that one line. Both screens above are captured from the tutorial's own live examples.

Features

Help screens and theming

Standard options on every CLI

Listed in the order they show up in a --help screen:

  • --time/--no-time to measure command execution duration
  • --color[=WHEN] tri-state flag (auto/always/never) with a hidden --no-color alias, recognizing NO_COLOR (no-color.org), FORCE_COLOR, CLICOLOR, and LLM environment variables
  • --params to debug parameter defaults, values, environment variables and provenance
  • --table-format to switch between fifty table-rendering styles, from terminal grids to machine-readable json, yaml, toml, csv and xml (uses print_table() and serialize_data())
  • Colored --verbosity LEVEL and logs, plus -v/--verbose repetition for incremental bumping
  • --tree to print the whole hierarchy of nested subcommands with their descriptions, aliases and deprecations: Nested subcommands printed as a tree
  • --man to typeset the command's manual and page it, the way man does, for a CLI that ships no man page at all
  • --help-format to render the command as JSON, Markdown, a man page or a Carapace spec, for the readers that are programs rather than people: one option carrying a format, not one flag per format
  • Colored --version with template variables for git metadata (branch, hash, date, tag) and pre-baking for compiled binaries (Nuitka, PyInstaller)

Two more options are one decorator away, for a CLI that wants them:

  • --jobs for parallel-execution worker counts
  • --telemetry/--no-telemetry flag to opt-in/out of tracking code, recognizing DO_NOT_TRACK from consoledonottrack.com

And every CLI gets these on top:

  • Global show_envvar option to display all environment variables in help screens
  • Global show_choices to activate selection of choices on user input prompts
  • Auto-generation and normalization of environment variables for all options

CLI wrapper

  • CLI wrapper (click-extra wrap) applies help colorization, themes, and config loading to any Click CLI without modifying its source code: Flask's help screen rendered through the wrapper
  • --params mode to introspect any external Click CLI's parameters, restricted to the columns you care about: Flask's parameters listed by the wrapper
  • That same inventory in any machine-readable format, for a script that has to consume another CLI's interface: Flask's parameters exported as JSON
  • --help-format carapace to export any Click CLI's Carapace completion spec, for identical completions in Bash, Zsh, Fish, Nushell, PowerShell, Elvish and Xonsh, with --install putting it where Carapace looks (and --help-format man --install doing the same for a man page): A Carapace completion spec generated from Flask
  • --man mode to read the manual of a CLI that never wrote one
  • --help-format mode to describe any Click CLI as JSON, Markdown, a man page or a Carapace spec: usage line, option groups, subcommands and all, with no cooperation from the target
  • --tree mode to print any external Click CLI's subcommand hierarchy without running it
  • User-defined themes via --config work transparently through the wrapper, so users can theme third-party CLIs from their own pyproject.toml

Configuration

Types and parameters

Performance and structure

Documentation tooling

Testing

  • CliRunner — click.testing.CliRunner subclass that captures stdout and stderr separately and preserves ANSI codes for assertion against colored output
  • pytest fixtures (invoke, runner, create_config) and ready-made regex helpers (default_options_uncolored_help, default_debug_*) for click-extra-aware test suites

Upstream

  • Fixes 100+ bugs and addresses missing features across Click, Cloup, Pygments, tabulate, MyST-Parser, Furo, and unmaintained click-contrib packages
  • Drop-in replacement for Click and Cloup: every from click_extra import … and @click_extra.command works as a transparent superset. Cloup provides option groups, constraints, subcommand sections, aliases, and Did you mean <subcommand>? suggestions; click-extra adds everything above on top.

Used in

Check these projects to get real-life examples of click-extra usage.

CLIs:

Documentation (depends on click-extra[sphinx] or click-extra[mkdocs]):

  • GitHub stars Anki - A smart spaced repetition flashcard program.
  • GitHub stars pip-tools - A set of tools to keep your pinned Python dependencies fresh.
  • GitHub stars bump-my-version - A CLI updating every version string in a project.
  • GitHub stars SQLSpec - A query mapper for Python.
  • GitHub stars Extra Platforms - Detect architectures, platforms, shells, terminals and CI systems, grouped by family.

Feel free to send a PR to add your project in either list if you are relying on Click Extra in any way.

Release files for click-extra 9.3.0

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

Source distribution (sdist)

Source distribution for click-extra 9.3.0
File Size Uploaded
click_extra-9.3.0.tar.gz 1.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for click-extra 9.3.0
File Interpreter ABI Platform
click_extra-9.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / click_extra-9.3.0.tar.gz

Download URL click_extra-9.3.0.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
5ae6823cb38c4b4de961ea59f69ea69b79d7eac3b1c3f4f30bb110503f22a81e
BLAKE2b-256 checksum
How to use checksums
a6c5f4334da93584e1ff8b5857569f99ec83b1886d4842f0aad0509d32b1ba9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Sep 18, 2026.

Transparency log

Release files / click_extra-9.3.0-py3-none-any.whl

Download URL click_extra-9.3.0-py3-none-any.whl
Size 642.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0070a214473cc30af37e9a31995f891752763e9c52f8e5a5344aa425429b122c
BLAKE2b-256 checksum
How to use checksums
733fbf364b6942ba543f80a8b96d415e5f70c02f4ffdeb343188c9ba266cfbc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

9.3.4

2 release files

9.3.3

2 release files

9.3.2

2 release files

9.3.1

2 release files

This release

9.3.0 This release

2 release files

9.2.0

2 release files

9.1.0

2 release files

9.0.0

2 release files

8.9.1

2 release files

8.9.0

2 release files

8.8.1

2 release files

8.8.0

2 release files

8.7.0

2 release files

8.6.3

2 release files

8.6.2

2 release files

8.6.1

2 release files

8.6.0

2 release files

8.5.0

2 release files

8.4.0

2 release files

8.3.0

2 release files

8.2.0

2 release files

8.1.4

2 release files

8.1.3

2 release files

8.1.2

2 release files

8.1.1

2 release files

8.1.0

2 release files

8.0.1

2 release files

8.0.0

2 release files

7.20.1

2 release files

7.20.0

2 release files

7.19.0

2 release files

7.18.0

2 release files

7.17.2

2 release files

7.16.1

2 release files

7.16.0

2 release files

7.14.1

2 release files

7.14.0

2 release files

7.13.0

2 release files

7.12.0

2 release files

7.11.0

2 release files

7.9.0

2 release files

7.8.0

2 release files

7.7.0

2 release files

7.6.5

2 release files

7.6.4

2 release files

7.6.3

2 release files

7.6.2

2 release files

7.6.1

2 release files

7.6.0

2 release files

7.5.3

2 release files

7.5.2

2 release files

7.5.1

2 release files

7.5.0

2 release files

7.4.0

2 release files

7.3.0

2 release files

7.2.0

2 release files

7.1.0

2 release files

7.0.1

2 release files

7.0.0

2 release files

6.2.0

2 release files

6.1.0

2 release files

6.0.3

2 release files

6.0.2

2 release files

6.0.1

2 release files

6.0.0

2 release files

5.1.1

2 release files

5.1.0

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.14.2

2 release files

4.13.2

2 release files

4.13.1

2 release files

4.13.0

2 release files

4.12.0

2 release files

4.11.6

2 release files

4.11.5

2 release files

4.11.4

2 release files

4.11.3

2 release files

4.11.2

2 release files

4.11.1

2 release files

4.9.0

2 release files

4.8.3

2 release files

4.8.2

2 release files

4.8.1

2 release files

4.8.0

2 release files

4.7.5

2 release files

4.7.4

2 release files

4.7.3

2 release files

4.7.2

2 release files

4.7.1

2 release files

4.7.0

2 release files

4.6.5

2 release files

4.6.4

2 release files

4.6.3

2 release files

4.6.2

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.0

2 release files

4.4.0

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.9.0

2 release files

3.8.3

2 release files

3.8.2

2 release files

3.8.1

2 release files

3.8.0

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.4

2 release files

3.3.3

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.5

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

0.0.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