A version of this post first appeared in my newsletter. Subscribe to receive posts like this in your inbox every other Sunday.

The original version of this post made reference to TUIs (text-based user interfaces.) I was under the impression CLIs were a type of TUI. But a few folks wrote in to say that was confusing, so I’ve removed references to TUIs entirely.

Since the mid-1940s, people have experimented with diverse computer interaction paradigms. Initially, operators used patchboards, switches, and dials. We’ve come a long way since. In a few weeks, Apple may announce an AR/VR headset — yet another paradigm alongside WIMP (windows, icon, menu, pointer) GUIs, multitouch, voice, etc.

Each new paradigm removes abstraction by framing the experience in relatable metaphors. This is most obvious in WIMP GUIs: the things you “move” around the screen aren’t really “windows” or “files” on a “desktop.” Instead, they are virtual objects meant to be sensed and understood by beings who share your physical and cognitive capabilities.

Some interfaces are obsolete — e.g., today, only hobbyists and antiquarians flip switches and read binary lights. But others continue to thrive, coexisting with each other. You use your phone’s multitouch interface in one moment and your laptop’s WIMP interface in the next without thinking about it. Each UI is suited for different tasks and contexts.

An ancient paradigm still in active use is the CLI or command-line interface. As the name suggests, you control the computer by typing in words and reading its output as words on a screen. It’s one layer down in the abstraction stack: rather than immediately identifiable pictures, you work with language — often, somewhat obtuse language.

For example, consider a simple operation: copying a file from your Downloads folder to the Desktop. Using the WIMP GUI, you’d look for an icon representing the folder on the screen, point to it using your mouse, double-click on the folder to open it, look for the file, and then drag it to the Desktop. It doesn’t sound very easy, but you likely do this without thinking.

Most modern laptop and desktop computers also provide CLIs to perform these operations. For example, Macs include an application called Terminal.app and Windows has comparable capabilities. Though they support different commands, the principle is the same: they let you control the computer via text commands.

For example, to move the file from Downloads to Desktop on my Mac using the CLI, I open the terminal application and type the following:

mv ~/Downloads/file-name.txt ~/Desktop/

Each character in this line means something:

  • mv is a program that moves files from one directory to another.
  • The space after mv marks the beginning of a string that represents the location and name of the file I wish to move.
  • The tilde (~) is a reference to my home directory. I’m telling the computer to move the file called file-name.txt that is in the Downloads directory in my home directory.
  • Then comes another space, which marks the end of the source file location and the beginning of the destination.
  • The final part of the string contains the destination directory, which is specified in the same format as the source.

If I type this exact sequence of characters into the terminal and press Return, the file will immediately disappear from Downloads and appear on the Desktop. (The sequence must be exact — even one errant character will do something else.)

Although the process seems obtuse compared to WIMP GUIs, interacting with the computer in this way can save you lots of time. For one thing, some special characters let you act on more than one file at once. Consider this minor tweak:

mv ~/Downloads/*.txt ~/Desktop/

The * character is a wildcard, so this command moves every file ending in .txt from Downloads to the Desktop. And there are programs for other operations such as copying and deleting files, converting between formats (e.g., text to PDF), appending and extracting text from files, and many more.

It’s super powerful stuff. But there are downsides. For one thing, you can easily do a lot of damage: there’s no ‘undo,’ and when you delete something, it’s gone for good. (There’s no recycle bin or trash can.) Also, this paradigm is harder to learn than GUIs; magical incantations have poor affordances. (Which might not be a bad thing — see The Sorcerer’s Apprentice.)

But knowing how to use CLIs gives you tremendous control, especially if you work with lots of text. For example, recently, I produced a content audit for a small site and used GPT to write page summaries. Rather than call the LLM via its standard web-based chat UI, I used a set of CLI tools to call it from the terminal and save results directly into a file.

Over the years, I’ve implemented lots of little CLI hacks that have saved me many hundreds of hours. It’s like those screens with the falling green characters in THE MATRIX: people who can interact with the system at lower levels have a lot of power. Sure, there’s a learning curve. But for some types of work, it’s a worthwhile investment.

I’ve considered doing a (free) live stream to share some ways CLI tools have streamlined my work and to help you get started. (Alas, Mac-only — I don’t have as much experience with Windows.) Would you be interested in learning about such things? If so, please drop me a line.