Installation

Click Extra is distributed on PyPI.

So you can install the latest stable release with your favorite package manager like pip:

$ pip install click-extra

Installation methods

Easiest way is to install uv, then add click-extra to your project:

$ uv add click-extra

Or to install the demo CLI system-wide with uv tool:

$ uv tool install click-extra

pipx is a great way to install the demo CLI globally:

$ pipx install click-extra

You can install the latest stable release and its dependencies with a simple pip call:

$ python -m pip install click-extra

If you have difficulties to use pip, see pip’s own installation instructions.

Demo CLI

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

$ uvx click-extra
$ uvx click-extra@7.2.0
$ uvx --from git+https://github.com/kdeldycke/click-extra -- click-extra
$ uvx --from file:///Users/me/code/click-extra -- click-extra

This will download and run click-extra, a demo CLI included in the package.

The demo CLI showcases various features of Click Extra, such as enhanced help formatting, colored output, and more.

By default it will display the help message of the demo application:

$ uvx click-extra
Installed 16 packages in 14ms
Usage: click-extra [OPTIONS] COMMAND [ARGS]...

And so you can explore the various possibilities of the demo application, like showing the current version:

$ uvx click-extra --version
Installed 16 packages in 14ms
Click Extra demo, version 7.2.0

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.

Try the library

Now that you have tried the demo application, you can also try the library itself in an interactive Python shell without installing anything on your system:

$ uvx --with click-extra python
Installed 3 packages in 5ms
Python 3.14.0 free-threading build (main, Oct 28 2025, 11:52:40) [Clang 20.1.4 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import click_extra
>>> click_extra.__version__
'7.2.0'
>>>

Default dependencies

This is a graph of the default, main dependencies of the Python package:

        flowchart LR
    click_extra[["`click-extra`"]]

    subgraph primary-deps [Primary dependencies]
        extra_platforms{{"`extra-platforms`"}}
        requests{{"`requests`"}}
        cloup{{"`cloup`"}}
        click_0{{"`click`"}}
        tabulate{{"`tabulate`"}}
        wcmatch{{"`wcmatch`"}}
        tomli{{"`tomli`"}}
        boltons{{"`boltons`"}}
        deepmerge{{"`deepmerge`"}}
    end

    colorama(["`colorama`"])
    typing_extensions(["`typing-extensions`"])
    bracex(["`bracex`"])
    certifi(["`certifi`"])
    charset_normalizer(["`charset-normalizer`"])
    idna(["`idna`"])
    urllib3(["`urllib3`"])
    wcwidth(["`wcwidth`"])

    subgraph ext_hjson [--extra hjson]
        hjson{{"`hjson >=3.1`"}}
    end

    subgraph ext_json5 [--extra json5]
        json5{{"`json5 >=0.12.1`"}}
    end

    subgraph ext_jsonc [--extra jsonc]
        json_with_comments{{"`json-with-comments >=1.2.10`"}}
    end

    subgraph ext_pygments [--extra pygments]
        pygments{{"`pygments >=2.14`"}}
        pygments_ansi_color{{"`pygments-ansi-color >=0.3`"}}
    end

    subgraph ext_pytest [--extra pytest]
        pytest{{"`pytest >=9`"}}
        exceptiongroup(["`exceptiongroup`"])
        packaging(["`packaging`"])
        iniconfig(["`iniconfig`"])
        pluggy(["`pluggy`"])
    end

    subgraph ext_sphinx [--extra sphinx]
        sphinx{{"`sphinx >=8`"}}
        jinja2(["`jinja2`"])
        alabaster(["`alabaster`"])
        babel(["`babel`"])
        docutils{{"`docutils >=0.20`"}}
        imagesize(["`imagesize`"])
        markupsafe(["`markupsafe`"])
        roman_numerals(["`roman-numerals`"])
        snowballstemmer(["`snowballstemmer`"])
        sphinxcontrib_applehelp(["`sphinxcontrib-applehelp`"])
        sphinxcontrib_devhelp(["`sphinxcontrib-devhelp`"])
        sphinxcontrib_htmlhelp(["`sphinxcontrib-htmlhelp`"])
        sphinxcontrib_jsmath(["`sphinxcontrib-jsmath`"])
        sphinxcontrib_qthelp(["`sphinxcontrib-qthelp`"])
        sphinxcontrib_serializinghtml(["`sphinxcontrib-serializinghtml`"])
    end

    subgraph ext_toml [--extra toml]
        tomlkit{{"`tomlkit >=0.13`"}}
    end

    subgraph ext_xml [--extra xml]
        xmltodict{{"`xmltodict >=1`"}}
    end

    subgraph ext_yaml [--extra yaml]
        pyyaml{{"`pyyaml >=6.0.3`"}}
    end

    click_extra ==>|" >=2.32.4 "| requests
    click_extra ==>|" >=8.3.1 "| click_0
    click_extra ==>|" >=3.0.7 "| cloup
    click_extra ==>|" >=2 "| tomli
    click_extra ==>|" >=5 "| extra_platforms
    click_extra ==>|" >=0.10 "| tabulate
    click_extra ==>|" >=10 "| wcmatch
    click_extra ==>|" >=20 "| boltons
    click_extra ==>|" >=1.0.1 "| deepmerge
    sphinx ==> requests
    sphinx ==> pygments
    sphinx --> colorama
    sphinx --> jinja2
    sphinx --> packaging
    sphinx ==> tomli
    sphinx --> alabaster
    sphinx --> babel
    sphinx ==> docutils
    sphinx --> imagesize
    sphinx --> roman_numerals
    sphinx --> snowballstemmer
    sphinx --> sphinxcontrib_applehelp
    sphinx --> sphinxcontrib_devhelp
    sphinx --> sphinxcontrib_htmlhelp
    sphinx --> sphinxcontrib_jsmath
    sphinx --> sphinxcontrib_qthelp
    sphinx --> sphinxcontrib_serializinghtml
    pytest ==> pygments
    pytest --> colorama
    pytest --> exceptiongroup
    pytest --> packaging
    pytest ==> tomli
    pytest --> iniconfig
    pytest --> pluggy
    requests --> certifi
    requests --> charset_normalizer
    requests --> idna
    requests --> urllib3
    click_0 --> colorama
    cloup ==> click_0
    cloup --> typing_extensions
    exceptiongroup --> typing_extensions
    jinja2 --> markupsafe
    extra_platforms ==> pytest
    pygments_ansi_color ==> pygments
    tabulate --> wcwidth
    wcmatch --> bracex
    click_extra -.-> ext_hjson
    click_extra -.-> ext_json5
    click_extra -.-> ext_jsonc
    click_extra -.-> ext_pygments
    click_extra -.-> ext_pytest
    click_extra -.-> ext_sphinx
    click_extra -.-> ext_toml
    click_extra -.-> ext_xml
    click_extra -.-> ext_yaml

    click alabaster "https://pypi.org/project/alabaster/" _blank
    click babel "https://pypi.org/project/babel/" _blank
    click boltons "https://pypi.org/project/boltons/" _blank
    click bracex "https://pypi.org/project/bracex/" _blank
    click certifi "https://pypi.org/project/certifi/" _blank
    click charset_normalizer "https://pypi.org/project/charset-normalizer/" _blank
    click click_0 "https://pypi.org/project/click/" _blank
    click click_extra "https://pypi.org/project/click-extra/" _blank
    click cloup "https://pypi.org/project/cloup/" _blank
    click colorama "https://pypi.org/project/colorama/" _blank
    click deepmerge "https://pypi.org/project/deepmerge/" _blank
    click docutils "https://pypi.org/project/docutils/" _blank
    click exceptiongroup "https://pypi.org/project/exceptiongroup/" _blank
    click extra_platforms "https://pypi.org/project/extra-platforms/" _blank
    click hjson "https://pypi.org/project/hjson/" _blank
    click idna "https://pypi.org/project/idna/" _blank
    click imagesize "https://pypi.org/project/imagesize/" _blank
    click iniconfig "https://pypi.org/project/iniconfig/" _blank
    click jinja2 "https://pypi.org/project/jinja2/" _blank
    click json_with_comments "https://pypi.org/project/json-with-comments/" _blank
    click json5 "https://pypi.org/project/json5/" _blank
    click markupsafe "https://pypi.org/project/markupsafe/" _blank
    click packaging "https://pypi.org/project/packaging/" _blank
    click pluggy "https://pypi.org/project/pluggy/" _blank
    click pygments "https://pypi.org/project/pygments/" _blank
    click pygments_ansi_color "https://pypi.org/project/pygments-ansi-color/" _blank
    click pytest "https://pypi.org/project/pytest/" _blank
    click pyyaml "https://pypi.org/project/pyyaml/" _blank
    click requests "https://pypi.org/project/requests/" _blank
    click roman_numerals "https://pypi.org/project/roman-numerals/" _blank
    click snowballstemmer "https://pypi.org/project/snowballstemmer/" _blank
    click sphinx "https://pypi.org/project/sphinx/" _blank
    click sphinxcontrib_applehelp "https://pypi.org/project/sphinxcontrib-applehelp/" _blank
    click sphinxcontrib_devhelp "https://pypi.org/project/sphinxcontrib-devhelp/" _blank
    click sphinxcontrib_htmlhelp "https://pypi.org/project/sphinxcontrib-htmlhelp/" _blank
    click sphinxcontrib_jsmath "https://pypi.org/project/sphinxcontrib-jsmath/" _blank
    click sphinxcontrib_qthelp "https://pypi.org/project/sphinxcontrib-qthelp/" _blank
    click sphinxcontrib_serializinghtml "https://pypi.org/project/sphinxcontrib-serializinghtml/" _blank
    click tabulate "https://pypi.org/project/tabulate/" _blank
    click tomli "https://pypi.org/project/tomli/" _blank
    click tomlkit "https://pypi.org/project/tomlkit/" _blank
    click typing_extensions "https://pypi.org/project/typing-extensions/" _blank
    click urllib3 "https://pypi.org/project/urllib3/" _blank
    click wcmatch "https://pypi.org/project/wcmatch/" _blank
    click wcwidth "https://pypi.org/project/wcwidth/" _blank
    click xmltodict "https://pypi.org/project/xmltodict/" _blank

    style click_extra stroke-width:3px
    style boltons stroke-width:3px
    style click_0 stroke-width:3px
    style cloup stroke-width:3px
    style deepmerge stroke-width:3px
    style docutils stroke-width:3px
    style extra_platforms stroke-width:3px
    style hjson stroke-width:3px
    style json_with_comments stroke-width:3px
    style json5 stroke-width:3px
    style pygments stroke-width:3px
    style pygments_ansi_color stroke-width:3px
    style pytest stroke-width:3px
    style pyyaml stroke-width:3px
    style requests stroke-width:3px
    style sphinx stroke-width:3px
    style tabulate stroke-width:3px
    style tomli stroke-width:3px
    style tomlkit stroke-width:3px
    style wcmatch stroke-width:3px
    style xmltodict stroke-width:3px

    style primary-deps fill:#1565C020,stroke:#42A5F5
    style ext_hjson fill:#7B1FA220,stroke:#BA68C8
    style ext_json5 fill:#7B1FA220,stroke:#BA68C8
    style ext_jsonc fill:#7B1FA220,stroke:#BA68C8
    style ext_pygments fill:#7B1FA220,stroke:#BA68C8
    style ext_pytest fill:#7B1FA220,stroke:#BA68C8
    style ext_sphinx fill:#7B1FA220,stroke:#BA68C8
    style ext_toml fill:#7B1FA220,stroke:#BA68C8
    style ext_xml fill:#7B1FA220,stroke:#BA68C8
    style ext_yaml fill:#7B1FA220,stroke:#BA68C8

    

Extra dependencies

By default, Click Extra supports TOML configuration files and all standard table formats. Optional extras unlock additional features:

Extra

Install command

Unlocks

hjson

$ pip install click-extra[hjson]

json5

$ pip install click-extra[json5]
  • JSON5 config files: --config app.json5

jsonc

$ pip install click-extra[jsonc]
  • JSONC config files: --config app.jsonc

toml

$ pip install click-extra[toml]

xml

$ pip install click-extra[xml]

yaml

$ pip install click-extra[yaml]

pygments

$ pip install click-extra[pygments]

sphinx

$ pip install click-extra[sphinx]

pytest

$ pip install click-extra[pytest]

Tip

Install all extras at once with:

$ pip install click-extra[hjson,json5,jsonc,toml,xml,yaml,pygments,sphinx,pytest]