ryanande / battlegrip

Cobra Command UI Magic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to battlegrip

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.

Features

  • Easy 1 line setup
  • Clean meta driven web page
  • Simple form based style command builder

Install

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

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2021 Ryan Anderson.

This project is MIT licensed.

About

Cobra Command UI Magic

License:MIT License


Languages

Language:Go 63.4%Language:HTML 24.9%Language:Makefile 11.7%