Richly rendered command line interfaces in click.
Documentation · Source Code · Changelog
rich-click is a wrapper around Click that renders help output nicely using Rich.
- Click is a "Python package for creating beautiful command line interfaces".
- Rich is a "Python library for rich text and beautiful formatting in the terminal".
The intention of rich-click is to provide attractive help output from
Click, formatted with Rich, with minimal customization required.
Features
- 🌈 Rich command-line formatting of click help and error messages
- 😌 Same API as Click: usage is simply
import rich_click as click - 🎨 Over 100 themes that can be set by developers and end-users (
export RICH_CLICK_THEME=...) - 💻 CLI tool to run on other people's Click and Typer CLIs (prefix the command with
rich-click) - 📦 Export help text as HTML or SVG
- 🎁 Group commands and options into named panels
- ❌ Well formatted error messages
- 💫 Extensive customization
- 🤖 IDE autocomplete of Click decorators for smooth developer experience
Installation
pip install rich-click
Examples
Simple Example
To use rich-click in your code, replace import click with import rich_click as click in your existing click CLI:
import rich_click as click
@click.command()
@click.option("--count", default=1, help="Number of greetings.")
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""
for _ in range(count):
click.echo(f"Hello, {name}!")
if __name__ == '__main__':
hello()
Screenshot from examples/11_hello.py
More complex example
rich-click has a ton of customization options that let you compose help text however you'd like.
Below is a more complex example of what rich-click is capable of, utilizing themes and panels:
Screenshot from examples/03_groups_sorting.py
Usage
This is a quick overview of how to use rich-click. Read the docs for more information.
There are a couple of ways to begin using rich-click:
Import rich_click as click
Switch out your normal click import with rich_click, using the same namespace:
import rich_click as click
That's it! ✨ Then continue to use Click as you would normally.
See
examples/01_simple.pyfor an example.
Declarative
If you prefer, you can use RichGroup or RichCommand with the cls argument in your click usage instead.
This means that you can continue to use the unmodified click package in parallel.
import click
from rich_click import RichCommand
@click.command(cls=RichCommand)
def main():
"""My amazing tool does all the things."""
See
examples/02_declarative.pyfor an example.
rich-click CLI tool
rich-click comes with a CLI tool that allows you to format the Click help output from any package that uses Click.
To use, prefix rich-click to your normal command.
For example, to get richified Click help text from a package called awesometool, you could run:
$ rich-click awesometool --help
Usage: awesometool [OPTIONS]
..more richified output below..
License
This project is licensed under the MIT license.
Release files for rich-click 1.9.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rich_click-1.9.9.tar.gz | 75.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rich_click-1.9.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 147.8 kB
Release files / rich_click-1.9.9.tar.gz
| Download URL | rich_click-1.9.9.tar.gz |
|---|---|
| Size | 75.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
324cba7513cd4187ee92b2eef21f071714e45be062458c8b157bd7e0c81103e3
|
|
BLAKE2b-256 checksum How to use checksums |
963e5688fdd83aea416de336582a274f2bc8236b5c261b04c11e17bc262786ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 5, 2026.
Transparency logRelease files / rich_click-1.9.9-py3-none-any.whl
| Download URL | rich_click-1.9.9-py3-none-any.whl |
|---|---|
| Size | 71.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
365e7a9d0adb42e41ea832a0a12e02c44c079a26536dee688125eb9814f97274
|
|
BLAKE2b-256 checksum How to use checksums |
b551b2b91aec091e86bc961e5164f00207d89f133cc82b5ddad541d2132ea819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 5, 2026.
Transparency log