Skip to main content

click plugin to show the command tree of your CLI

Project description

click-command-tree

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

Installation

pip install click-command-tree

This is tested against Python versions 3.8 - 3.12 and (latest major release) click versions 5.x, 6.x, 7.x, 7.1.x, 8.0.x, and 8.1.x.

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              show the command tree of your CLI


↪ python example.py tree
root
├── command-group
│   └── nested-command
├── standard-command
└── tree - show the command tree of your CLI

Releasing:

  1. update __version__ variable, and in setup.py
  2. git commit new version
  3. make publish-dist

Project details


Download files

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

Source Distribution

click_command_tree-1.2.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

click_command_tree-1.2.0-1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file click_command_tree-1.2.0.tar.gz.

File metadata

  • Download URL: click_command_tree-1.2.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.18

File hashes

Hashes for click_command_tree-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3e7f5db9f3eccc2eccab40f7979355efe6d5123c958b748dee9c242a38364d6c
MD5 0f841d8408151bb8ced250449175822a
BLAKE2b-256 9547fd73ca0ba632a9c45610839a493825834dd74fdc9e2e2d1ffc6416932161

See more details on using hashes here.

File details

Details for the file click_command_tree-1.2.0-1-py3-none-any.whl.

File metadata

File hashes

Hashes for click_command_tree-1.2.0-1-py3-none-any.whl
Algorithm Hash digest
SHA256 5213397dc01241db0e7757d34363cd74161027c6141d75973bc1ae65b659449f
MD5 2b1a3d4b28208a27aacd14494e7037fd
BLAKE2b-256 e1986f560302c8d41bfeb22a9f6d7291ab1687386bae34636e5756aaa527c4b4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page