Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/igolaizola/webcli

Automatic web UI on top of a golang CLI
https://github.com/igolaizola/webcli

cli golang gui ui web webcli

Last synced: about 1 month ago
JSON representation

Automatic web UI on top of a golang CLI

Awesome Lists containing this project

README

        

# webcli 🌐đŸ–Ĩī¸

**webcli** is a tool to generate an automatic web UI on top of a Golang CLI





## 🚀 Features

- List all commands and subcommands
- Edit the flags of the commands using input fields
- Launch commands in the background
- See the output of the commands in real-time
- List and view the output of all the commands launched
- Load command flags from configuration files
- Save command flags to configuration files

## 🔌 Compatibility

The tool is directly compatible with `github.com/peterbourgon/ff/v3` and `github.com/spf13/cobra` libraries, using `github.com/igolaizola/webcli/pkg/webff` and `github.com/igolaizola/webcli/pkg/webcobra` respectively.

You can also directly use the `github.com/igolaizola/webcli` package and pass your commands as `webcli.Command` to the `webcli.New` function.

## 🕹ī¸ Usage

You can find an example using an `ff` CLI at [cmd/webff/main.go](cmd/webff/main.go), which you can run with:

```bash
go run cmd/webff/main.go
```

You can find an example using a `cobra` CLI at [cmd/webcobra/main.go](cmd/webcobra/main.go), which you can run with:

```bash
go run cmd/webcobra/main.go
```

## 📚 Resources

Resources used to create this project:

- [HTMX](https://htmx.org/)
- [Tailwind CSS](https://tailwindcss.com/)
- [templ](https://templ.guide) - An HTML templating language for Go

## 💖 Support

Please give the repository a star ⭐ if you have found this code helpful.

For any questions, create an issue or ping me at [x.com/igolaizola](https://x.com/igolaizola).