Table of Contents
I wanted a simple python package to make my click app's help more readable.
Since writing this package the more opinionated rich-click has been written. If that output is more your speed, go check it out! This project aims to provide a slightly different API and set of features.
with pip:
pip install click-rich-help
with conda/mamba:
conda install -c conda-forge click-rich-help
As of v22.1.0
you may no longer generate styles using named args.
At a minimum you should apply StyledGroup
to your click
group.
If you have only one Command
or Multicommand
you may also use the included StyledCommand
or StyledMultiCommand
.
import click
from click_rich_help import StyledGroup
@click.group(
cls=StyledGroup,
)
def cli():
pass
import click
from click_rich_help import StyledCommand
@click.command(
cls=StyledCommand,
)
def cmd():
pass
See the documentation for more info
To non-interactively preview the included example module in your own terminal you can run
W/ click-rich-help
and curl
curl -s https://raw.githubusercontent.com/daylinmorgan/click-rich-help/main/scripts/example.sh | bash
You can also run it yourself if you have installed click-rich-help
. Which you should!
python -m click_rich_help.example -h
To contribute please utilize poetry
and pre-commit
.
optionally manage python installation with conda
:
conda create -p ./env python poetry
Then follow the below steps
- Fork the Project
- Install the package and dev dependencies w/poetry(
cd click-rich-help; poetry install
) - Create your Feature Branch (
git checkout -b feat/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Run the tests (
mypy click_rich_help; py.test tests
) - Push to the Branch (
git push origin feat/AmazingFeature
) - Open a Pull Request