click-help-colors is a Python library that provides colorization for help messages in Click, a popular library for creating command-line interfaces. It allows users to customize the colors of headers, options, and custom elements within their CLI's help output, enhancing readability and user experience. The current version is 0.9.4. Its release cadence is irregular, with updates typically driven by compatibility requirements with new Click versions or feature enhancements.
pip install click-help-colorsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to apply colored help messages to both a Click group and a subcommand using `HelpColorsGroup` and `HelpColorsCommand`. It sets global header and option colors for the group, and then overrides or adds custom option colors for `command1`.
Upgrade `click-help-colors` to 0.9.0 or higher: `pip install --upgrade click-help-colors`.
Ensure your project uses Python 3.6 or a more recent version.
Double-check that the keys in `help_options_custom_colors` precisely match the option strings defined in your Click commands.
Upgrade `click-help-colors` to its latest version to ensure compatibility with your installed `Click` version: `pip install --upgrade click-help-colors`
Install the library using pip: `pip install click-help-colors`
Ensure you are running in a TTY-enabled terminal. If running in a script or CI, you might need to explicitly enable colors using `FORCE_COLOR=1` environment variable, or configure `click-help-colors` if it provides an option to force colors regardless of TTY detection.