As engineers, much of our work revolves around the terminal, which is enriched by a variety of CLI tools. These tools can streamline our experience in the command line, making it more efficient and enjoyable.
Here I share the CLI tools that have become indispensable in my workflow. Additionally, I’ve compiled a list of other CLI tools that I’m looking forward to exploring. For convenience, I’ve provided scripts to automate the installation of my preferred tools on Debian/Ubuntu-based distributions and macOS, which are part of my daily toolkit.
Quick install scripts
I use Debian/ubuntu based Linux distros and MacOS as my daily drivers so here would be a quick way to install them on each
MacOS:
# Tools and dependencies
export PROGRAMS="fx jq yq httpie gping lazygit tig exa fd fzf neofetch tmux navi bpytop duf dua-cli rclone micro ripgrep diff-so-fancy the_silver_searcher tre-command tailspin doggo mactop sig yazi ffmpegthumbnailer unar poppler fd ripgrep fzf zoxide font-symbols-only-nerd-font"
# might be reqiured for mactop:
brew tap context-labs/mactop https://github.com/context-labs/mactop
export INSTALLER="brew"
for program in $PROGRAMS ; do $INSTALLER install $program ; done
# fzf
# Install key bindings and fuzzy completion:
$(brew --prefix)/opt/fzf/install
# Gotty
brew install sorenisanerd/gotty/gotty
Debian/Ubuntu-based Linux distros
Installing from available package repositories where possible (and not necessarily the latest!):
export PROGRAMS="jq yq httpie tig exa fd-find neofetch tmux bpytop duf rclone micro ripgrep silversearcher-ag tre-command"
export INSTALLER="sudo apt"
for program in $PROGRAMS ; do $INSTALLER install $program -y ; done
# fzf
# Linux: Install with this script instead of apt so it sets up bindings etc
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
# Other tools we need to install wihout apt:
# fx
sudo curl https://fx.wtf/install.sh | sh
rm fx
# Install cargo first
# Requires
sudo apt install build-essential cargo
# reload bash with new cargo env
echo "export PATH=$PATH:~/.cargo/bin/" >> ~/.bashrc
source ~/.bashrc
# Tailspin
# Install using the cargo package manager
cargo install tailspin
# sig
# Install using the cargo package manager
cargo install sigrs
# dua-cli - if not available in apt
# Install
curl -LSfs https://raw.githubusercontent.com/Byron/dua-cli/master/ci/install.sh | \
sh -s -- --git Byron/dua-cli --target x86_64-unknown-linux-musl --crate dua --tag v2.29.0
# Yazi
# Requires latest rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update
# Now you can install Yazi from latest git version:
cargo install --locked --git https://github.com/sxyazi/yazi.git yazi-fm yazi-cli
# yq
sudo add-apt-repository ppa:rmescandon/yq -y
sudo apt update
sudo apt install yq -y
# doggo
cd "$(mktemp -d)"
curl -sL "https://github.com/mr-karan/doggo/releases/download/v0.3.7/doggo_0.3.7_linux_amd64.tar.gz" | tar xz
sudo mv doggo /usr/local/bin
# lazygit
cd "$(mktemp -d)"
export LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin
cd ~
# gping
echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ stable main" | sudo tee /etc/apt/sources.list.d/azlux.list
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg
sudo apt update
sudo apt install gping
# Navi
bash <(curl -sL https://raw.githubusercontent.com/denisidoro/navi/master/scripts/install)
# diff-so-fancy
LATEST_VERSION=$(curl -s https://api.github.com/repos/so-fancy/diff-so-fancy/releases/latest | grep -Po '"tag_name": "v\K[^"]*')
sudo curl -L -o /usr/local/bin/diff-so-fancy "https://github.com/so-fancy/diff-so-fancy/releases/download/v${LATEST_VERSION}/diff-so-fancy"
sudo chmod +x /usr/local/bin/diff-so-fancy
# Add Diff-so-fancy Custom Pager into the LazyGit User Config
# https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#user-config
mkdir -p ~/.config/lazygit
cat << EOF >> ~/.config/lazygit/config.yml
git:
paging:
colorArg: always
pager: diff-so-fancy
EOF
My favourite tools
JSON
jq
- flexible command-line JSON processor.fx
- Terminal JSON viewer & processorjnv
- Designed for navigating JSON, offering an interactive JSON viewer andjq
filter editor.
YAML
yq
- YAML, JSON, and XML processor.yq
uses jq like syntax but works withyaml
files as well asjson
, xml,
properties
,csv
andtsv
HTTP Tools
- httpie - (
http
) A simple yet powerful command-line HTTP and API testing client for the API era.
Network Tools
doggo
a modern command-line DNS client (like dig) written in Golang. It outputs information in a neat concise manner and supports protocols like DoH, DoT, DoQ, and DNSCrypt as well.gping
- Interactive ping tool (better thanping
)
Git
I use tig
for repository browsing and lazygit
for staging and committing:
lazygit
A simple terminal UI for git commandstig
functions mainly as a Git repository browser but can also assist in staging changes for commits at the chunk level and act as a pager for output from various Git commands.
Terminal
exa
- A modern replacement forls
.fd
is a program that finds entries in your filesystem. It is a simple, fast, and user-friendly alternative tofind
.fzf
is a general-purpose command-line fuzzy finder.neofetch
- Show system data and distro infotmux
- terminal multiplexer. It lets you switch between several programs in one terminal, detach them (they keep running in the background), and reattach them to a different terminal.sig
- interactive search through (streaming) data, updating results in real-time.yazi
- fast terminal file manager written in Rust, based on async I/O.GoTTY
- Share your terminal as a web application. Note:sorenisanerd/gotty
is the active project to use for Mac SiliconLLM Helpers
yek
is a fast rust-based tool to read text-based files in a repository or directory, chunk them, and serialize them for LLM consumption.Help Manuals
navi
- Interactive cheat sheet. It integrates with tldr and cheat.sh to get content, but you can also import other cheatsheets or even write your ownResource monitoring
bpytop
- Resource monitoring (likehtop
). It shows top running processes, recent CPU, memory, disk, and network history.glances
- Monitor resources. It includes a fully responsive web view, a REST API, and historical monitoring.
Disk
duf
- Disk Usage liedf
. It is great for showing info about mounted disks and checking free space.dua-cli
let’s you interactively view used and available disk space for each mounted drive and makes freeing up storage easy
Cloud Storage
rclone
- a handy utility for syncing files and folders to various cloud storage providers
Text Editor
micro
- minimal Code editor likenano
with more featuresText
bat
- Acat
clone with syntax highlighting and Git integration.- ripgrep-
rg
is a line-oriented search tool that recursively searches the current directory for a regex pattern diff-so-fancy
- Gives you better-looking diffs for comparing strings, files, directories, andgit
changesFile Search
ag
- aka the Silver Searcher, is significantly faster and should be used as a drop-in replacement forack
tre
- Directory hierarchy ( Alternative totree
). It outputs atree
style list of files for your current or a specified directory, with colors. When running with the-e
option, it numbers each item and creates a temporary alias that you can use to quickly jump to that location
Logs
tailspin
- (tspin
) parses log lines to highlight data formats like dates, IPs, UUIDs, numbers, HTTP methods, etc. Highlighting rules are configurable. You can watch and follow files in a directory. It uses less than the pager with keyboard navigation, search, and filtering support.
Kubernetes
k9s
- Kubernetes dashboard app
Looks interesting, but I haven’t tried it yet…
asciinema
is useful for easily recording, sharing, and embedding a terminal session.autojump
- (j) is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line.bandwhich
- Bandwidth utilization monitor.browsh
- An interactive, real-time, modern text-based browser rendered to TTYs and browsers.ctop
- Container metrics and monitoring.ådirenv
- Augments your existing shells with a cool feature that loads and unloads environment variables based on the current directory.entr
- Watch for file changes. You can pass a file, directory, symlink, or regex to specify which files it should watch. It’s useful for automatically rebuilding projects, reacting to logs, automated testing, etc.fdupes
- Duplicate file finder. It can be used for identifying and/or deleting duplicate files within specified directories. It’s useful for freeing up disk space when you’ve got two or more identical files.- [
figlet
](http://www.figlet.org/ - Output text as big ASCII art text. - freeze - Generate images of code and terminal output.
hub
is an extension to command-linegit
that helps you do everyday GitHub tasks without ever leaving the terminal.- inshellisense - IDE style autocomplete for shells. It’s a terminal native runtime for autocomplete , which has support for 600+ command line tools
kdash
- Kubernetes dashboard app written in rustjust
- A handy way to save and run project-specific commands. Commands, called recipes, are stored in a file calledjustfile
with syntax inspired by make.lazydocker
- Full Docker management app.most
- A pager for reading through long files or command outputs. Most support multi-windows and have the option not to wrap text.ngrok
- (Safely) exposes your localhost to the internet behind a unique URL.procs
- Process viewer (A better ps). It is an easy-to-navigate process viewer, with colored highlighting, sorting, and searching for processes made easy, a tree view, and real-time updates.rip
- A deletion tool that is safe, ergonomic, and performant. It lets you intuitively remove files and directories and easily restore deleted files.scc
- Count lines of code (an alternative tocloc
).sd
is an easy, fast, and intuitive find-and-replace tool based on string literals. It can be executed on a file, an entire directory, or any piped text.surge
- A free static hosting provider you can deploy directly from the terminal in a single command; just runsurge
from within your dist directory! It supports custom domains, auto SSL certs, pushState support, and cross-origin resource support - and it’s free!thefuck
- Auto-correct miss-typed commands like magic.tldr
- taps into a huge collection of community-maintained man pages. It’s a great alternative to man.tmate
- share a live terminal session with someone elsewhere.transfer
- Upload and share files from the command line easily. It’s free, supports encryption, gives you a unique URL, and can be self-hosted.- aria2 - (
aria2c
) Download Utility. It is a lightweight, multi-protocol, resuming download utility for HTTP/HTTPS, FTP, SFTP, BitTorrent, and Metalink, with support for controlling via an RPC interface. - Livegrep is an amazing tool, partially inspired by Google Code Search, that allows you to interactively search gigabyte-scale source repositories using regex. You can check out a running instance at http://livegrep.com/.
- Trippy - Trippy combines the functionality of
traceroute
andping
and is designed to assist with the analysis of networking issues. - zoxide - (
z
) Easy navigation (an alternative to cd). It lets you jump to any directory without remembering or specifying its full path. It remembers the directories you’ve visited so that you can jump around quickly. - Posting - A TUI HTTP client for efficient keyboard-centric workflows over SSH, storing requests in easy-to-read, version-controlled YAML files.
Productivity Tools - Live in your terminal
I haven’t tried these either