https://github.com/kungfusheep/glyph
declarative TUI library for Go
https://github.com/kungfusheep/glyph
go-framework go-library go-tui go-ui golang golang-framework golang-library golang-package
Last synced: 2 months ago
JSON representation
declarative TUI library for Go
- Host: GitHub
- URL: https://github.com/kungfusheep/glyph
- Owner: kungfusheep
- License: apache-2.0
- Created: 2026-01-25T21:00:46.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2026-03-19T18:40:02.000Z (3 months ago)
- Last Synced: 2026-03-20T09:10:41.766Z (3 months ago)
- Topics: go-framework, go-library, go-tui, go-ui, golang, golang-framework, golang-library, golang-package
- Language: Go
- Homepage: https://useglyph.sh
- Size: 24.7 MB
- Stars: 19
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - kungfusheep/glyph - declarative TUI library for Go (Go)
README
# glyph
Declarative terminal UI framework for Go. **[useglyph.sh](https://useglyph.sh)**

```golang
VBox.Border(BorderDouble).Title("SYS").FitContent()(
If(&online).
Then(Text("● ONLINE")).
Else(Text("● OFFLINE").FG(Red)),
HRule(),
Leader("CPU", &cpu),
Leader("MEM", &mem),
Sparkline(&history),
)
```
- **Declarative.** UI is a tree of typed values; glyph compiles the layout and renders each frame.
- **Flex layout.** VBox/HBox with grow, gap, borders, and cascading styles.
- **Components.** Lists, tables, inputs, fuzzy filtering, sparklines, tabs, tree views, overlays, vim bindings, theming.
- **Your data, directly.** Pass a pointer; glyph reads the current value every update.
## Demos
Run any of the included demos to see the framework in action:
| Demo | Description |
|------|-------------|
| `go run ./cmd/hero` | The hero screenshot above |
| `go run ./cmd/todo` | Todo app with checklist |
| `go run ./cmd/glyph-fzf` | Fuzzy finder with FilterList |
| `go run ./cmd/happypath` | Basic layout patterns |
| `go run ./cmd/tabledemo` | AutoTable showcase |
| `go run ./cmd/widgetdemo` | Custom widget examples |
| `go run ./cmd/jumpdemo` | Vim-style jump labels |
| `go run ./cmd/routing` | Multi-view navigation |
| `go run ./cmd/minivim` | Full text editor |
| Loads more... | |
## Requirements
Go 1.25 or later. macOS and Linux only; Windows support is on the roadmap.
## Install
```bash
go get github.com/kungfusheep/glyph
```
## Quick start
```go
package main
import . "github.com/kungfusheep/glyph"
func main() {
app := NewApp()
app.SetView(Text("Hello, terminal!")).Run()
}
```
## State
The core is stable and has been used to build real things. The API covers the full range of what a TUI framework needs. Pre-1.0 because the surface is still under evaluation; parts of it can be better still, and 1.0 means committing to it.
## Docs
Full documentation, API reference, and getting started guide at **[useglyph.sh](https://useglyph.sh)**.
## License
Apache-2.0. See [LICENSE](./LICENSE) for details.