Simple subcommand CLIs with argparse
multicommand Simple subcommand CLIs with argparse. multicommand uses only the standard library and is ~100 lines of code (modulo comments and whitespace) Installation pip install multicommand Overview Multicommand enables you to easily write CLIs with deeply nested commands using vanilla argparse. You provide it with a package, it searches that package for parsers (ArgumentParser objects), and connects, names, and converts those parsers into subcommands based on the package structure. Package -> CLI commands/unary/negate.py mycli unary negate … commands/binary/add.py mycli binary […]
Read more