5745
Sc
sacenox.github.io / files
sacenox.github.io / _posts / 2026-05-12-cel-tui-shipped-and-mini-coder-got-faster.md
5.3 KB
1--- 2layout: post 3title: cel-tui-shipped-and-mini-coder-got-faster 4description: cel-tui grew from yak shave to TUI framework, mini-coder got a rebuild, and a few tiny tools escaped the lab. 5--- 6 7# cel-tui Shipped, mini-coder Got Faster, and the Yak Has a Framework Now 8 9Last time, [mini-coder v1.0 RC was here](/posts/mini-coder-v1-0-rc-is-here-fast-focused-and-ready-to-ship/). Since then I did the perfectly normal engineering thing: I looked at the terminal UI, muttered "I can make this smaller," and accidentally built a framework. 10 11The headline is **cel-tui**: a TypeScript TUI framework built around plain objects, a flexbox-ish layout engine, differential cell-buffer rendering, and Kitty-first keyboard input that behaves nicely in `tmux`. 12 13Naturally, this began as a small yak shave. The yak now has packages, docs, benchmarks, examples, and a streaming syntax tokenizer. Very healthy. Nothing to see here. 14 15## The scoreboard since March 16 17| Project | Commits | What changed | 18| --- | ---: | --- | 19| `cel-tui` | 142 | Born, packaged, benchmarked, and released through package version `0.8.3` | 20| `mini-coder` | 58 | Reworked around the new TUI stack, provider settings, sessions, compaction, and streaming polish | 21| `coder-skills` | 6 | Reusable agent skills, including human-writing and testing practices | 22| `diff-scope` | 5 | A tiny terminal diff viewer built with `cel-tui` | 23| `dotfiles` | 5 | Agent config and shell cleanup | 24| `alfred` | 2 | Early Google Workspace butler skills | 25| **Total** | **218** | Several responsible decisions, probably | 26 27## cel-tui: the terminal UI yak shave 28 29`cel-tui` is the thing I wanted under mini-coder: fast, boring in the right places, and easy for an agent to reason about. The API is functional and declarative: 30 31```ts 32VStack({ height: "100%" }, [ 33 Text("Hello, cel-tui!", { bold: true }), 34 TextInput({ value, onChange }), 35]); 36``` 37 38Under that small surface area is the pile of terminal work you always forget exists until it bites you: 39 40- grapheme-aware width measurement for CJK and emoji 41- flex layout, wrapping, padding, clipping, layers, focus, hit testing, and scrollbars 42- a differential cell buffer renderer 43- Kitty keyboard protocol support with legacy fallbacks 44- uncontrolled focus and scroll, with controlled escape hatches when needed 45- `TextInput` editing shortcuts, cursor stability, bracketed paste, and sane wheel scrolling 46- components like `Button`, `Select`, `Markdown`, `SyntaxHighlight`, `Divider`, and `VDivider` 47 48There is also `@cel-tui/clew`, a stream-first syntax tokenizer that now handles TypeScript highlighting and diff output. Because apparently one package was not enough rope. 49 50## Benchmarks, because vibes are not a profiler 51 52The benchmark suite grew alongside the framework. The headline synthetic case is still pleasantly tiny: an Ink-comparable 80×24 render comes in around **67 µs**, or about **14,900 renders/sec** on the measured machine. 53 54The more useful work was adding real app-shaped benchmarks. Those caught the unglamorous truth: long unvirtualized conversation layout is the actual villain. That led to line-count caching, virtualized scrollback shapes, and a much clearer sense of what mini-coder needs from the renderer. 55 56In other words: the benchmark suite did its job by being rude. 57 58## mini-coder kept moving too 59 60mini-coder did not sit quietly while its UI foundation turned into a project. The recent run added or reworked: 61 62- headless one-shot mode and the interactive TUI loop 63- streaming assistant text, reasoning, tool calls, and tool output 64- settings, env-key providers, custom providers, and OAuth-backed providers 65- session persistence and `/new` 66- context pressure tracking and conversation compaction 67- better prompt/tool reminders 68- a simpler `read` tool 69- a `nono` starter config for isolation-friendly runs 70 71One funny casualty: the `task` tool got removed after benchmarks showed it was underperforming. It is always nice when the profiler does product management. 72 73## Small tools escaped 74 75A few side quests also wandered out of the workshop. 76 77[`diff-scope`](https://github.com/sacenox/diff-scope) is a small terminal git diff viewer built with `cel-tui`. It has staged/unstaged snapshots, diff highlighting, wrapped long lines, a status bar, auto-refresh, and a help modal. It mostly exists to prove the framework can build something real without requiring a blood pact. 78 79[`coder-skills`](https://github.com/sacenox/coder-skills) became a home for reusable agent skills: code review, debugging, programming practices, testing, and human-writing guidance. The pattern is simple: write the workflow once, reuse it everywhere agents can read Markdown. 80 81[`alfred`](https://github.com/sacenox/alfred) is the early digital-butler direction, starting with Google Workspace support. Still small, but useful enough to keep around. 82 83## Try it 84 85For the TUI framework: 86 87```bash 88bun add @cel-tui/core @cel-tui/components 89``` 90 91Docs and source: 92 93- [`cel-tui` on GitHub](https://github.com/sacenox/cel-tui) 94- [`cel-tui` API docs](https://sacenox.github.io/cel-tui/) 95 96For the coding agent: 97 98```bash 99bun add -g mini-coder 100mc 101``` 102 103- [`mini-coder` on GitHub](https://github.com/sacenox/mini-coder) 104 105The next stretch is less glamorous and more important: hardening the APIs, using the real-world benchmarks to keep latency honest, and making sure the tiny tools stay tiny. Famous last words, yes.