Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

click-command-tree

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

click-command-tree

click plugin to show the command tree of your CLI

  • 1.2.0
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc