Bubble Tea
Elm-inspired TUI (Terminal UI) framework for Go from Charmbracelet. Uses a Model-Update-View architecture where state is immutable and UI is a pure function of state. Powers tools like GitHub CLI and Charm's own suite. Composable with Lip Gloss for styling and Bubbles for pre-built components (spinners, text inputs, list, viewport).
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Terminal UI library — no network access, no security concerns.
⚡ Reliability
Best When
Building interactive Go CLI tools with forms, menus, or real-time terminal displays.
Avoid When
Your CLI is non-interactive or you need cross-language TUI support.
Use Cases
- • Build interactive terminal UIs for Go CLI tools with keyboard navigation, forms, and dynamic updates
- • Create dashboard-style terminal applications with multiple panes using Bubble Tea's viewport and list components
- • Implement interactive configuration wizards or onboarding flows in Go CLI tools
- • Build real-time terminal dashboards that update based on external events or data streams
- • Create games or interactive demos in the terminal with Bubble Tea's event-driven update loop
Not For
- • Simple non-interactive CLI scripts — use cobra/flag for argument parsing without TUI overhead
- • Browser-based UIs — Bubble Tea is terminal only; use React/Vue for web UIs
- • Python/Node.js projects — Bubble Tea is Go-only; use Textual (Python) or Ink (Node) for equivalent TUI in those languages
Interface
Authentication
Library — no auth needed.
Pricing
MIT licensed open source library from Charmbracelet.
Agent Metadata
Known Gotchas
- ⚠ Bubble Tea uses the Elm architecture — state MUST be immutable; Update() must return a new Model, never mutate the existing one
- ⚠ Concurrent operations use tea.Cmd (commands) not goroutines — spawning goroutines that modify model state directly will cause race conditions
- ⚠ Terminal size is not available until WindowSizeMsg is received — always handle tea.WindowSizeMsg to set initial width/height
- ⚠ Bubble Tea v1.0 (2024) introduced breaking changes from v0.25 — Init() return signature and WithAltScreen behavior changed
- ⚠ Alt screen mode (tea.EnterAltScreen) clears the terminal on exit — if you need to preserve output, don't use alt screen or save to a log
- ⚠ Programs must call p.Quit() or return tea.Quit from Update — forgetting to handle Ctrl+C will leave the terminal in a broken state
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for Bubble Tea.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-07.