charmbracelet/bubbletea
Fun facts
A few odd or charming bits of trivia uncovered while writing this wiki.
Why "Bubble Tea"?
The Charm ecosystem is built around drink-and-snack metaphors:
- Bubble Tea — the framework you are reading about.
- Bubbles — a sibling library of pre-built TUI components (text input, viewport, list, table) that pair with Bubble Tea. The README links to it prominently.
- Lip Gloss — Charm's styling library.
- Glamour — a Markdown renderer.
- Harmonica — a spring animation library.
The naming is deliberate. The README's footer also includes the multilingual line "Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة" — the same line is preserved verbatim in UPGRADE_GUIDE_V2.md.
"Cursed renderer"
The default renderer is named cursedRenderer. Commit e753b6a (Jan 23 2025) renamed it from a more neutral name with the message "chore: update renederer name to 'cursed'". The lineage is ncurses → "cursed". The typo in the commit message ("renederer") survives in the git log.
Oldest surviving code
The very first commit (bee32ca, Jan 10 2020) introduced the Model interface and the Init/Update/View shape. That interface is still the public contract six years and 1,800+ commits later — only View()'s return type has changed (string → tea.View).
tutorials/basics/main.go — the grocery-list tutorial in the README — has been demonstrating Bubble Tea since mid-2020.
Longest single file
tea.go is 1,439 lines. It defines:
Programand all of its option-honoring methods,- the public
Model,View,Cursor,ProgressBar,KeyboardEnhancements,MouseMode, andProgressBarStatetypes, - the special command sentinels (
Quit,Suspend,Interrupt), Run,eventLoop,handleSignals,handleResize,handleCommands,Println,Printf,- and the panic recovery / shutdown logic.
It is followed closely by cursed_renderer.go at 854 lines.
The retracted version
go.mod contains:
retract v2.0.0-beta1 // We add a "." after the "beta" in the version number.v2.0.0-beta1 was retracted because the maintainers wanted the dot — the canonical name is v2.0.0-beta.1. A small typo, immortalized in the module file.
XXX comments
There are 6 XXX: comments in the code, mostly tagging things that the maintainers want to revisit later. Three of them ask the same question: "Investigate the names of these keys" (around the Kitty keypad and lock-key sections of key.go). One in mod.go notes that "Meta and Super are swapped in the Kitty protocol" relative to XTerm modifiers — a small but real interoperability quirk.
The oldest TODO comment is examples/simple/main_test.go:5 — // TODO: Enable this test again. Its corresponding test has been disabled for some time.
A framework that runs in production
The README enumerates production users including Microsoft (Aztify), NVIDIA (container-canary), AWS (eks-node-viewer), MinIO (mc), Cockroach Labs (CockroachDB CLI), Ubuntu (Authd), Daytona, and Trufflehog. There are over 18,000 dependent projects on GitHub.
Mascot
The Charm bubble-tea cup mascot graces the top of the README and the post-merge social posts. It also turns up as the favicon and project banner image.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.