charmbracelet/bubbletea
Glossary
Project-specific terms used throughout the Bubble Tea source and documentation.
| Term | Meaning |
|---|---|
| Alt screen | The terminal's alternate screen buffer. Set View.AltScreen = true to opt in. The renderer toggles it via DEC modes ?1049/?47. |
| Bracketed paste | Terminal feature that wraps pasted text in ESC[200~ … ESC[201~ so apps can distinguish it from typing. Bubble Tea enables it by default; disable with View.DisableBracketedPasteMode = true. |
| Cell buffer | The two-dimensional grid of styled cells that the renderer diffs against to produce minimal output. Implemented by uv.ScreenBuffer from ultraviolet. |
| Cmd | type Cmd func() Msg. An I/O action whose result is delivered back to Update as a Msg. Created by helpers like Tick, Every, Batch, Sequence. |
| Color profile | One of NoTTY, Ascii, ANSI, ANSI256, TrueColor. Detected via colorprofile.Detect and downsampled by the renderer. |
| Cursed renderer | The default renderer (cursed_renderer.go). Named after ncurses-style cell diffing. |
| EnvMsg | A snapshot of the program's environment delivered to Update at startup. Uses WithEnvironment to override the host env (useful for SSH sessions). |
| Event filter | Function set via WithFilter that intercepts every Msg before it reaches Update. Returning nil swallows the event. Used to e.g. veto QuitMsg when a buffer has unsaved changes. |
| FPS | The renderer's tick rate. Defaults to 60 (defaultFPS), capped at 120 (maxFPS). Configurable via WithFPS. |
| Frame | One rendered View. The renderer emits at most one frame per tick. |
| Kitty keyboard protocol | Extended keyboard reporting that exposes alternate keys, key release events, modifier flags, and more. Requested via View.KeyboardEnhancements. See keyboard.go. |
| Layer | Reserved type referenced by View.Content. In v2 each View has a single content string but the type is structured to allow future stacked layers. |
| Model | The user-supplied tea.Model (Init / Update / View). Holds all program state. |
| Msg | tea.Msg = uv.Event. The unit of communication between subsystems and Update. |
| OSC 52 | Operating System Command 52. The escape sequence Bubble Tea uses to read and write the system clipboard. See clipboard.go. |
| Paste mode | See bracketed paste. |
| Program | The tea.Program runtime created by tea.NewProgram. Owns the event loop. |
| Raw mode | Terminal mode where input is delivered byte-by-byte without line buffering or echo. Bubble Tea sets it via term.MakeRaw in tty.go. |
| Renderer | The renderer interface (renderer.go). The library ships cursedRenderer and nilRenderer. |
| Synchronized output | DEC mode 2026. When supported, the terminal buffers all updates between BSU/ESU markers, which prevents tearing. The renderer auto-detects support during startup. |
| Suspend | Sending tea.Suspend (or pressing Ctrl+Z) issues SIGTSTP to the process. The runtime restores the terminal first, then sends ResumeMsg when control returns. |
| TUI | Text/Terminal User Interface. The kind of application Bubble Tea is built to write. |
ultraviolet (uv) |
github.com/charmbracelet/ultraviolet. Charm's shared low-level terminal primitives: input reader, screen buffer, cell renderer, event types. Bubble Tea wraps and re-exports many of these. |
| View | The tea.View struct returned by Model.View(). Declarative description of a frame. |
| Window size | WindowSizeMsg{Width, Height}. Sent on startup and on every SIGWINCH (Unix) or polling check (Windows). |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.