Skip to main content

Colorization of help messages in Click

Project description

Colorization of help messages in Click.

Usage

import click
from click_help_colors import HelpColorsGroup, HelpColorsCommand

@click.group(
    cls=HelpColorsGroup,
    help_headers_color='yellow',
    help_options_color='green'
)
def cli():
    pass

@cli.command()
@click.option('--count', default=1, help='Some number.')
def command1(count):
    click.echo('command 1')

@cli.command(
    cls=HelpColorsCommand,
    help_options_color='blue'
)
@click.option('--name', help='Some string.')
def command2(name):
    click.echo('command 2')
$ python example.py --help
https://raw.githubusercontent.com/r-m-n/click-help-colors/master/examples/1.png
$ python example.py command1 --help
https://raw.githubusercontent.com/r-m-n/click-help-colors/master/examples/2.png
$ python example.py command2 --help
https://raw.githubusercontent.com/r-m-n/click-help-colors/master/examples/3.png

Installation

With pip:

$ pip install click-help-colors

From source:

$ git clone https://github.com/r-m-n/click-help-colors.git
$ cd click-help-colors
$ python setup.py install

Project details


Release history Release notifications

This version
History Node

0.4

History Node

0.3

History Node

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
click-help-colors-0.4.tar.gz (2.7 kB) Copy SHA256 hash SHA256 Source None Oct 4, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page