A terminal UI for the CLI, still with zero dependencies
The CLI opens a full-screen UI showing what each call cost as it happens, drawn by hand because a key-holding process should not pull a package tree.
The CLI starts immediately because it resolves no dependency tree, and that is the point rather than a detail. A TUI normally means ink or blessed. There is no supply chain between your key and us, so this one is hand-rolled on node:readline's keypress decoder and nine escape sequences.
The reason it exists is not the chat pane
Every tool has a chat pane. What you cannot get anywhere else is the price of the call you just made, pinned under the conversation, and a running total in the corner that moves while you work.
Rows go to the receipt before the transcript when the window is short. You can scroll back for history; you cannot scroll back for a price you never saw.
During a stream there is deliberately no dollar figure at all. Cost is read off the last frame, never computed, so the pane shows elapsed time and characters and says the price arrives with the last frame.
Money is never truncated
At 80 columns the full receipt is 103 cells and does not fit. A naive clip throws away the end of the line, which is where the saving is. So the receipt is three pieces with shorter fallbacks and the layout picks the widest set that fits: $0.004400 cut to $0.004 is not a shorter number, it is a wrong one. Labels drop first, then tokens, then latency, then the saving itself.
The view is a pure function of state and width, which makes "what does this look like at 40 columns" a unit test that reads as text, and makes NO_COLOR and TERM=dumb free — colour depth zero makes the styler the identity function, and one code path draws every case.
The boring cases, which is where a TUI usually breaks
- Piped or redirected: never draws.
echo "hi" | lobstack > out.txtputs the answer, and only the answer, in the file. TERM=dumb: a dumb terminal has no cursor addressing, so a full-screen frame is not a degraded experience, it is garbage. Plain prompt loop, and it says why.- Resize,
Ctrl+C,SIGTERM, an uncaught throw: every exit path ends stdout with reset, show-cursor, leave-alt-screen. Leaving someone in the alt screen with a hidden cursor and raw mode on is the worst thing this program could do.
Mouse reporting is never switched on. It breaks click-to-select in JetBrains and in some tmux configurations, and a process that dies before disabling it leaves your shell reading mouse packets as keystrokes.
The proxy is the part to know about
lobstack proxyPoint Cursor or Aider at the port it prints and every call those tools make appears in the same transcript, with its price, in the same running total as what you type by hand.
Bare lobstack opens the UI only when there is a terminal on both ends and a key already resolves. In a pipeline, in CI, or before init, it prints exactly what it printed before. The five existing commands are unchanged.
Full key bindings and the degradation table are in the CLI docs.
All posts


