logoalt Hacker News

tptacekyesterday at 7:11 PM5 repliesview on HN

This is a tangential point (this post is not really about TUIs; sort of the opposite) and I think lots of people know it already but I only figured it out last week and so can't resist sharing it: agents are good at driving tmux, and with tmux as a "browser", can verify TUI layouts.

So you can draw layouts like this and prompt Claude or Gemini with them, and get back working versions, which to me is space alien technology.


Replies

Kerricktoday at 4:10 PM

I've had a lot of good luck with AI Agents also being able to read and meaningfully interprete .txt and .ansi dumps from RatatuiRuby's TestHelper module and its `assert_snapshots` [0].

For example, it was able to read the ANSI and figure out that a snapshot had changed because an upstream bug properly rendered bold and underline when it hadn't before.

[0]: https://git.sr.ht/~kerrick/ratatui_ruby/tree/trunk/item/lib/...

agavrayesterday at 11:05 PM

This is spot on, I understand very little about how terminal rendering works and was able to build github.com/agavra/tuicr (Terminal UI for Code Review) in an evening. The initial TUI design was done via Claude.

heliumterayesterday at 7:59 PM

Yeah, text was king yesterday, will be tomorrow

eterpsyesterday at 10:02 PM

Would love to hear more about this approach.

show 1 reply
frumplestlatztoday at 9:44 AM

I’ve actually got an MCP server that makes it really easy for Claude to generate key events, wait for changes / wait for stable output / etc, and then take PNG screenshots of the terminal state (including all colors/styling) — which it “views” directly as part of the MCP tool response.

Wish I could open source it; it’s a game changer for TUI development.

show 1 reply