Great Command-line Tools On My Daily Workflow

Eduardo Rodrigues
6 min readApr 25, 2023

--

Knowing your tools is argueably the best productivity booster to have in the belt. In this article I’ll show you which ones I use.

Other article writers have always made great lists like that, so I figured I would make my own!

To make it easier, I’ll break it into two sections:

  • Replacements
  • Utilities

Replacements

I think a great way to start would be listing the ones that aim to replace existing builtin tools.

Zoxide

Off to a great start, Zoxide is supposed to be a “smart cd", and it does the job pretty well. It works in a way that it remembers the directories you’ve been, providing you the option to navigate to them later with simple keywords.

z entire path, then z directory name

You don’t even need to type the entire directory name for it to work.

# This would work as well
z duel

# Can be even more concise if I want
z du

# Separate words work the same
z duel proto

Ripgrep

This one takes an already very useful tool — grep command — and makes it even better. It’s written in Rust, so it makes to a pretty huge performance gain.

It also highlights the matched pattern by default, which is pretty convenient.

Just to show you, I made a very simple measurement where I searched for the term “input” recursively through my projects directory — where I got a couple ones.

To properly benchmark it, I used Hyperfine — which we’ll talk about later too.

To search for the same pattern across all my projects, Ripgrep managed to be almost 12 times faster than grep, which is pretty impressive! I use that tool all the time to search through files and get specific command output information.

Exa

This one is also written in Rust. It gives the classic ls a much nicer appearance by adding icons and colors based on each kind of file.

Output for exa — icons

Itt makes the permissions table much easier to read too:

Output for exa — icons -lha

I like it so much that I actually have aliases for those:

lh='exa --icons -lha'
ls='exa --icons'

Bat

Wrapping up our rusty section, bat aims to be a nice looking, feature-rich version of cat. It has syntax highlighting for many languages and even Git integration has made its way into the tool.

Output for bat Cargo.toml, which has Git integrations showing

Utilities

We’ve seen a couple of nice tools by now, time to see new stuff.

Hyperfine

Since we’ve already used this one to talk about Ripgrep, hyperfine is a command line tool that allows you to benchmark command executions. You don’t exactly need to be comparing two commands — like we did previously — to make use of this utility, but also to benchmark the execution time for your own scripts.

hyperfine on a bash script I wrote. It showed me that it takes about 2 seconds to execute

This is a great way to keep track of the performance of some application you are willing to improve.

FZF

This one is essential. it is a fuzzy finder command-line tool that serves many purposes. Think of it like an interactive grep — or ripgrep, since we are all on replacements today.

I often use it to search for specific commits that I can’t quite remember its message. I can use fzf command to loosely search by some keywords.

git log — oneline | fzf
It outputs the selected entry, so you can do all kinds of command pipeline with that.

GitHub CLI

Also known as gh, GitHub CLI can do all kinds of operations on GitHub platform. Listing issues, visualizing and reviewing PRs, merging them, and much more.

One of the features I like the most is that, if you know a repo’s owner and name, It’s possible to simply use the <owner>/<repo> to interact with the repository.

Navigating through vtex-apps/store-components repository and issues.
Visualizing vtex-apps/store-components and its issues.

I just did basic reading operations, but all Issue and PR management is possible within this CLI. For those who work with GitHub but enjoy keeping your eyes in the terminal, this is an essential tool with a vast list of possibilities.

Tmux

I am always going on and off across multiple workspaces. For such, Tmux is my ally. It is a multiplexer, so it allows you to create multiple terminal instances within a same window.

It is highly configurable through .tmux.conf file, but it also supports plugins for extended functionality through Tmux Plugin Manager (tpm).

It has a more steep learning curve compared to the rest of the list, but it is really worth it.

Honorable Mentions

NeoVim

It’s hard to not talk about it. NeoVim is my text-editor of choice, and it keeps me closer to the terminal. I’ve already talked a lot about it in another article I wrote in here.

Man

It is impossible to memorize all the ins and outs of all those great command-line tools. But you don’t really need to. Also, this is the only builtin tool in the list that I talk about.

The man command stands for Manual. It gives you the manual for your most beloved tools.

Output for man git
Git Manual first lines

It’s perfect for checking all the possible arguments you can pass to a command. It’s simple, but essential for any Linux user.

Final Thoughts

Taking the proper time to carefully learn the tools you use is essential for whoever wants to keep up with productivity. I highly recommend taking a further look into the tools I mentioned.

Since I am always reevaluating my arsenal, I am also open to hear what tools you think would be worth recommending!

--

--