Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 533 Bytes

File metadata and controls

22 lines (15 loc) · 533 Bytes

CLI Subcommand Representation

A Python script that recursively prints out a command line program's usage, flags, and subcommands

Usage

python3 extract.py -t COMMAND_NAME -s SUBCOMMAND_NAME

Note: the -s SUBCOMMAND_NAME part is optional

Examples

# Docker top-level overview
python3 extract.py -t git

# Git push details (with placeholders for deeper levels)
python3 extract.py -t docker -s buildx

Note: subcommands of subcommands are displayed as '...' if they exist to avoid extenisve recursion