{"repo":"grindlemire/go-tui","free":true,"listed":false,"github":"https://github.com/grindlemire/go-tui","clone":"git clone https://github.com/grindlemire/go-tui.git","description":"A declarative terminal UI framework for Go.","language":"Go","stars":391,"topics":["golang","tui"],"license":"MIT","category":"cli-tools","readme_excerpt":"Reactive Terminal UIs in Go Define terminal interfaces in .gsx templates with HTML-like syntax and Tailwind-style classes. The compiler generates type-safe Go. The runtime handles flexbox layout, reactive state, and rendering. Guides & API Reference &middot; Examples &middot; Editor Support Pre-1.0 : go-tui is under active development. Some APIs may evolve as the project matures. --- Install Quick look counter.gsx main.go The generate command compiles .gsx files into plain Go source ( gsx.go ) that you can read, debug, and commit. What's in the box - .gsx templates with HTML-like elements and Tailwind-style utility classes, compiled to type-safe Go - Pure Go flexbox layout without CGO: row, column, justify, align, gap, padding, margin, percentage widths, min/max constraints - Generic State[T] with automatic re-rendering, batched updates, and bindings - Struct components with keyboard/mouse handlers, watchers for timers and channels, refs, and a {children...} slot - Modal dialogs with backdrop, focus trapping, and preemptive key handling - Language server, formatter, and tree-sitter grammar for VS Code - Only depends on golang.org/x/{sys,tools} , pure Go from terminal to layout How it works The .gsx compiler runs at build time and produces regular Go files. At runtime, the program builds a tree of tui.Element nodes. The layout engine positions them with flexbox, and a double-buffered renderer diffs the output to minimize terminal writes. Examples The examples/ directory has ru","default_branch":null,"files":null,"tree":[],"storefront":"/r/grindlemire","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/grindlemire/go-tui/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}