piccolo-orm / targ

Python CLI using type hints and docstrings.
https://targ.readthedocs.io/en/latest/index.html
MIT License
20 stars 2 forks source link

Solo mode #2

Closed dantownsend closed 3 years ago

dantownsend commented 3 years ago

Added a solo mode - if a single command is registered with the CLI, then the command name can be omitted.

For example, if we have a command called add, we can call it as follows in solo mode:

python main.py 1 1

Instead of the usual:

python main.py add 1 1

Having this flexibility is useful when converting an existing CLI script to use Targ.

Also added more unit tests and docstrings.