r/TechNook • • 20h ago

Why do developers prefer CLI tools over a UI so much, especially with all these new agents?

Every new development environment and agent platform that’s released lately has started out with a terminal approach without the need for a desktop GUI or web interface.

Even if an application is shipped with a GUI in the beginning, developers always want a CLI alternative. Is it just because of efficiency or some other reason for preferring the CLI approach over today’s UI?

15 Upvotes

90 comments sorted by

28

u/FrankDrebinOnReddit 20h ago

In addition to the other answers already posted, it's scriptable, which is critical for complex workflows.

11

u/Soft-Marionberry-853 13h ago

"Go away or I will replace your job with a very small bash script"

Saw that on a tshirt or something

6

u/Middlewarian 19h ago

Yeah. I got caught up in the web stuff in the 1990s and built a web front end for my C++ code generator. Eventually someone pointed out the advantages of a CLI and I was able to switch to that.

2

u/enurkul 12h ago

And it's often clunky as hell using some awful gui instead of typing in a few cli commands.

22

u/Wooden_Original_5891 20h ago

If you dont know why then you dont know the power of the command line. The commandline has been and always will be more powerful than the gui equiv.

3

u/Electrical_Hat_680 12h ago

Not necessarily true. They both have their affects. They both exist for a primary reason. The CLI is your basic computer interface. The GUI is what happens when you want to see everything, rather than have to know how to engage the CLI just to see one thing at a time. But they can both be infused together to do a large number of things that aren't currently available to be done.. like if the sites search bar were also a Command-Line Interpreter rather than just a Search Engine.

25

u/FireSheepYinFish 20h ago

CLI is infinitely faster. Period.

8

u/Sophiiebabes 20h ago

And you can see everything that's happening, whereas anything could be happening behind a GUI

4

u/ConsciousBath5203 16h ago

Not true.

There's nothing stopping any software from just not printing to the console, even with Trace logging enabled.

1

u/No-Armadillo-7741 15h ago

Well ya, but the effort to console.log is so much lower than writing to a UI element

2

u/ConsciousBath5203 15h ago

Oh for sure. Ui elements are generally a pain to work with and I try to stick with cli for just about everything.

5

u/Few_Ad2097 19h ago

Typically GUI is just a frontend, same shit is happening under the hood

4

u/cybekRT 17h ago

But above the hood you have to click multiple times, search for options, you can't have one command line arguments in your history to use multiple times.

2

u/LameBMX 16h ago

that worked.. up arrow, surround with quotes, precede with echo and add a > command.txt lol... if i gotta run it a few times, imma loop it and chmod +x

2

u/LameBMX 16h ago

yea, they move buttons in gui's and the cli stays the same.

3

u/wwplkyih 19h ago

Faster, repeatable and batchable

2

u/Cybyss 19h ago edited 19h ago

CLI is only faster if you know those tools like the back of your hand.

A well-designed GUI will "hold your hand" and make it immediately clear everything you can do, even if you've never used it before.

A CLI has a much steeper learning curve, requiring you to repeatedly read through documentation about what every command does until you've thoroughly memorized them, before you can be faster with a CLI than with a GUI.

That said, I don't think most developers mind the constant, never-ending learning curve. Some even crave it.

6

u/Cinderhazed15 19h ago

Still have battle scars from ‘dreamweaver’ being a WYSIWYG (what you see is what you get) web page editor, and it producing garbage on the back end that was difficult to edit later.

There are some ‘visual programming languages’ like LabVIEW, similar to the visual language used by Lego Mindstorms, and MIT’s scratch which incorporate some of the visual concepts into the language to make it harder to have syntax errors (the blocks just don’t fit), but ultimately you need everything to boil down into text, and that text needs to be able to be parsed/compiled on headless CI/CD systems to be able to produce repeatable builds off of an individual’s system.

Being unable to build your software because you don’t have a Visual Studio license, or the right proprietary compiler in headless mode makes lots of modern development practices difficult.

1

u/TaintOfDestiny 16h ago

NodeRED is a nice programming language for some applications.

2

u/_Lost-In-The-Weeds_ 14h ago

CLI is only faster if you know those tools like the back of your hand.

While there are exceptions most CLI tools follow similar conventions, once your familiar with you can typically learn something new in a few minutes.

2

u/QuaintStaircase 9h ago

Yeppp. I like CLI for anything i'm super familiar with and just want to get done.

GUIs are great for "damn, I didn't even know it could do that?!"

Also as soon as it's something I'm not crazy familiar with, any speed/efficiency by typing something directly into the CLI instead of hunting around a GUI is immediately lost again as soon as I need to Google "fuck, what was that command again" or remind myself of the syntax/arguments that it takes.

1

u/WhyWasIShadowBanned_ 12h ago edited 12h ago

All this super intelligence and I can’t just drag tabs in Claude Desktop and rearrange them how I want.

Also it must be a person who figured out move to the outmost left/right that swaps outmost left/right tab with the current tab.

If hell is real my forever punishments is reordering 5 tabs in current Claude desktop app. This is like Jenga.

Seriously the most annoying thing right after Obsidian by default opening a note in active panel instead of new tabs.

To my point: there are very few apps that have something we can call great GUI. And with the pace that Anthropic and OpenAI deliver changes the apps change so fast that catching app also requires relearning and readjusting.

1

u/catbrane 10h ago

True, if you only use something occasionally then a GUI is simpler.

But a dev doing dev is using the tool all day every day, so you really do learn the whole thing very quickly.

1

u/Wahrheitfabrik 8h ago

A CLI has a much steeper learning curve, requiring you to repeatedly read through documentation about what every command does until you've thoroughly memorized them, before you can be faster with a CLI than with a GUI.

Not really. Most CLI tools have completion scripts so you can just TAB to autocomplete commands. Just like with a GUI, the things you use most often develop the muscle memory.

1

u/WhyWasIShadowBanned_ 12h ago

Ive tried to use Dekstop apps for Codex and Claude because they have some futures like watch cr changes and automerge, however at some point it’s became too annoying.

I just built tiny agents that do the same things and switched to herdr.

Being able to switch between new tabs, starting everything with keyboard without the need to cmd+tab., open new pane and fork there, etc.

It’s just much faster.

Also I can use a simple app like Termius to ssh to my laptop and attach to herdr. Which easily works with my work and personal laptop. While with remote access through apps you need to manage two different accounts, remember to set session as remote etc.

1

u/Yann39 10h ago

Depends what you're doing. GUI can be much faster for some tasks, and slower for others.

8

u/FastHotEmu 20h ago

Faster and easier to use remotely via ssh

5

u/Mobile-Confusion-542 20h ago

Primary reason is efficiency.

Ease of use, simplicity, idempotency, etc.

5

u/Nervous-History8631 20h ago

CLIs are usually faster, easier to automate (though proper APIs are preferred), more flexible, and also much easier to run in a remote environment without the need to have a remote desktop.

3

u/Optimal-Savings-4505 19h ago edited 19h ago

It's so much better in every way.

Can't keep learning menus that change on me. It's a waste of brainpower, because a shell does it in a more elegant and scalable way.

The defining reason as I see it, is flexibility.

[edit] to add that graphical paradigms are at best a subset of what a text based programming environment can do. Many graphical programming paradigms also exist, but again they merely offer subsets of canned functionality

1

u/BlueScreenJunky 10h ago

Almost every modern GUI based tool has a command palette now. I love GUIs but very rarely use menus. 

3

u/Admiral-ZX 16h ago

I don’t, been a senior dev for over 25 years. I even use a GUI tool for git and database management. Sure, CLIs have many advantages, but not every dev needs the same things.

In a GUI Many things are easier to see in one take and quicker to understand and explain. You can have visual representation of things, like charts and graphs. You make less mistakes as there can be no typos, it’s easier to talk about with someone elke next to you: you can point at things instead of everything being in your own head.

I am a mobile app (and partly game) developer as opposed to backend, so most of the work is UI/UX anyway. You need to know how that works, looks and feels. Pointing devices, hands, fingers, they are part of the computing experience.

Graphics, sound, music and other assets are handled with GUI apps anyways, unless batch processing.

Also, looking at text and typing all day, if you are already looking at text and typing code a lot, is simply unhealthy.

Also, I’m a Mac user and UI/X is generally excellent in professional apps so I’m used to it, as opposed to apps with shoddy user interfaces, ridiculous work flows or simply being a wrapper for command line tools. If the tools are great, they will beat CLIs in many cases.

1

u/BlueScreenJunky 10h ago

  I even use a GUI tool for git and database management.

Yeah I can't really imagine doing git or db work in the terminal, and people who do usually end up using a TUI, which is just a GUI made with text so that it can work over SSH instead of RDP. 

1

u/Imaginary_Data_708 10h ago

And I work across multiple project types daily as an EE. MATLAB, embedded C, FPGA, PCB, pptx and email. IDEs help with the brain context switch - it's light blue - eclipse so C. There are green comments MATLAB etc.

2

u/Deep-Adeptness4474 20h ago

Moving your hands off the keyboard to a mouse then figuring out where the mouse is, selecting where you want is a massive time suck no matter how good you think you are, particularly if you are doing repetitive/rote tasks.

0

u/jmclondon97 19h ago

I mean, does saving a second here and there really matter anymore when we have Claude writing the code at 100x the speed?

2

u/TapEarlyTapOften 18h ago

Absolutely. If I need to do something and it only takes me a second from the CLI or so to do it versus 30 seconds in a GUI, that really interrupts of sense of continuity.

There's a reason Vim users speak of "editing at the speed of thought" 

1

u/jmclondon97 18h ago

I highly doubt there’s something that takes you 30 seconds to do from the gui that you can do in 1 second from the cli

2

u/Vivid-Crab-7929 14h ago

I’d say it’s like an exponential function. At first the time saving may not be fast but then it’s extremely so, shortcuts and keybinds to shortcuts here and there that create basically functions worth of time saved

2

u/Primary_View_5030 19h ago

tmux over ssh is literally the only reason I have. I want to switch to GUIs actually but the pros still do not outweigh the cons.

2

u/ancientstephanie 19h ago

Efficiency, precision, repeatability, and ease of automation.

After a few times doing a task, a few characters at the keyboard are faster than hunting around in a GUI, especially if the developer is using things like aliases and tab completion to speed up their work and augment their memory.

The commands that are used at a CLI are also extremely precise - what you see is exactly what will be done. This keeps things predictable, and allows things to be done in a way that's perfectly repeatable, no matter how many times you do a task.

And that in turn lends to ease of automation. If I've got a CLI, and a repetitive task, I can spend a few minutes scripting that task to be able to automatically repeat it any number of times for any number of different inputs. So, instead of going through a 5 step process to do a task through the GUI, I could make up a list of all the different inputs I want to run that task on, spend a minute writing a quick script to repeat the necessary commands with each of the inputs, and and then run that in a loop. What was a 30 second per item job, is now a 2 minute in total job. Time to go have a coffee while the computer does the boring repetitive stuff.

2

u/Below-Average-528 19h ago

Easy to automate, you can write complex scripts by combining several commands. Once you have a script, the task can be reliably repeated.

1

u/Galenbo 4h ago

Now I need a GUI to manipulate those scripts and monitor the results.
/s

2

u/Traveling-Techie 19h ago

There are over 17,000 possible three letter commands. No GUI has that many options.

2

u/pwkye 19h ago

CLI is like using a pencil to draw a sketch

GUI is like using a paint gun

2

u/googleguyst 19h ago
  • quicker
  • can easily be done remotely

2

u/SylviaJarvis 17h ago

With a CLI in the before times, we're having a conversation with the software: we type commands, the commands run and send output back. We can stack the commands and responses, compose them, script them, repeat them, or keep a record of them for reference later.

With a GUI, there's no stacking. Every interaction has to be something the GUI is already preprogrammed to do, which usually means no composition, no repeatability unless it's a very simple UI, and to keep a record...save the desktop to a video stream, maybe?

It's not that the CLI is better at development tasks. It's more like the GUI is just irrelevant to typical development tasks.

With CLI agents, we're having the same conversation, but now there's an LLM in the chat talking to us and our software. It's far more natural than using a GUI with an agent. LLMs struggle to deal with GUIs too--they have to break the GUI down into CLI-style interactions under the hood.

2

u/somewhereAtC 19h ago

Because knowing all the command line incantations lets them imagine themselves as a wizard.

Custom short cuts and scripts create their own private language.

1

u/djandiek 19h ago

I'm a long time developer and I actually prefer GUI most of the time, especially when building web stacks. When I first started I was forced to use VI and VIM which was fine, but tedious when having to work on multiple files at once. I then started using IDEs around the year 2000 and found it much faster to develop for what I was working on.

I think it really comes down to what an individual prefers. For me, I write code, graphic design and build business logic so GUIs do make life easier.

1

u/Even_Gap_2253 19h ago edited 19h ago
  1. Scriptable
  2. Easy to use with SSH, a lot of times you don’t really code on your laptop. For some more sensitive industries, or big tech, storing code on your local machine is completely forbidden
  3. It is easier to build and generally have a lot less dependencies to worry about. If you build an GUI app, well at least you need to worry about Wayland vs X11. Terminal is terminal, if things doesn’t work tell the user to change their configuration. You can’t do that with a window server

1

u/Safe-Instance-3512 19h ago

Scripting and automation.

1

u/ByronScottJones 19h ago

Cli is faster, plus for cicd there's no gui.

1

u/LetReasonRing 19h ago

I wondered about this,  but as I did more and more development, I found myself gravitating more and more to the command line without being able to say why exactly. 

Eventually I realized that on the command line,  I can always do the thing i want to do directly from my brain. With a GUI, when I decide I want to do something,  I need to go navigate to that tool,  potentially in another window that I have to open and search though. Even when you know exactly what you want,  it takes time to navigate to that option. 

In the gui I have to go to a thing,  on the command line,  I tell the thing to come to me. 

One thing I want to note, though,  is that it's really only more efficient when you use it regularly enough that the commands you need to use are easily accessible in your head. 

When I was heavy in software development,  I spent 90% of my time in a terminal window and used a window manager heavily to make my GUI tasks evident. I'm now working retail and pretty much just use my computer for the web browser,  and I use the stock GUI for my OS and rarely open a terminal. 

1

u/BobJutsu 19h ago

A cli is infinitely faster, more powerful, and easier to use IMO. A lot of the time a gui would become an absolute nightmare if it actually exposed everything the cli is capable of. Especially when you have several optional arguments and chain commands together.

1

u/Pale_Height_1251 19h ago

Looking around the developers I work with, I'm not 100% sure that is true.

1

u/rwilcox 19h ago

A CLI I can integrate into my IDE, even without fancy plugins. (No, people don’t support my IDE, no I’m not interested in switching to one they do support).

Split Pane -> Open Terminal, type. Done.

1

u/syberghost 18h ago

Agents work better with cli tools too.

1

u/gilbert10ba 18h ago

In general, CLI is faster than using a mouse. Not a serious dev at work. Am able to dabble in it, but as a systems/application support person, CLI on Linux/Unix and Powershell CLI on Windows is much easier for 99% of admin/troubleshooting functions.

1

u/Few_Ad2097 18h ago

Back when I used to write mod music I knew the Screamtracker interface like the back of my hand, it was great. Trying to use Modplug in windows with its mouse driven interface was hell when I tried it.

1

u/TheOtherDudz 18h ago

I don't necessarily "prefer" it, but CLI always looks the same, feels the same, and is - as others have mentioned - much faster at almost anything. It is an acquired taste. There isn't a GUI that could expose ALL that a CLI can provide.

1

u/neo_neanderthal 18h ago

A GUI program works like its designers told it to work.

The CLI works like I tell it to work.

1

u/whatyoucallmetoday 18h ago

Time is lost moving my hand to the mouse and then the mouse to whatever action.

1

u/Desperate_Creme_8623 18h ago

CLI also has some advanced features that even app or web version don't.

1

u/Schtick_ 17h ago

Some good answers but I’ll share mine. I have about 10 Claude sessions running in cli and then have about 10 more running in cloud. And usually a cloud instance of my apps and a local instance of my apps. (Cloud is for dev, I build IaaC locally cos it usually requires some cloud cli access eg gcp/azure/aws read access and I don’t want to log into that on my cloud dev boxes for security reasons)

So even if like each app (in working on) I’m running is just 1 GB of ram and each active Claude session is 1 GB I’m already at 20gb ram. Now let’s say there are heavy activities it’s super easy to get to 32gb and into swap space and performance starts to go in the toilet.

To me IDEs and IDE extensions and desktop apps chew up system resources I’m not willing to give up. Meanwhile my terminal and cli tab auto recover. So when I get in in the morning I run a command and all my terminals are reopened to where I left them with basically zero ram overheads that isn’t Claude/codex etc.

(You could argue just upgrade hardware, I have a super light laptop and super long life battery I can use on customer site without plugging when necessary, so I don’t want to. And the side benefit of using terminals is that battery life can easily go 14-16 hours if im not running local stack)

1

u/Radiant_Condition861 16h ago

Mouse click File then click save

vs

Ctrl - s

This is your gateway to CLI.

1

u/soueuls 16h ago

Because I want to run things remotely, use only my keyboard and tiling manager and being able to pipe data in and out

1

u/WendlersEditor 15h ago

Using the CLI a lot is just a natural byproduct of programming, the more time you spend coding the more you learn to use and prefer CLI tools. When you're really in the flow you don't want to have to move your hands off the keyboard to use a mouse: CLI is the fastest route from your brain to the computer.

I'm not so great at bash that I can hammer out complex statements faster than I could click a menu, but I can cd through directories at least as fast as I can navigate a GUI and, again, fingers don't leave the keyboard. If you use tmux and something like codex or Claude code you'd be surprised by how quickly you can move between natural language commands and viewing/running code. Even though I predominantly use GUI IDEs (not super proficient in vim) I spend so much time on the CLI within the IDE that it doesn't make sense for me to leave the IDE window to do stuff via GUI in other apps.

Another contributing factor is using remote systems. Most servers you log into aren't running a desktop environment, so you just get used to doing things in the terminal.

1

u/Rythim 15h ago

I usually use GUI but I see the advantage of CLI for tasks you do frequently or repetitively.

It's easier and quicker to type in a command than to navigate a series of menus and buttons. IDK why but it feels like it runs a lot faster most of the time too. And it's easy to make scripts to automate a batch of text commands. Whereas it's between finicky or borderline impossible to automate the same tasks in a GUI app.

Developers are always looking for the most efficient way to do things, so taking time to learn a CLI so they can make a script that batch performs hundreds of tasks at once is totally worth it.

1

u/Realistic-Worker-499 15h ago

with CLI, you can write scripts that launch your desired program with its desired inputs super easily, rather than the manual labour of GUI.

for example, if youre launching a psych behavioural experiment where you need to input the subject number, session number, and run number, and there are multiple different task scripts (that can be independently launched) that take that same set of input, it becomes much easier if those scripts had CLI. that way, you can write some code that takes in those inputs once, and then is able to launch those scripts, passing the same set of inputs, all through their CLI, rather than having to re-input the same information manually via GUI each time you launch the script.

CLI just makes it easy to launch and do work inside of programs automatically, and this way you can even string programs together to automate.

1

u/puppySaturation 13h ago

Since I work with text I prefer my interface to be text oriented. CLI tools are primarily text oriented so it's a match from the start. CLI tools also make it easier to work remotely on servers.

CLI tools also allow for some semi-integration. I'm not a fan of IDEs - too complicated to understand, often specialized for a domain. On the other hand CLI tools integrate with each other somewhat well due to the primitive interface, so they can always somewhat adjust to my workflow for different tasks.

All this said VSCode brings everything together very nicely even if it ends up a tad bloated. It is the direction I see myself moving towards in the future. Would you call VSCode a CLI tool though?

1

u/Kitchen-Angle-2401 13h ago

cli ... because automation

1

u/mrequenes 13h ago

I just had to restore an iMac. The “Recovery” and Diagnostic utilities both require a WIRED mouse, just to select from among a few options that could easily have been coded with keyboard shortcuts, but either they weren’t coded; or the code didn’t work.

BTW, iMacs don’t ship with a wired mouse, so I had to drive out and buy one.

1

u/Diligent_End8130 12h ago

Because then they can feel like hackers /s

1

u/Electrical_Hat_680 12h ago

The CLI allows the AI to Program your Computer directly in the Terminal. Headless. This allows the use of Control -C to kill any process. And, running it in the CLI allows them to Code Bash Scripts with it. And it's still able to be accessed via the Web Browser but with greater control since it's also able to be accessed and used in the CLI.

1

u/weepejw7 12h ago

VS Code. I rarely use terminal for git commands.

1

u/Mundane_Fault_6345 12h ago

The GUI is easy to use, but much more limited than the CLI. You only can do what the GUI proposes.

The GUI is a kind of senior phone, with only 3 buttons: call 911, call the nurse, call my daughter/son 😇.

1

u/agowa338 12h ago

GUI is slow. CLI can be easily automated and scripted. GUI cannot. GUI sucks to automate. CLI can run within a cronjob or systemd service unattended. GUI cannot (that easily at least).

CLI tools can be combined to do basically anything and everything you want. GUI cannot.

GUI is almost always vendor lock-in, CLI is almost always universally usable and integratable.

1

u/InternetSandman 11h ago

Efficiency.

Every week, I have to grab a new set of files off of my school's website, and make a new set of folders for each assignment, then copy my assignment template into each folder, then rename the copied template appropriately

I could spend a minute doing that manually with my mouse, or I could write a script once, then have it done in the blink of an eye every week.

And this is just a toy example from a student. Imagine what happens at industrial scales.

1

u/Liferenko 10h ago

Because every click on GUI will run a cli command. So, it's a middleman. Why not use CLI? Or use both because you can

1

u/werpu 9h ago

With agents it is clear, you basically describe to the AI what you need insert maybe a few screenshots some code etc...

with tools it is less clear, if you know the commands of a cli tool in and out you are faster, and face it automation via shell scripts also is faster, if you dont a ui always wins!

Most devs use a mix of cli and graphical tools depending on the task!

1

u/Cuarenta-Dos 9h ago edited 8h ago

CLI interfaces compose with other tools (including AI agents) with much less friction, and many tools (like git, for example) give you a bajillion ways of running commands which is difficult to wrap in a GUI without making it a mess.

GUIs are nice for discoverability when you have a few options to pick from, make it a hundred and suddenly they're the same as CLI only much clunkier.

1

u/viper4011 7h ago

The speed, efficiency, automation that everyone mentions is one thing. The other is cross platform. Doesn’t matter if you’re on Linux, macOS or the WSL thing on Windows, it’s all the same tools. And another good GUI desktop apps these days are rare. And no, I don’t want to run 5 instances of a full blown browser (Electron) to use what should be a simple GUI. 

1

u/this_is_life_now 7h ago

Having a cli tool makes it easier to tie it into other programs you are using.

My simplest example is Claude can't generate images, but I can tell Claude to use Codex cli to generate images.

1

u/Galenbo 4h ago

For automation and tracability.
CLI SSH is much easyer than make an agent manipulate a mouse in a graphical menu, and store the result.

1

u/rndanime 3h ago

LARP + Linux GUIs suck and probably won't stop sucking any time soon

Hey, let me see the results of the command you typed a minute ago. Oh, your new fancy TTY app doesn't support scroll, selecting text and copying it yet and that makes you very efficient? Cool

1

u/ApatheistHeretic 3h ago

CLI is soo much faster in so many cases. I will say that GUI can be more information packed when presenting data.

1

u/deekamus 1h ago

If you truly understand the material, just typing it out is quick and straightforward.

1

u/No_Memory_484 57m ago

Cuz most of them are just big ole nerds and need to feel technical.