termui
What it is
Section titled “What it is”termui is a Go library for terminal dashboards built on termbox-go. Where Bubble Tea gives you the runtime + event model and Lip Gloss gives you styling primitives, termui gives you the widget catalog: prebuilt BarChart, Gauge, Sparkline, Plot (line/scatter), Table, Tabs, Paragraph, List, Tree, and a braille-rendered canvas for sub-cell graphics. Layout is either an explicit grid (relative cells) or absolute (x/y/w/h coordinates). The library handles keyboard, mouse, and resize events through a single channel-based event loop.
Key takeaways for KN-86
Section titled “Key takeaways for KN-86”- Widget catalog as a reference inventory. Even if KN-86 doesn’t adopt termui directly, the list of widgets termui ships with — BarChart, Gauge, Sparkline, Plot, Table, Tabs, Paragraph, List, Tree, Canvas — is the right baseline for what NoshAPI (
docs/adr/ADR-0005) should expose to cart Lisp as drawing primitives. Cart authors shouldn’t be re-implementing a gauge fromtext-puts; the runtime should expose one. - Sparkline + gauge are the two most-undersized-in-the-existing-spec widgets. Both are called out across batches 1–3 as aspirational (Batch 1: NetWatch sparklines, PulseDeck visualizers; Batch 3: AetherTune FFT bars). termui’s sparkline implementation is a directly portable reference algorithm — a one-character-wide vertical column whose height encodes a normalized value, drawn with either block-element glyphs or braille.
- Braille canvas as the sub-cell escape hatch. Same approach Perkins (../inspiration/perkins.md) uses: U+2800–U+28FF braille glyphs to render a 2×4 sub-grid per cell. termui exposes this as a
Canvaswidget with a small drawing API. KN-86 should sanction the same pattern in NoshAPI (already a promote-to-spec item in features-matrix.md). - Grid layout vs. absolute layout — pick the grid. termui supports both; the relative grid is the right model for KN-86’s 80×25 cell grid. Same conceptual model as Lip Gloss’s
JoinHorizontal/JoinVertical/Place. - Event channel as the runtime backbone. Channel-based events on top of a single goroutine. Bubble Tea generalizes this with the Elm-architecture
Msgtaxonomy (../prototype/bubble-tea.md); termui is the simpler precedent.
No representative image embedded — termui is a library and the value here is the widget catalog, not a single hero shot. (Per the prompt, images are downloaded only for visual sources.)
- Cross-link bubble-tea.md and lip-gloss.md — the recommendation in the Batch-3 synthesis is Bubble Tea + Lip Gloss as the primary stack; termui is the widget-inventory reference (what to expose through NoshAPI), not a substrate competitor.
- Cross-link blessed-contrib.md — the JS equivalent with an even bigger widget catalog plus a carousel layout idea that termui doesn’t have.
- Cross-link tuibox.md — the C-core minimalist alternative; complements termui’s “prebuilt widgets” with “build your own.”