I wrote a spec: https://gitlab.com/accidentallythecable-public/argstruct-spe...
And additionally, a library to build cli args and flags as well as api data from the same structure: https://gitlab.com/accidentallythecable-public/python-module...
This allows you to build an argstruct file specifying commands, ars, descriptions, etc. You can then run an arbitrary callback against the commands, or use argparser for commandline