Skip to content

vterzic/pupin

Repository files navigation

Pupin - Customizable CLI command menu generator

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.

demonstration

Usage

To run your custom menu, you need to:

  • create a configuration json (see Configuration)
  • run pupin run <config-path>

Configuration

Nothing special really.

Check config-example.json.

Make sure that your configuration is validated against config-schema.json (you can use jsonschemavalidator).

Might come in handy

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

❗️Don't trust my binaries

It is never a good idea to use a precompiled binary with sensitive data.

Instead, compile your own binaries by running go build .

TODO

  • runtime json validation
  • nonExit flag for commands
  • colors for submenus
  • tests (doubt it)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages