Battlegrip is a simple companion library to add a little help to your user experience when using Cobra for Go CLI interactions.
In a nutshell, it streamlines the creation of complex multi-flag commands in a simple web form based UI.
When incorporated into your Go CLI the library, once commanded, will perform the following;
- launch a basic local web server,
- launch your default browser, navigating to the server,
All CLI commands will be displayed, along with ech commands flags in a smooth form based web page. From there you can create your terminal commands in a clean web form + copy paste feature set.
- Easy 1 line setup
- Clean meta driven web page
- Simple form based style command builder
Grab the lib,
go get github.com/ryanande/battlegrip
Import the library into your root command module,
import (
"github.com/ryanande/battlegrip"
...
)
Where you register your commands, simply register the battlegrip command,
rootCmd.AddCommand(battlegrip.UICmd) // battlegrip setup
Now, you can initiate the library just like any other command in your CLI with the ui
command,
./myassembly ui
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2021 Ryan Anderson.
This project is MIT licensed.