Right now, we hand roll CLI arguments. We allow something like:
hotload PYTHON_MODULE_OR_SCRIPT [--entrypoint ENTRYPOINT_FUNCTION] [--recursive] [--no-clear]
But this isn't reflected in the helptext.
I know we have argparse -- but argparse can feel a bit heavy. I've used https://github.com/babashka/cli a bit recently, and I love how lightweight it is. Essentially, you specify the type of each option. The CLI lib can then return a map of all the options. Argparse might still be the way to go, not sure.
Current helptext output:
$ hotload
Running hotload ...
Usage: hotload SCRIPT
Hotload python script when files on standard input change
Example usage:
find . -name '*.py' | hotload init.py
.py extension for script may be omitted.
Right now, we hand roll CLI arguments. We allow something like:
But this isn't reflected in the helptext.
I know we have argparse -- but argparse can feel a bit heavy. I've used https://github.com/babashka/cli a bit recently, and I love how lightweight it is. Essentially, you specify the type of each option. The CLI lib can then return a map of all the options. Argparse might still be the way to go, not sure.
Current helptext output: