5745
Sc
sacenox.github.io / files
sacenox.github.io / _posts / 2026-04-09-announcing-mini-coder-0-5-x-the-tui-era-is-here.md
6.0 KB
1--- 2layout: post 3title: announcing-mini-coder-0-5-x-the-tui-era-is-here 4description: mini-coder 0.5.0 is on npm with a full TUI rewrite, a cleaner core, and cel-tui underneath it all. 5--- 6 7# Announcing mini-coder 0.5.x — The TUI Era Is Here 8 9[Last time](/posts/two-weeks-195-commits-a-tui-framework-and-a-roguelike/) I said mini-coder was getting a spec-driven refactor. That turned into the biggest rewrite the project has had so far. `mini-coder@0.5.0` is now on npm, and this is the version that finally feels like the product I wanted on day one. 10 11```bash 12bun i -g mini-coder && mc 13``` 14 15--- 16 17## It started as a Ralph loop and a dare 18 19mini-coder began with one extremely normal prompt: 20 21> "Make a coding agent for the terminal cli, use tmux to verify it's done. Say DONE when you have a working application." 22 23That was the seed. No product plan. No brand deck. Just "give the agent shell access, make it useful, and prove it in tmux." 24 25The funny part is that this origin still explains the project better than any polished mission statement. mini-coder was always supposed to be a sharp terminal tool first, not a chatbot wearing a CLI costume. 26 27--- 28 29## The no-TUI era was fast, useful, and increasingly cursed 30 31For a while, the no-TUI approach was the point. Keep it shell-like. Keep it append-only. Keep the interface out of the way. 32 33Then scope creep showed up with a baseball bat. 34 35Sessions, skills, provider discovery, OAuth, MCP, shell integration, markdown streaming, `mc-edit`, web search, more commands, more edge cases. The original architecture kept accepting all of it right up until it very much did not. 36 37A lot of that pain ended up in provider glue. The old codebase talked directly to a pile of provider SDK packages and spent way too much energy on model lists, OAuth weirdness, compatibility quirks, and "why does this provider almost match the others except for the important parts" debugging. The git history from late March is basically a little diary of that phase: add OAuth, align provider discovery, fix teardown, remove Anthropic OAuth, fix another provider edge case, keep moving. 38 39It shipped, but it was fragile. One feature would land and two unrelated parts would start making concerning noises. By `v0.4.1`, mini-coder was good enough to use every day and annoying enough to rewrite. 40 41--- 42 43## Then the side quest ate the roadmap 44 45While working on the rewrite I hit the same wall over and over: terminal UI code is miserable when you're hand-gluing ANSI, input handling, layout math, scrolling, and Unicode width fixes together. 46 47So naturally I did the reasonable thing and built a whole new framework. 48 49That's **[cel-tui](https://github.com/sacenox/cel-tui)**. It started as infrastructure for mini-coder and quickly turned into its own project: declarative components, flexbox-ish layout, differential rendering, proper text measurement, a focus system, and keyboard input that treats the terminal a little more like the platform it deserves to be. 50 51The inspiration was basically "what if building a terminal app felt a bit more like building a web app, but without dragging a browser into it?" Compose small pieces. Keep state external. Let layout be layout. Re-render cleanly. 52 53It was supposed to be a side quest. It is now on npm too, and mini-coder is not the only thing using it anymore. So that escalated nicely. 54 55--- 56 57## 0.5.x is the clean break 58 59On April 4 I did the scary version of "refactor": `feat: clean rewrite — add spec.md, reset repo for v2`. 60 61Since `v0.4.1`, mini-coder picked up **81 commits** and the diff from `v0.4.1` to `v0.5.0` touched **217 files**. Under the hood, this is a much simpler system than the one it replaced. 62 63A few big shifts: 64 65- **Real TUI, not terminal glue** — conversation log, tool blocks, diff previews, overlays, multiline input, and a status bar built on cel-tui 66- **Provider handling via pi-ai** — less bespoke SDK babysitting, more time spent on actual agent behavior 67- **Smaller core tool surface** — `shell`, `edit`, and `readImage`, with plugins for extras instead of turning core into a junk drawer 68- **Spec-driven rebuild** — the product has an explicit shape now, which turns out to be useful when you're trying not to reinvent it every three days 69- **Headless mode** — `mc -p "..."` now works cleanly for scripts and benchmark harnesses too 70 71This version feels more focused. Fewer weird historical accidents. More deliberate product. 72 73--- 74 75## What's in the new TUI era 76 77The headline isn't just "it looks nicer now," though it does. The important part is that the UI and the architecture finally agree about what mini-coder is. 78 79The current `0.5.x` release has: 80 81- streaming markdown conversation rendering 82- interactive `/model`, `/session`, `/help`, `/login`, `/logout`, `/new`, `/fork`, `/undo`, `/reasoning`, `/verbose`, and `/effort` 83- persistent settings and session history 84- image and skill input flows 85- Ctrl+R prompt history search 86- cleaner status reporting, including tone-based context and effort hints 87- a much flatter repo and test surface than the pre-rewrite codebase 88 89In other words: still small, still fast, but no longer held together by optimism and ANSI escape codes. 90 91--- 92 93## By the numbers 94 95| Stat | Value | 96|------|-------| 97| Days from first commit to `v0.5.0` | 48 | 98| Total mini-coder commits | 658 | 99| Commits since `v0.4.1` | 81 | 100| Rewrite diff | 217 files changed | 101| cel-tui commits so far | 102 | 102| mini-coder npm version | `0.5.0` | 103| cel-tui npm version | `0.5.0` | 104| Times a "quick fix" became a new library | At least 1 | 105 106--- 107 108## Try it 109 110mini-coder is on npm right now: 111 112```bash 113bun i -g mini-coder && mc 114``` 115 116If you've tried an older version, this is the one I'd recommend coming back to. It's closer to the original idea: a coding agent that lives in the terminal, uses the terminal properly, and gets out of your way when it's doing its job. 117 118And yes, it still traces back to that first dumb-beautiful Ralph loop prompt in tmux. Some ideas are good enough to survive a full rewrite. 119 120--- 121 122*GitHub: [sacenox/mini-coder](https://github.com/sacenox/mini-coder) · [sacenox/cel-tui](https://github.com/sacenox/cel-tui)*