Command Tree’s documentation¶
The command-tree is a lightweight framework to build multi level command line interfaces by using the python builtin argparse module.
- The main objectives are:
- Use as litle as possible code to build the tree, but preserve the argparse flexibiltiy.
- The class and function structure must looks as the cli tree.
- Decorators, decorators everywhere. We love decorators, so we use as often as possible.
To understand how to use it see this example first: Basic example. This page contains an example implemented in 2 ways: one with argparse and one with command-tree.
There is a page where we dissected the basic command-tree example and add a lot of comment to explains the code: Basic example with a lot of comments