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:
- update
__version__variable, and insetup.py - git commit new version
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e7f5db9f3eccc2eccab40f7979355efe6d5123c958b748dee9c242a38364d6c
|
|
| MD5 |
0f841d8408151bb8ced250449175822a
|
|
| BLAKE2b-256 |
9547fd73ca0ba632a9c45610839a493825834dd74fdc9e2e2d1ffc6416932161
|
File details
Details for the file click_command_tree-1.2.0-1-py3-none-any.whl.
File metadata
- Download URL: click_command_tree-1.2.0-1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5213397dc01241db0e7757d34363cd74161027c6141d75973bc1ae65b659449f
|
|
| MD5 |
2b1a3d4b28208a27aacd14494e7037fd
|
|
| BLAKE2b-256 |
e1986f560302c8d41bfeb22a9f6d7291ab1687386bae34636e5756aaa527c4b4
|