Hacker News new | ask | show | jobs
by CableNinja 692 days ago
I wrote some stuff a while back to try and bridge this kind of issue.

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