Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

click plugin to show the command tree of your CLI

Project description

click-command-tree

WARNING: This has really only been tested with python3 and click 6 and 7. I plan to do better testing and integrate CI so find all possible versions this can be used with.

click-command-tree is a click plugin to show the command tree of your CLI

Installation

pip install click-command-tree

Example:

from pkg_resources import iter_entry_points

import click
from click_plugins import with_plugins


@with_plugins(iter_entry_points('click_command_tree'))
@click.group()
def root():
    pass


@root.group()
def command_group():
    pass


@command_group.command()
def nested_command():
    pass


@root.command()
def standard_command():
    pass


if __name__ == '__main__':
    root()
↪ python example.py --help
Usage: example.py [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  command-group
  standard-command
  tree

↪ python example.py tree
root
├── command-group
│   └── nested-command
├── standard-command
└── tree

Project details


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_command_tree-1.0.2-py3-none-any.whl (3.6 kB) Copy SHA256 hash SHA256 Wheel py3
click-command-tree-1.0.2.tar.gz (2.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

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