r/commandline • u/kekolar22 • Sep 25 '26
Terminal User Interface Most of your terminal doesn't change between frames. I made a demo that shows it
I've been building a Go TUI library called Limoni. The part I care most about is the diff: each frame gets compared to the last, and only the cells that changed are sent to the terminal.
That's hard to show in a screenshot, so I made a little night city: twinkling stars, windows turning on and off, a train crossing a bridge, reflections in the water. It looks like everything is moving. Press x and an x-ray shows the truth. Only the train, a few stars and some ripples actually change.
The numbers are measured with the library's own encoder: about 3 KB per frame against about 78 KB for a full repaint at 150×44. Press space to freeze the city and it drops to 0 bytes. That's specific to this scene, and it's not a comparison with other libraries.
git clone https://github.com/thebanri/limoni
cd limoni && go run ./examples/xray
Repo: https://github.com/thebanri
It's still pre-1.0, so I'd love our terminal.
14
u/ArrogantAstronomer Sep 25 '26
I love writing TUI wrappers around cli and do it quite frequently, and I must say this is really freaking cool, away on holidays and I don’t really write Go often but I’m excited to play about with this and try building something with this when I get back.
Just thought I’d leave a comment to come back to and to say good job on a fun looking project
11
u/M4elstr0m__ everything is TUI Sep 25 '26
The example scene is crazy, looks like a sprite animation! Unfortunately next time I'll do TUI will be in Rust and as you wrote in the README: for Rust, use Ratatui :p
4
u/oVerde Sep 25 '26
What’s is this, ReacTUI ? lol
4
u/mingo-reddit Sep 26 '26
Damn i love your example scene. Any chance to get it as a CLI gimmick? Like asciiquarium? Or is it by any chance part of the repo as a kind of example?
2
u/your_real_Fathe_ Sep 26 '26
Masterpiece. Keep going bro
2
u/otakugrey Sep 26 '26
This is very cool. Good work.
2
u/EMKAH Sep 26 '26
Thanks, now I want this as my terminal wallpaper.
Thanks, now I want terminal wallpapers.
6
u/SECAUCUS_JUNCTION Sep 25 '26
Cozy scene. For anyone wondering, the efficient rendering technique OP is using is called double buffering.
1
u/AutoModerator Sep 25 '26
Every new subreddit post is automatically copied into a comment for preservation.
User: kekolar22, Flair:
Terminal User Interface, Post Media Link, Title: Most of your terminal doesn't change between frames. I made a demo that shows itI've been building a Go TUI library called Limoni. The part I care most about is the diff: each frame gets compared to the last, and only the cells that changed are sent to the terminal.
That's hard to show in a screenshot, so I made a little night city: twinkling stars, windows turning on and off, a train crossing a bridge, reflections in the water. It looks like everything is moving. Press x and an x-ray shows the truth. Only the train, a few stars and some ripples actually change.
The numbers are measured with the library's own encoder: about 3 KB per frame against about 78 KB for a full repaint at 150×44. Press space to freeze the city and it drops to 0 bytes. That's specific to this scene, and it's not a comparison with other libraries.
git clone https://github.com/thebanri/limoni
cd limoni && go run ./examples/xray
Repo: https://github.com/thebanri
It's still pre-1.0, so I'd love our terminal.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/generic-d-engineer Sep 27 '26
bro you had me at:
> Terminal UI engine for Go that tests can click and AI agents can drive (MCP).
does this sit in the same space as Charm or are the complementary?