Abhijit Hota

Extremely fallible

A sorry excuse of a blog where I write about development, life and opinions I have

My arsenal of CLI tools

  • #cli
  • #tools
  • #linux

Background

I’ve been seriously using Linux for (just) over 2 years. The thing I take pride in is my pragmatic, albeit flashy at times, CLI setup. This article could be a dotfiles repository but I keep it private because I think it’s too risky.

Let’s look into some tools I use daily.

My terminal setup
  • kitty, the best terminal emulator
    • fast
    • panes, tabs, windows
    • a plethora of configurable keybindings
    • really good plugin model and ecosystem
    • remote control allows amazing interop between other software
    • fantastic scroll-back buffer manipulation capabilities
    • little features such as following links via keyboard, selecting text, etc.
  • zsh

Tools of trade

There are a lot of awesome articles and resources that list out amazing CLI tools.

I’m going to be talking about the tools which have stuck with me and I actually use, hence the use of word “My” in the title.

Let’s go over the tools categorically as Julia Evans does in her CLI list.

Replacement for standard tools

Just as a little game, guess what command I’ve tldred the most.2

New(ish) inventions

JSON/YAML/CSV things

Miscellaneous

These don’t really fall under CLI tools, but are CLI extensions or alternatives to other tools.

Useful aliases

These are some useful aliases built on top of above mentioned tools and standard tools that I frequently use:

A hyperbolic rant

I love the CLI. Dare I say, it’s the easiest way of getting things done if you know what you’re doing. And of course, that’s a gigantic “if”.

Compare the following 2 conversations:

Bob: Hey, how do I [do this] using [that] such that [something] becomes [something else] and [that particular thing] is not messed up?

Alice: Ah, give me a minute!

[10 minutes later]

Alice: Here, yank this into the terminal and run it.

$ dothis --use=that \
  --from=something \
  --to=something-else \
  --ignore=that-particular-thing

Bob: Nice.

vs.

Alice: Hey, how do I connect to Wi-Fi?

Bob: There should be a Wi-Fi icon thingy in the bottom-right corner.

Alice: There isn’t.

Bob: There should be.

Alice: There isn’t.

Bob: You are using Winwoes 10, right?

Alice: Yes.

Bob: Okay, go to Control Panel.

Alice: How?

Bob: Go to start and search for it

Alice: Okay, I’m here.

Bob: Now, on your top-left side, you’ll see a blue button which says View. Change the view to category, then you’ll see the Network and connectivity settings, go there. You’ll see Networks tab. Go there. You’ll see wireless networks, click that. Now you should see the Wi-Fi.

Alice: I don’t.

Bob: FFFUUUUUUUUU

Now, this is obviously a hyperbole. And I’m not bashing GUIs (geddit?). I’m not saying CLIs should be the norm. I’m merely saying that learning how to use the CLI properly will make you a power user.

Conclusion

Footnotes

  1. I started using ripgrep before learning enough grep so I can’t really tell how better it is in terms of UX. The benchmarks speak for the performance.

  2. You are correct

  3. I’m gonna learn vi some day.