Hacker News new | ask | show | jobs
by MrManatee 20 days ago
If we make a distinction between CLI apps and TUI apps, my interpretation is that the article was specifically talking about the latter.

By a CLI app (with the emphasis on command line) I mean something like grep, sort, cp, git, ls, tar, etc. The normal way of interacting with these is by writing commands on the shell, which means that if you know how to use it normally, you can also use it in a script. Which means that you can combine these into pipelines.

By a TUI app I mean (and I think the article means) something like Vim, Emacs, Tmux, Lynx, Tig, Midnight Commander, Claude Code, etc. - an interactive app that takes over your terminal while you're using it. You're not going to compose those into a pipeline. Or to be more precise, you're not going to use them in pipeline by using them the way you normally use them. If you can use them, it's probably because the app decided to provide a command-line interface in addition to the TUI.

2 comments

You should not underestimate how confusing those CLI tools are to people who have never used them before.

For example, I would argue that for someone with no experience, figuring out how to copy a file from one folder to another is easier in Windows Explorer than learning how to use cp.

> For example, I would argue that for someone with no experience, figuring out how to copy a file from one folder to another is easier in Windows Explorer than learning how to use cp.

I don't believe this.

If you find a person (well, two I guess for this experiment) with no computer experience and want to teach them how to copy files, your first step will be teaching them what is a file and how they are organized in the computer.

Explaining what a file is takes the same amount of time for both cases (we can ignore how devices and processes are files in Linux and how files in Windows contain many data streams and extra metadata).

In both cases you need to teach them the file system is hierarchical and folders can be nested and can contain files.

For Windows you have to teach them how to double click to open folders. They can double click "My Downloads" to see their downloads. They can double click "My Music" to see their music files.

For the CLI you have to teach them that `ls` can list the contents of a directory. They can `ls Downloads` to see their downloads. They can `ls Music` to see their music files.

For Windows you then teach them they can open multiple windows (assuming you want to copy from one folder to another folder). And you teach them they can click, hold and drag and drop a file to move it (but sometimes it will be copied when they do that) and they can hold in Control while dropping to copy the file to the destination instead. Or you teach them they can use Ctrl+C to mark a file for being copied and then navigate to the destination and use Ctrl+V to copy the file. Or you teach them to right click for the right click menu, and that "copy" means "mark this file for being copied", and that a right click in the middle of a window displaying the target folder lets them select "paste" which means "copy the marked file here".

For the CLI you teach them `cp Downloads/foo.mp3 Music/` copies foo.mp3 from their downloads to their music directory.

The CLI is also infinitely easier to help newbies use over the phone!

Look I’m a big fan of having CLI interfaces, and they can definitely let you do things that you just can’t do (or are extremely difficult to do) with a standard desktop gui. But at the same time, the GUI means they never have to learn that `cp Downloads/foo.mp3 Music /` will give them a cryptic error that Music can’t be found. Or that if they’re already in the Downloads directory then they need to instead type `cp foo.mp3 ../Music/`, or that they’re going to need to figure out the special way to tell the computer what they mean when they want to do `cp Downloads/foo bar (feat. baz and the fizzbuzzes).mp3 Music/` and that doesn’t work when they type it in.

The initial explanation of the happy path might be slightly longer to teach drag and drop or right click copy and paste for files, but that happy path will also deal with a lot more scenarios in the exact same way than the happy path cli commands will.

My mom struggled to understand the concept of copying and pasting when she got her first computer at home, with Windows. It was more than 20 years ago, but I think the idea that you need to copy in one place, then go to some other place and paste there, still sometimes confuses her in the context of files, even though she does not have any issues with that when copy-pasting texts.
> The CLI is also infinitely easier to help newbies use over the phone!

I vaguely recall a scene from https://en.wikipedia.org/wiki/Who%27s_the_Boss%3F about this. "Click on the icon that says 'Word'..."

Agreed about the difference between CLI and TUI; at the same time, I do indeed prefer TUI over the “normal” (window) GUI apps for the exact reason why I would prefer vim (or emacs for the other half) over a GUI editor: when you are already in the terminal, launching a TUI app is just faster than switching to a GUI window. So it's still about "terminal or not" for me, or even, what is your default starting point: is it a desktop with icons or menus, or a command line with a prompt? For me it's a terminal, so I prefer TUI apps.

...but not Midnight Commander: it's an outlier in your list, a tool that actively prevents you from learning the way how things work in terminal. Same for all attempts to invent a UI for git.

> when you are already in the terminal, launching a TUI app is just faster than switching to a GUI window. So it's still about "terminal or not" for me

I’m principally a terminal person too, but my first thought was tmux cut/paste buffer (to transfer data whether TUI or CLI), not speed-of-launch.