charm-tui
Installation
SKILL.md
Charm TUI stack for Go
Build terminal UIs and interactive CLIs in Go with Charm libraries. All
Charm libraries below are on v2 and use the charm.land/<lib>/v2 module path (v1 was
github.com/charmbracelet/<lib>). BubbleZone and Harmonica keep their github.com paths.
Mental model: The Elm Architecture
Bubble Tea is the runtime; everything else plugs into it. A program is one tea.Model:
Init() tea.Cmd— kick off startup work (timers, IO). Returnnilfor none.Update(tea.Msg) (tea.Model, tea.Cmd)— the only place state changes. AMsgarrives (keypress, tick, window resize, custom event), you return a new model and optionally aCmd.View() tea.View— pure render of current state to atea.View(v2 returnstea.View, notstring). Never mutate state here.
Cmd = func() tea.Msg: run side effects off the render loop; their result comes back as a
Msg to Update. This unidirectional loop (Msg → Update → View) is the whole framework.