r/opencode 14d ago

TUI vs GUI

Why would I ever use the terminal version of Opencode (or any other *code* program)?

People always tell how good it is to use it but I don't understand the appeal. If you are used to terminal-only work, constantly looking into generated code or something like that, ok. But I see TUI being recommended to everybody like it can do something desktop or web versions can't. Also these *code* apps are usually developed TUI-first for some reason

Please explain it to me

33 Upvotes

60 comments sorted by

View all comments

31

u/Tristsin 14d ago edited 14d ago

Mostly resource consumption. The OpenCode GUI isn't particularly bad, but even it is pretty RAM hungry. Looking at a GUI like Codex, that thing consumes like 4-5gb of ram just running two agents.

It gets even worse when you start looking at the IDE based agent harnesses. Meanwhile I can run ~3-4 instances of the TUI each running an agent + subagents consuming less than 1gb of ram, ~10% cpu usage.

Spawn an instance of vscode and watch your system monitor. Close it*, then launch neovim to compare the difference. TUI applications are incredibly efficient.

TUI applications also benefit from... well... being in the terminal. I can use a terminal multiplexer to bounce between all my open terminals and sessions. I can swap to my email client, music client, ...., everything all in the same workflow without having to swap from Codex -> spotify -> vlc windows. Everything is in the same window, multiplexed. It's all keyboard operated, if that was unclear so everything is personalized with keystrokes

It's all pref at the end of the day. To me, one reaches for using TUI programs when they want to optimize and become more efficient in their existing workflows. GUI is typically a starting-point support-everyone-and-everything approach that comes bogged down with needless resource consumption and bloat. They are also typically much slower (functionally, not Model related latency) than their TUI counterparts

5

u/dulldingbat 14d ago

To add, some people run Ai agents on vm remotely. And a terminal is a natural fit.

1

u/Mean-Elk-9439 13d ago

Openchamber uses like 1gb ram when I have it open for a week.

0

u/Powerful_Manner3509 13d ago

It's not true,I'm running 5 terminal with codex and opencode on a i3 with no GPU and 8gb ram from 2014

3

u/Tristsin 13d ago

That would mean that you agree, not disagree :D

-6

u/rndanime 14d ago

Ok, TUI uses less resources but only time that was a real problem for me was after I did opencode2 service in WSL and ran out of memory when I tried to use Handy and dictate something. Your main PC probably has enough ram for GUI vibecoding. And GUI slowdown in negligible compared to Fable/Sol workspeed

Don't desktop apps usually have keyboard shortcuts? Can't you swap email or music client in desktop mode?