Top CLI tools every developer should know, matched to a job
Five modern CLI tools that replace slow defaults: fd for files, rg for code, fzf for picking.
Published here , updated · 5 sources · Resume reading
Classic UNIX tools still work. For everyday developer jobs, five modern CLIs give better defaults: fd for files, rg for code search, fzf for picking, bat for reading, and jq for JSON [1][2][3][4][5]. Match the tool to the job, then keep find and grep for the odd script that must stay portable.
Quick start: search code, then list matching files
On this host (ripgrep 15.1.0-cursor5, jq 1.7, fd-find 9.0.0 as fdfind):
mkdir -p /tmp/cli-demo && cd /tmp/cli-demo
printf 'export const x = 1\n// TODO: fix\n' > a.ts
printf 'export const y = 2\n' > b.ts
printf '{"name":"demo","count":3}\n' > package.json
rg TODO .
fdfind -e ts .
echo '{"stargazers_count":12345}' | jq '.stargazers_count'Captured:
./a.ts:// TODO: fix
/tmp/cli-demo/a.ts
/tmp/cli-demo/b.ts
12345That is the whole habit: search with rg, locate with fd/fdfind, shape JSON with jq.
Find files: fd instead of find
fd respects .gitignore, searches recursively by default, and uses simpler syntax than classic find [2].
fdfind -e ts /tmp/cli-demoYou should see TypeScript paths under that tree, skipping ignored directories when a .gitignore is present. On Debian and Ubuntu the package binary is often fdfind; alias it:
alias fd=fdfindfind remains useful for portable scripts and exotic predicates. Prefer fd at the interactive prompt.
Search code: ripgrep instead of grep
ripgrep skips .git, node_modules, and binary files by default and is built for large trees [1].
rg TODO /tmp/cli-demo
rg -n 'export const' /tmp/cli-demo -t tsCaptured first command above. You should see matching lines with paths. Add -n when you want line numbers in every environment (some builds show them by default).
Pick from a list: fzf
fzf turns any list into an interactive fuzzy picker [3]. Pipe file paths, git branches, or history into it:
fdfind -e ts /tmp/cli-demo | fzfType to filter, arrows to move, Enter to confirm. In scripts that cannot be interactive, skip fzf and keep rg/fd filters instead.
Read files: bat instead of cat
bat adds syntax highlighting, line numbers, and git diff markers, and falls back to plain output when piped [4].
bat package.json
# or when bat is not installed yet:
cat package.jsonInstall with your package manager when missing. Prefer bat for human reading; prefer plain cat or redirection when a machine consumes the bytes.
Parse JSON: jq
jq filters and transforms JSON from APIs and config files [5].
printf '{"name":"demo","count":3}\n' | jq '.count'
curl -s https://api.github.com/repos/sharkdp/bat | jq '.stargazers_count'Local capture for the printf form:
3You should see a plain number for .stargazers_count when the network call succeeds. Offline, pipe a saved JSON file the same way.
One job, one default tool; compose them with pipes when the job has two steps.
Install all five
# macOS
brew install ripgrep fd bat fzf jq
# Debian / Ubuntu
sudo apt install ripgrep fd-find bat fzf jq
# Arch
sudo pacman -S ripgrep fd bat fzf jqOn Debian and Ubuntu, remember fdfind versus fd. Some distros ship bat as batcat; check command -v.
PATH and agents
Coding agents that say "run rg" assume that name resolves in the environment they launch. If an agent starts with a minimal PATH, your interactive aliases may be invisible. See the file walk in essential Linux commands part 1.
Compose patterns that pay rent
Find then pick:
fdfind -e md ~/projects | fzfSearch then open with bat (when bat is installed):
rg -l 'TODO' src | fzf | xargs batAPI then field extract:
curl -s https://api.github.com/repos/BurntSushi/ripgrep | jq '{name,stars:.stargazers_count,lang:.language}'Shell config that makes the five tools stick
Add durable aliases and completions once, then stop thinking about package names:
# ~/.bashrc or ~/.zshrc excerpts
command -v fdfind >/dev/null && alias fd=fdfind
command -v batcat >/dev/null && alias bat=batcat
# optional: fd + fzf file widget if you use fzf keybindings [2][3]Reload the shell and confirm with command -v rg fd fzf bat jq (or the distro names). Put the same notes in a team dotfiles README so new laptops do not rediscover fdfind during an incident.
Git workflows that pair well
git branch --format='%(refname:short)' | fzf
git log --oneline | fzf
rg -n 'TODO|FIXME' $(fdfind -e go -e rs -e py -e ts)Interactive pickers belong at the keyboard. In CI, replace fzf with explicit rg filters and exit codes so jobs stay non-interactive [1][3].
Performance habits without fake benchmarks
ripgrep and fd skip ignored and binary paths by default, which is why they feel fast on real repos [1][2]. If a search is still slow, check whether you are scanning a mounted network disk, a huge build artifact directory that is not ignored, or a compressed archive tree. Fix ignore rules before buying a new laptop story.
JSON edges jq handles cleanly
Select, filter, and reshape without temporary files:
printf '{"items":[{"id":1,"ok":true},{"id":2,"ok":false}]}\n' | jq '.items[] | select(.ok) | .id'Captured:
1Read the jq manual when you reach reduce, streaming, or CSV input; the five-tool set still starts with simple filters [5].
Mistakes that keep you on slow defaults
Reaching for recursive grep -R on a node project without excluding node_modules, then blaming the disk.
Writing a 40-character find expression for "all .ts files" when fd -e ts was enough [2].
Parsing JSON with chained sed when jq already expresses the field path [5].
Installing the tools globally but never aliasing fdfind to fd, so muscle memory fails on Debian.
Expecting every agent shell to share the same PATH as your interactive prompt.
Piping fzf into a cron job or CI step that has no TTY, then calling the tool unreliable.
Teaching the set to a new teammate
Spend fifteen minutes on a shared screen: rg a TODO, fd/fdfind an extension, jq one field, bat a config, fzf a branch list. Stop when each command has produced one real result on your repo. Tool tours without a live tree do not stick [1][2][3][4][5].
Write the five jobs on a sticky note near the monitor for a week: find, search, pick, read, parse. When your hand reaches for an old default, check the note first.
CI images and hermetic builds
Pin tool versions in Docker images the same way you pin language toolchains. A job that assumes rg exists on GitHub-hosted runners may pass today and fail when the image changes. Prefer sudo apt-get install of known packages in the workflow, or bake them into your custom image, rather than relying on interactive aliases from a laptop.
When the classic tools still win
Busybox-only images, ancient CI runners, and "must work on a coworker laptop with no brew" scripts should stick to POSIX find/grep. Interactive day-to-day work should not. Keep a portable script in scripts/ that uses only POSIX tools when that script must run on unknown hosts, and keep the modern five on the developer PATH for everything else.
Depth without dogma: grep -R is not immoral. It is just the wrong default for a multi-gigabyte monorepo with node_modules sitting one directory away. Match the tool to the job, measure when something feels slow, and keep the five installs boring and always present.
If you only install two tools this month, install ripgrep and fd. They remove the largest daily tax. Add jq next if you touch APIs, then bat and fzf once the first three are muscle memory [1][2][3][4][5]. A partial set still beats a perfect wiki page nobody runs.
Print a one-page cheat sheet for your team with the five example commands from this page. Tape it under a monitor for a sprint. When the sheet is covered in coffee and nobody asks where recursive grep went, the habit stuck.
For the next shell layer see essential Linux commands part 2. Browse the Dev tools topic.
Send this to the friend who still uses find and grep for everything in a huge tree.

Keep this guide
Filed under Dev tools
Questions about this guide
Do these work on Windows?
Yes. All five install via scoop, cargo, or winget. fzf and ripgrep have native Windows builds.
Do I need to uninstall grep and find?
No. The originals still work. These are faster alternatives with better defaults for common developer tasks.
What is the Debian binary name for fd?
On Debian and Ubuntu packages, the binary is often fdfind to avoid a name conflict. Alias it to fd in your shell config.
Sources
- ripgrep GitHub repositorygithub.com
- fd GitHub repositorygithub.com
- fzf GitHub repositorygithub.com
- bat GitHub repositorygithub.com
- jq manualjqlang.github.io