Stackable

Stackable

7 Useful CLI Tools You Can Give a Try

What CLI tools do you LOVE to use? Is there something you wouldn’t want to miss?

I asked this question in the Stackable Slack a few days ago, got some cool replies and wanted to share them on.

Interested in discovering new CLI tools to enhance your dev experience? Here’s a hand-picked selection of CLI tools, for you to check out!

autojump-rs

Quickly jump to folders by just typing a few chars. It automatically learns which directories you use the most frequent.

Autojump is “a faster way to navigate your filesystem” (as described in the original autojump repo). autojump-rs is a drop-in replacement for autojump. It delivers responses quicker, due to being written in Rust instead of Python.

Note: I tend to navigate to the same directories over and over, and always hesitate before remembering what the exact command for the file explorer is. It immediately resonated.

You can find the autojump-rs repo here. The original autojump repository does a better job of conveying how the tool is used. So you might want to start there.

direnv

Upon entering a directory, it sets up my whole development environment for that specific project. I use it in combination with Nix.

direnv is an extension for your shell, with the goal to “unclutter your .profile”.

On every command you issue, it checks for a .env or .envrc file. If found, it sets (and unsets) environment variables depending on your current directory.

Here’s an example demonstrating how the right helm binary is visible (or not), depending on the current working directory, thanks to direnv working in the background:

~ $ helm repo list
helm: command not found
~ $ cd projects/stackable
~/projects/stackable $ helm repo list
NAME                    URL
bitnami                 https://charts.bitnami.com/bitnami
stackable-stable        https://repo.stackable.tech/repository/helm-stable
stackable-dev           https://repo.stackable.tech/repository/helm-dev
stackable-test          https://repo.stackable.tech/repository/helm-test
~/projects/stackable $ cd
~ $ helm
helm: command not found

With direnv, you can stop worrying about versions of tools and pay more attention to getting things done.

fd

A faster alternative to find, and the output is not as cluttered with permission denied warnings.

fd lets you find stuff in your filesystem, but without stumbling over the command syntax of find. It also does all kinds of neat tricks to be faster than you expect.

jq

Wonderful when trying to pipe stuff between programs that don’t quite agree on each other or the format.

jq lets you do useful things with JSON! Think “Swiss Army knife for JSON”. Do you want to transform or get data from a JSON source with a single command?

A great alternative to writing one-off JSON processing code in your usual scripting language of choice.

If you’re curious to find out more, head over to the tutorial. It has some great usage examples.

Are you wrangling YAML & XML as well as JSON? You might also want to check out yq as well.

Oh My Zsh

A sufficiently-fancy Zsh config without too much hassle.

Not a CLI tool, but a framework for making Zsh more fun to use. Oh My Zsh helps you to manage your Zsh configuration and provides good looking themes. An easy way to customize your Zsh experience.

ripgrep

It’s just so fast to search for anything across all my code, docs and notes.

rg is a faster version of grep. So fast in fact, that you won’t mind using it, even when you let it loose on lots of data at once.

You can find its repo, and some use-cases here.

tealdeer

Another drop-in replacement for a popular tool! This time for the glorious tldr tool. tldr $CLI_TOOL provides usable, and useful examples of how $CLI_TOOL can be used.

$ tldr find
# if you can relate to this command, check out the next tool!

Yes, it’s slightly faster. You can find tealdeer here.

Looking For More?

The above list is a hand-picked selection of recommendations from the Stackable dev team.

If you’re looking for more examples of powerful CLI tools – check out this thread on reddit. It focuses on CLI tools written in Rust, but there’s a lot of good stuff in there!

Comments are closed.