Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: auto-load all subcommand libraries
Prior to this change, every time we added a new sub-command, we had to list the sub-command twice in main.py. Use pkgutil.iter_modules and importlib.import_module to import all the sub-command modules dynamically. This reduces the copy-and-paste boilerplate and makes it easier to scale this tool to more sub-commands.
- Loading branch information