Skip to content
3 min read Tools

Favorite CLI Tools

These CLI tools saved me lots of time and I find them generally a joy to work with.

It's all about sharing the love and the magic, and maybe you'll find a new favorite or two. Let me know if you have an invaluable CLI tool that you can't live without.

bat - a cat(1) clone with wings

I love this. It's a drop-in replacement for cat that adds syntax highlighting, Git integration and lots more. It's written in Rust and is blazing fast. sharkdp/bat: A cat(1) clone with wings.

How to use bat

To glance at a file using bat, simply provide the path:

bat /path/to/your/file

The syntax highlighting and file-specific metadata make bat a joy to use, ensuring you can inspect code and text files in style.

Homebrew - The missing macOS package manager

It's simply a must-have for every Mac user. Whether it's installing a new programming language, a database server, or the latest web framework, Homebrew streamlines the process, taking out the need for locating and manually downloading software.

The brew command

Working with Homebrew is straightforward:

brew update
brew install <package>

httpie - HTTP client for the command line

Making HTTP requests from the command line has never been more elegant than with httpie. It simplifies interaction with APIs and web services, offering a user-friendly interface and an eye-pleasing HTTP request syntax colorization.

Crafting requests with httpie

A basic GET request:

https httpie.io/hello

Output:

{
    "ahoy": [
        "Hello, World! 👋 Thank you for trying out HTTPie 🥳",
        "We hope this will become a friendship."
    ],
    "links": {
        "discord": "https://httpie.io/discord",
        "github": "https://github.com/httpie",
        "homepage": "https://httpie.io",
        "twitter": "https://twitter.com/httpie"
    }
}

jq - Command-line JSON processor

jq is a sed-like tool that parses, manipulates, and displays JSON objects from the comfort of the command line. It excels at selectively filtering and transforming complex JSON data, which is a common task when working with APIs and backend services.

Transforming with jq

Filtering results:

https httpie.io/hello | jq "{links}"

This will present just the links from the JSON response. jq is nice for quickly juggling JSON data.

lando - Local development environment and DevOps tool built on Docker containers

For local development, lando is mighty. It configures and manages Docker-based development environments, providing an abstraction layer that spares developers the mundanity of configuring development Docker environments and installing necessary tools and software versions.

A lando starter

Creating a Wordpress site:

lando init --recipe wordpress

And with that simple command, you're on your way to local Wordpress development with a containerized environment. lando integrates with other tools such as composer, npm, and gulp to streamline development workflows. It's an excellent tool for building, testing, and deploying applications locally. One of the most powerful features is the ability to define multiple environments in a single configuration file (e.g. local, staging, production) that can be easily switched between.

ohmyzsh - Delightful framework for managing your zsh configuration

ohmyzsh transforms the already powerful zsh into a feature-rich and stylish terminal environment. With themes, plugins, and an active community contributing enhancements, ohmyzsh makes the terminal experience more personal and productive.

ohmyzsh also comes packed with a variety of plugins that add new features to zsh, such as an auto-suggestion tool and syntax highlighting, making it even more powerful. These can be easily enabled or disabled through the ~/.zshrc file as well.

zsh-autosuggestions

Getting along well with ohmyzsh, this tool offers context-aware auto-completion, predicting your command line moves, and saving keystrokes in the process. Start by typing a command and, based on your history, zsh-autosuggestions will begin offering predictions. You can cycle through suggestions with the right arrow key or accept one with the tab key.

rbenv - Ruby Version Manager

For managing multiple Ruby environments, rbenv is vital. It allows for per-project Ruby versions, which is a blessing when working on legacy software that demands older Ruby interpreters alongside the current releases.

Install a Ruby version

# List installable versions
rbenv install -l

3.1.6
3.2.6
3.3.7
3.4.1
jruby-9.4.10.0
mruby-3.3.0
picoruby-3.0.0
truffleruby-24.1.1
truffleruby+graalvm-24.1.1

# Build and install version 3.4.1
rbenv install 3.4.1

Switching global Ruby version

rbenv global 3.4.1

This indicates that generally Ruby 3.4.1 should be used, while local projects can specify a different version in their .ruby-version file. When executing bundle command, or any other code that requires a Ruby environment, rbenv will use the specified or else the global version.

Read next