I recently learned a bunch of cli utilities to do tasks for which previously I always reached to GUI apps. What a wonderful world of tools that are always there, do the job, never change and get out of the way as soon as they’re done!
I have a list of apps that I install on every new machine. Many of these apps can do a lot, but I mostly use them for one particular job: convert a file to another format, resize an image, etc. I’m sure everyone has one, and feels as helpless as I am, when it’s not there when needed.
During the years, this list has changed substantially. The apps become abandoned and stop working on new OS releases, the makers pivot the app to some new business opportunity, in the process ruining old use cases. With every change, the knowledge I’ve got resets to zero, and I need to relearn how to do the thing in the new app: new windows, menus, dialogue boxes and buttons.
A few days back I needed to do something new and searched for an app, thinking sure there must be apps for such a common task. And indeed, there are — subscription-based monstrosities with countless new interfaces. Gosh, it’s quicker to learn how to do the thing in Python, then what buttons to push in these apps! And I am not a programmer. No way would I invest so much time in learning how to do my task in THIS app, when the knowledge would disappear as soon as I move from it.
So not any more! I’ve started replacing every one of those one-task apps with command line utilities. I learned how to download and convert audio and video files, scale and crop images, download websites and parse their contents to create databases, convert structured formats like csv and json, edit exif data in photos and so much more. These utilities act as proper work tools — they get summoned when needed, do the job, and silently exit when ready. Once learned, the interface of every new app is familiar and predictable: a keyword, some optional parameters plus a path to a file if needed. And they work the same way on every unix-like platform out there, no need adjusting to new platform specific GUI conventions.
I recall getting an advice several years ago to learn bash. Phew, why would I spend time learning some old obscure language, that can’t even be used to build apps, I thought at the time. Well, years passed, bash is still relevant, while I can’t even remember the names of the apps I used at the time.
ImageMagick is 33 years old, ffmpeg is 23, curl is 28. That’s the longevity that makes me feel confident in learning and mastering.