charmed-ecosystem
Map of the Charm (charmbracelet) terminal stack and how the pieces fit: which library to reach for (Bubble Tea, Bubbles, Lip Gloss, Huh, Glamour, Log, Wish, Harmonica) or which CLI (gum, vhs, glow, freeze, mods, crush), the v2 charm.land import paths and pinned versions, the dependency order, how the libraries hand data to each other, and a consolidated v1 to v2 migration checklist. Use when starting a TUI or terminal project in Go, choosing a Go TUI stack, deciding between Charm libraries, or planning a charmbracelet v1 to v2 upgrade. For any single library's API use its own charmed-* skill.
tpscloud · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add tpscloud/charmedimsure --skill charmed-ecosystem技能说明
name: charmed-ecosystem description: "Map of the Charm (charmbracelet) terminal stack and how the pieces fit: which library to reach for (Bubble Tea, Bubbles, Lip Gloss, Huh, Glamour, Log, Wish, Harmonica) or which CLI (gum, vhs, glow, freeze, mods, crush), the v2 charm.land import paths and pinned versions, the dependency order, how the libraries hand data to each other, and a consolidated v1 to v2 migration checklist. Use when starting a TUI or terminal project in Go, choosing a Go TUI stack, deciding between Charm libraries, or planning a charmbracelet v1 to v2 upgrade. For any single library's API use its own charmed-* skill." license: "MIT"
The Charm ecosystem
This skill routes to the per-library charmed-* skills and their examples, which build against the pinned modules.
Workflow
- Match the task to a row in "Which library" below and note the skills it names.
- Check the project's
go.modagainst "Import paths". Keep pre-v2 paths unless the user asks to migrate. - Add the pinned versions with the
go getcommand below. - Open the per-library skill for API detail and start from the example it links.
- Run
go test ./...in the application module. On a type mismatch between Charm libraries, rungo list -m alland look for a v1 and v2 mix of the libraries that share types.
Import paths
| Library | Import | Skill |
|---|---|---|
| Bubble Tea | charm.land/bubbletea/v2 (alias tea) | charmed-bubbletea |
| Bubbles | charm.land/bubbles/v2/<component> | charmed-bubbles |
| Lip Gloss | charm.land/lipgloss/v2 (+ /table, /tree, /list, /compat) | charmed-lipgloss |
| Huh | charm.land/huh/v2 (+ /spinner) | charmed-huh |
| Glamour | charm.land/glamour/v2 (+ /ansi, /styles) | charmed-glamour |
| Log | charm.land/log/v2 | charmed-log |
| colorprofile | github.com/charmbracelet/colorprofile | used by the above |
| Harmonica | github.com/charmbracelet/harmonica | spring animation, used by progress |
| Wish | charm.land/wish/v2 | SSH apps; orientation only, not pinned or covered |
For Bubble Tea, Bubbles, Lip Gloss, Huh, Glamour, and Log, the older
github.com/charmbracelet/<name> paths belong to the pre-v2 APIs.
This rule does not apply to colorprofile or Harmonica, which keep their
GitHub module paths. Two major versions can coexist in one binary as
separate modules, but the libraries that share types (Bubble Tea, Bubbles,
Huh, Lip Gloss) have to move together: a v1 lipgloss.Style does not
satisfy a v2 signature. A v2 Log or Glamour needs v2 Lip Gloss.
Pinned versions
Verified on 2026-10-12 and pinned in the example module, which also pins colorprofile v0.4.3 and Harmonica v0.2.0. From an existing application module, select the tested core UI versions with:
go get charm.land/bubbletea/v2@v2.1.0 charm.land/bubbles/v2@v2.2.1 \
charm.land/lipgloss/v2@v2.0.6 charm.land/huh/v2@v2.0.3 \
charm.land/glamour/v2@v2.0.1 charm.land/log/v2@v2.0.1
Which library
A full interactive program (panes, navigation, live data). Bubble Tea for the loop, Bubbles for the widgets, Lip Gloss for layout and color. Start from the compose or fullscreen example in charmed-bubbletea.
A CLI that asks a few questions then does work. Huh alone. Run the form, then a Huh spinner around the work. No Bubble Tea code needed.
Questions inside a larger TUI. Huh embedded as a bubble; see the embedded example in charmed-huh.
Pretty output from a non interactive command. Lip Gloss only:
styles, tables, trees, printed with lipgloss.Println. Add Glamour if the
content is Markdown. Add Log for the logging.
A shell script that needs prompts. gum (charmed-gum). Same widgets, no Go.
A demo GIF for the README. vhs (charmed-vhs).
Serve the TUI over SSH. Wish wraps a Bubble Tea program per
connection; pass tea.WithEnvironment(session.Environ()) so color
detection uses the client's terminal.
Animation. Harmonica springs; Bubbles' progress bar already uses it.
For custom motion, tick with tea.Tick and step the spring on each tick.
How they fit together
ultraviolet, x/ansi, colorprofile terminal I/O, escape codes, profiles
│
Bubble Tea ◄──── Lip Gloss loop and rendering ◄── styles, layout
│ │
Bubbles │ widgets styled by Lip Gloss
│ │
Huh ◄────────────┘ forms built from Bubbles
Glamour ───► Lip Gloss Markdown to ANSI, printed via Lip Gloss
Log ─────► Lip Gloss styled log lines
Data fl
阅读完整来源 ↗