thcThought Control

Bubble Tea

Go Elm-architecture TUI framework; v2 adds the Cursed Renderer.

charm.land ↗repo ↗docs ↗v2 announcement ↗What's New in v2 ↗Crush ↗teatest ↗VHS ↗

license
MIT · Bubble Tea, Lip Gloss, Bubbles, VHS are MIT. Crush (Charm's agent) is FSL-1.1-MIT (source-available, converts to MIT later); Fantasy (agent library) is Apache-2.0.
language
Go
backing
Charm (Charmbracelet, Inc.), VC-backed; raised $6M led by Gradient Ventures (reported 2023).
stars
45,371 (as of 2026-10-09)
downloads
Go has no download counts; pkg.go.dev 'Imported by': 14,989 (v1 path) + 961 (charm.land/bubbletea/v2)
latest release
v2.1.0, 2026-10-08
first release
2020-04
borrow

Same philosophy in another language; take its View and messaging ideas, not the library.

Borrow from it: take a specific idea, API or format.

the steelman: the best honest case for it

Bubble Tea is the proof that the Elm Architecture is the right shape for terminal apps: a model value, a pure update over explicit messages, and a view — the exact discipline thc-scene adopts — battle-tested across 25,000+ open-source apps and companies like NVIDIA, GitHub and Slack. v2 went further than any peer on the boring hard parts: an ncurses-grade cell-diffing renderer that cut output by orders of magnitude (decisive over SSH via Wish), full kitty keyboard support, synchronized output, color downsampling and a declarative View that removes terminal-mode bugs. Charm dogfoods it in Crush, a 28k-star coding agent, and surrounds it with Lip Gloss, Bubbles, Glamour, Wish (TUIs over SSH), VHS (scripted terminal recordings) and Fantasy (Go agent library). Its message-driven design makes a control socket almost trivial to add, so agents can be wired in without fighting the framework.

scores
datadriveseeedittimeratetermpxteachmatureopen
UI as data2 scene 5v2 View is declarative, but Model and View are Go code/values, not a wire format
Agent can drive it2 scene 5Program.Send is an in-process API for injecting messages; no external protocol
Agent can see it2 scene 5
Small, targeted edits1 scene 5Messages can target app-defined parts, but nothing generic or id-addressed
Time travel0 scene 0
Live data rate3 scene 5Renderer claims orders-of-magnitude gains with no numbers
Terminal native5 scene 5
Pixel graphics2 scene 4v2 advertises inline images via raw sequences / community libs; no image component in Bubbles found
Teaching2 scene 3Charm's VHS scripts keystrokes into GIF/video demos (separate tool); no in-app tours
Maturity5 scene 1
Openness4 scene 4MIT, but company-controlled

Bubble Tea scene now scene planned

how agents use it

How

Code generation (Charm even ships upgrade guides 'for humans and LLMs'). In-process, Program.Send(msg) lets any goroutine inject messages and teatest drives a program with keys and captures final output. No built-in socket/MCP; external drivers are PTY/tmux-based.

Wiring it in

Because every input is a Msg, adding a control socket that decodes JSON into Msgs and calls Send is straightforward — but each app must do it and must define its own Msg serialization.

Seeing the result

Only the rendered string/frame (teatest golden output) or screen scraping; the Model is an arbitrary Go value with no standard serialization.

Small edits

None generic; the app's Update decides what a message means.

History

None built in, though the Msg log of an Elm app is a natural replay source if the app records it.

In short

Architecturally the friendliest of the code-first frameworks for agents (explicit messages, pure update), but ships no agent surface.

architecture

The Elm Architecture in Go: a Model value with Init() Cmd, Update(Msg) (Model, Cmd) and View(). In v2 View returns a tea.View struct that declares the frame plus terminal modes (alt screen, mouse, bracketed paste, keyboard enhancements, cursor, title) instead of imperative commands. Side effects are Cmds (functions returning Msgs) run by the runtime; external goroutines inject messages with Program.Send. Rendering goes through the 'Cursed Renderer' (ncurses-style cell diffing, synchronized output mode 2026) built on Charm's Ultraviolet primitives; Lip Gloss is pure styling/layout and Bubbles supplies components.

performance

Strong qualitative claims, no published benchmark numbers found.

adoption and upkeep

Adoption

The standard Go TUI framework; Charm claims 25k+ open-source apps, and v2 has powered Crush in production since before release.

Used by: Crush (Charm's AI coding agent, 28.6k stars), Charm says teams at NVIDIA, GitHub, Slack, Microsoft Azure build on it, 'more than 25,000 open-source applications' (Charm)

Maintainability

Funded, steadily maintained, with a strong no-breaking-changes record (v2 was the first break in six years).

Releases: Roughly monthly patches: v2.0.6 2026-04-16, v2.0.7 06-01, v2.0.8 07-03, v2.0.9 08-19, v2.0.10 09-24, v2.1.0 10-08 (v2.0.0 2026-02-24). · Contributors: ~167 (GitHub contributors API incl. anonymous) · Recent: ~21 commits, 18 merged PRs since 2026-07-11 (GitHub API) · Bus factor: medium-high: company-funded team (aymanbagabas, meowgorithm, muesli…), though a few people do most core work

weaknesses
and thc-scene

Overlap

Elm architecture with explicit messages, declarative view, cell-diffing renderer, terminal-first, agent product (Crush) built on it.

What scene would be reinventing

The Elm runtime loop, declarative terminal-mode handling and a diffing renderer — Bubble Tea v2 is a polished, production version of scene's inner loop (in Go).

The gap it leaves

UI as a serializable value over a socket, generic id-addressed patches and readback, data streams bypassing the model, hot-swap upgrade, pixel layer, agent time travel.

What to borrow

  • v2's declarative View struct for terminal modes (alt screen, mouse, keyboard flags, cursor) as fields in scene's JSON root
  • Program.Send semantics: external messages enter the same queue as keys
  • teatest-style golden frames for scene tests
  • VHS tape format as inspiration for scripted, recordable tours
  • OSC 7501 program status as a cheap way to tell the host terminal what scene is doing
sources
  1. GitHub API repos/charmbracelet/bubbletea api.github.com
  2. Charm v2 blog post (2026-02-23) charm.land
  3. What's New in Bubble Tea v2 github.com
  4. v2.1.0 release (OSC 7501) github.com
  5. pkg.go.dev bubbletea (Imported by) pkg.go.dev
  6. charmbracelet/crush (license FSL-1.1-MIT) github.com
  7. charmbracelet/fantasy github.com
  8. teatest pkg.go.dev
  9. Charm raises $6M (r/golang) reddit.com