Nik Kantar

Monday, September 18, 2023

Favorite Command Line Tools

I’m a heavy command line user and have over the years found some favorites worth sharing.

I’ve been a command line user from the very first computer steps I took with a Commodore 64, which dropped the user right into BASIC, an interface I would consider to be in a similar category. Even through years of Windows use (95, 98SE, 2000, and XP), I was no stranger to CMD.exe. And over the last nearly two decades of Linux and then macOS use, I’ve become pretty devoted to the terminal.

Many different tools have made this journey both possible and delightful, and today I want to call out a few somewhat less known (mostly) non-built-in ones I use fairly regularly, as well as some of the alternatives I think deserve honorable mentions.

For context, I’ve been a full-time macOS user for about a decade and a half at this point, but I’m reasonably sure most of the tools covered here work just fine on Linux, BSD, etc.

screenshot of blank terminal window

Terminal Emulator

I’ve been using kitty for over a year now, and it’s been a pretty great experience. It supports panes, tabs, and multiple windows, can be controlled via command line, and is blazing fast.

Honorable mentions:

Shell

These days I’m a rather happy fish shell user, as it’s been a bit friendlier of an experience than other options. My prompt is nice and fast courtesy of Starship, and I just started using Atuin for my shell history and am liking it so far.

Honorable mention goes to tmux, which I don’t currently use as kitty does the trick, but which was an indispensable part of my toolchain for years.

File System

bat is a faster, prettier cat. Built-in syntax highlighting alone has made it worth installing for me.

broot is an awesome fuzzy directory navigator and file path manipulator. I mostly use it for viewing directory trees and renaming deeply nested files.

eza is a next generation ls replacement. I’ve aliased l to it and am generally unaware that it’s what I’m using. (Edit: A previous version of this post referenced exa, which I’ve since learned is unmaintained.)

ripgrep is a next generation, ridiculously fast grep replacement.

fzf is an awesome command line fuzzy finder. Piping output of, say, ripgrep to it makes for a lovely interactive search experience.

watch is a classic command repeater. I often start some process and then watch -n .1 ls in another window to see the progress.

Honorable mentions:

Editor

My primary editor for the past couple of months has been Helix. It’s been working great for me, and I’ve been customizing it slowly and organically. I love how fast it is, and how well It Just Works™.

Perhaps the main highlight is the inversion of Vim’s traditional verb→object order (e.g., d5w) to the much more natural (to me) object→verb order (e.g., 5wd). I really appreciate always seeing the selection of text I’m about to change.

There is currently no plugin system, though that will change in the future, but in two months of use I’ve yet to find myself seriously wishing that were already resolved.

Honorable mentions:

Version Control

The only version control system I use these days is good old Git, and I enhance my use thereof with two other tools.

Firstly, I perform nearly all my Git operations with lazygit. It’s a fantastic terminal UI for Git. I love it so much I nearly always have it open in a dedicated terminal tab for every project I’m actively working on at the time.

Secondly, since all my stuff usually ends up on GitHub, gh makes interacting with repositories from the command line a breeze. I don’t tend to do too much with it, but it’s a handy way of treating issues as to-do lists, for example.

Honorable mention: vimagit was one of my favorite things about using Neovim and Vim.

APIs and JSON

My favorite API client is Hurl, which is actually a full fledged HTTP client that I tend to use primarily for working with REST APIs. It uses beautifully simple request syntax and offers a few tools for working with responses.

If what I’m getting back is JSON, I tend to use jq to deal with the output, though gron has crept into my workflow as well.

Project Tooling

modd has brought me so much joy over the years. It’s a great way to run commands and daemons based on file changes. You can see an example in this post.

From the same developer comes devd, which is just a simple, reliable webserver I sometimes use when working on static web content.

Honorable mentions:

Python

My primary language for many years has been Python. I’ve used more Python related tools than I could possibly keep track of, but two stand out the most.

The first is pipx, which is meant for installing command line Python tools in their own self-managed, isolated virtual environments. For example, I use it to install the Black formatter globally.

The second is Poetry, which I use to manage dependencies for all my projects, as well as build packages for publishing on PyPI.

Honorable mentions:

My Precious

While I write a lot of small tools for small tasks with frequency, pbclear stands out and gets a decent bit of use. It is my own complement to the macOS built-in pbcopy and pbpaste, and all it does is send contents of /dev/null to said pbcopy. I don’t entirely know why I’m so insistent on clearing my clipboard all the time, but it makes that easier.

Takeaways

This was a lot of fun to write, honestly. I mostly based it on the output of brew list, with some pondering about past choices and alternatives.

I also actually learned something: I should use fzf for a lot more than I do.

Which tools bring you command line joy? Let me know on fediverse/Mastodon or send me an email.

>_


Tags: commandline

Thanks for reading! You can keep up with my writing via the feed or newsletter, or you can get in touch via email or Mastodon.


Older:
Hire Me! (v.2023.08)
Newer:
Masking Is Inclusivity