🍋
Menu
How-To Beginner 2 min read 414 words

Developer Productivity CLI Tools You Should Know

The command line remains the most efficient interface for many developer tasks. Modern CLI tools offer dramatic speed improvements, better defaults, and richer output compared to their traditional Unix counterparts.

Key Takeaways

  • A new generation of CLI tools, many written in Rust, replaces traditional Unix commands with faster, more user-friendly alternatives.
  • `fd` is a fast, user-friendly alternative to `find`.
  • `bat` displays file contents with syntax highlighting, line numbers, and git diff markers.
  • `jq` is essential for working with JSON API responses.
  • On macOS, install everything via Homebrew: `brew install fd ripgrep fzf bat eza delta jq httpie direnv`.

The Modern CLI Renaissance

A new generation of CLI tools, many written in Rust, replaces traditional Unix commands with faster, more user-friendly alternatives. These tools maintain compatibility with their predecessors while adding features like syntax highlighting, fuzzy matching, and intelligent defaults.

fd (find replacement)

fd is a fast, user-friendly alternative to find. It ignores .gitignore patterns by default, uses regex, and provides colorized output. Finding all Python files: fd -e py instead of find . -name '*.py'.

ripgrep (grep replacement)

rg searches file contents faster than grep by respecting .gitignore, using parallelism, and skipping binary files. Search for a function name: rg 'def process_image' instead of grep -r 'def process_image' .

fzf (fuzzy finder)

fzf adds fuzzy search to any command. Pipe file lists, command history, or git branches through fzf for interactive selection. Press Ctrl+R with fzf installed for fuzzy command history search — far superior to the default reverse search.

Better Defaults

bat (cat replacement)

bat displays file contents with syntax highlighting, line numbers, and git diff markers. It automatically pipes through a pager for long files. Use it as a drop-in cat replacement: alias cat='bat'.

eza (ls replacement)

eza replaces ls with colorized output, git status indicators, and tree views. eza -la --git shows permissions, sizes, and git status in a single command. eza --tree --level=3 replaces tree -L 3 with better formatting.

delta (diff replacement)

delta enhances git diff output with syntax highlighting, side-by-side view, and line numbers. Configure it as your default git pager: git config --global core.pager delta.

Development Workflow

jq (JSON processor)

jq is essential for working with JSON API responses. Pretty-print: curl -s api.example.com | jq . — Extract fields: jq '.data[] | .name' — Filter: jq '.items[] | select(.status == "active")'.

httpie (curl alternative)

http provides a more intuitive syntax than curl for API testing: http GET api.example.com/usersJSON body: http POST api.example.com/users name=John [email protected] — Auto-formats and colorizes responses.

direnv (directory-specific env vars)

direnv automatically loads .envrc files when you enter a directory and unloads them when you leave. Different projects can have different environment variables without manual switching. Combined with .env files, it eliminates the "forgot to source the env" problem.

Installation

On macOS, install everything via Homebrew: brew install fd ripgrep fzf bat eza delta jq httpie direnv. On Linux, most are available through package managers or as single-binary downloads from GitHub releases.