Open-Source Wikis

/

Bubble Tea

/

Systems

charmbracelet/bubbletea

Systems

The Bubble Tea library is a single Go package, but internally it has four clearly separable subsystems. This section documents each one in depth.

Subsystem Primary file(s) What it owns
Program runtime tea.go The Program struct, the event loop, signal/resize/command goroutines, terminal lifecycle, panic recovery
Cursed renderer cursed_renderer.go, renderer.go, nil_renderer.go Cell-buffer diffing, alt screen / mouse / focus mode toggles, ANSI emission, FPS ticker
Input handling input.go, tty.go, key.go, keyboard.go, mouse.go, paste.go, focus.go, clipboard.go, mod.go Reading raw escape sequences, translating them into typed tea messages, supporting the Kitty keyboard protocol
Commands commands.go, parts of tea.go Cmd, Batch, Sequence, Tick, Every, Quit, Suspend, Interrupt, Println/Printf

Each system is small enough to fit in a single file but rich enough to deserve its own dedicated page in this wiki. The cross-system contract is the chan Msg used by the event loop — every subsystem either produces messages into it or transforms model state in response to them.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Systems – Bubble Tea wiki | Factory