Open-Source Wikis

/

Bubble Tea

/

By the numbers

charmbracelet/bubbletea

By the numbers

Data collected on 2026-04-30 against commit 640d8793 on main.

A quantitative snapshot of the codebase. Numbers come from git log, wc -l, and find against the working tree.

Size

Metric Value
Go source files (whole repo) 110
*_test.go files 7
Lines of Go in the root tea package 5,584
Top-level Go files 39
Files under examples/ 69
Files under tutorials/ 4 (basics, commands × main.go, plus shared go.mod/go.sum)
Total git tags 79 (v0.1.0v2.0.6)
Total commits on main 1,861
Bot-attributed commits (Co-author + author scan) ~107 (5.7%)
xychart-beta horizontal
    title "Lines per source file in the tea package"
    x-axis ["tea.go", "cursed_renderer.go", "key.go", "tea_test.go", "screen_test.go", "options.go", "commands.go", "mouse.go", "tty.go", "exec.go"]
    y-axis "Lines"
    bar [1439, 854, 371, 651, 205, 168, 175, 144, 136, 129]

tea.go and cursed_renderer.go together account for ~41% of the package.

Activity

Window Commits
Last 90 days ~95
Last 12 months ~700
Since v2 work began (Sep 2024) ~1,000
All time 1,861

Recent monthly cadence (commits per month):

xychart-beta horizontal
    title "Commits per month, last year"
    x-axis ["2025-05","2025-06","2025-07","2025-08","2025-09","2025-10","2025-11","2025-12","2026-01","2026-02","2026-03","2026-04"]
    y-axis "Commits"
    bar [41, 35, 36, 21, 34, 77, 67, 14, 3, 29, 12, 19]

October 2025 was the busiest month in the last year, driven by v2 RC stabilization and the 60+ example refactors.

Hotspots (last 90 days)

Files with the most commits in the last quarter:

File Recent activity
tea.go core runtime updates, signal handling, suspend fixes
cursed_renderer.go tab stops, hard-tab optimization, wide char fixes
examples/** broad sweep to migrate to v2 APIs
key.go / keyboard.go extended keyboard enhancements (#1626)
go.mod / examples/go.mod dependabot bumps for ultraviolet, lipgloss, colorful

Bot attribution

A scan of git authors found 107 commits authored by bot accounts (dependabot[bot], github-actions[bot], factory-droid[bot], etc.) out of 1,861 total — about 5.7%. This is a lower bound; AI-assisted commits made by humans (e.g. via inline editor tools) leave no trace in git history.

The largest bot contributor is dependabot[bot] with 99 commits, followed by github-actions[bot] with 8.

Complexity

Subsystem Approx LoC Highlights
Runtime (tea.go) 1,439 Run, eventLoop, handleCommands, handleSignals, recovery
Renderer (cursed_renderer.go) 854 Cell-buffer diffing, alt screen, sync output, mouse modes
Tests (tea_test.go, screen_test.go, options_test.go, etc.) ~1,400 combined golden file comparisons via x/exp/golden
Public API surface ~30 exported types and ~50 exported funcs in the root package
Examples sub-module 66 demo programs Each is a self-contained main package

The rest of the files in the package average around 80 LOC.

Dependencies

The library declares 8 direct dependencies in go.mod. The full closure (with indirect) is 17 modules — see reference/dependencies.md.

Test-to-code ratio

The root package has 7 _test.go files with about 1,400 lines of test code against ~4,200 lines of non-test code, giving roughly a 1:3 test-to-code ratio. Coverage is uploaded to Codecov via .github/workflows/coverage.yml.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

By the numbers – Bubble Tea wiki | Factory