Pupin is a CLI tool that renders interactive CLI menu based on the provided configuration json. Something like interactive command menu.
Every tree can contain multiple options. Each option can be a subtree or a command. If user selects subtree, subtree options will appear. If user selects command, command will be executed.
To run your custom menu, you need to:
- create a configuration json (see Configuration)
- run
pupin run <config-path>
Nothing special really.
Check config-example.json.
Make sure that your configuration is validated against config-schema.json (you can use jsonschemavalidator).
cd <project-path>
go build .
nano my-config.json
mkdir ~/.pupin
cp pupin my-config.json ~/.pupin
#(name alias whatever you like)
echo "alias ppn='~/.pupin/pupin run ~/.pupin/my-config.json'" >> ~/.zshrc
source ~/.zshrc
It is never a good idea to use a precompiled binary with sensitive data.
Instead, compile your own binaries by running go build .
- runtime json validation
- nonExit flag for commands
- colors for submenus
- tests (doubt it)