A Go package that automatically generates beautiful terminal UIs from annotated functions using Charm libraries.
Charmer is a Go package that automatically generates Terminal User Interfaces (TUIs) from your Go functions. Powered by Charm libraries, it transforms annotated functions into beautiful, navigable command-line interfaces without the hassle of UI implementation.
@Charmgo get github.com/ImGajeed76/charmer/pkg/charmer@latest
main.go://go:generate go run github.com/ImGajeed76/charmer/tools/generate
package main
import (
"your-project/internal/registry"
"github.com/ImGajeed76/charmer/pkg/charmer"
)
func main() {
charmer.Run(registry.RegisteredCharms)
}
go generate
If you didn't already create a
charmsdirectory, the generate command will create one for you with a samplegreeting.gofile.
go generate
go run main.go
Or build an executable:
go build
For detailed usage instructions and examples, visit our documentation.
Charmer uses a annotation-based approach to create TUIs:
@Charm annotations to your functions@Title and @Description (Descriptions can be multiline)go generate to create the TUI structureyour-project/
├── main.go
└── charms/
├── greeting.go
└── other_commands.go
⚠️ Early Alpha Stage
This project is currently in early development. Features and APIs may change significantly. The current version might not be fully functional as package publishing is still being configured.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
🌟 Purpose: Simplifying the creation of beautiful terminal utility applications, one function at a time.
⚠️ Note: This is an alpha release. Expect changes and improvements as the project evolves.
Need help? Check our documentation or open an issue on GitHub.
Rewriting TFUtils in Go for better distribution and performance — and building the Charmer library along the way to make TUI-based CLI tools easier for everyone.
Charmer is a Go library that takes annotated functions and automatically builds a navigable TUI around them — removing the need to manually implement the UI for command-line tools.