| name | using-modern-cli |
| description | Prefer modern CLI tools for better performance: rg (ripgrep) instead of grep for text searching, fd instead of find for file discovery, bat instead of cat for viewing files, sd instead of sed for text replacement, eza instead of ls for directory listing, dust instead of du, procs instead of ps. Use when writing bash scripts, optimizing command chains, working with file searches, or replacing grep/find/cat in workflows. These tools are faster, respect .gitignore, and have better output formatting. |
| user-invocable | false |
| allowed-tools | ["Bash"] |
Modern CLI Tools
Use faster, ergonomic command-line tools installed on this system.
Quick Reference
| Task | Modern | Traditional | Why Modern |
|---|
| Search text | rg | grep | 10-100x faster, respects .gitignore |
| Find files | fd | find | Simpler syntax, ignores .git |
| View files | bat | cat | Syntax highlighting, line numbers |
| List files | eza | ls | Icons, git status, tree view |
| Replace text | sd | sed | Intuitive regex, preview mode |
| Disk usage | dust | du | Visual tree, sorted by size |
| Processes | procs | ps | Tree view, sortable columns |
| Diff files | delta | diff | Syntax highlighting, side-by-side |
Examples
rg "TODO" --type go
rg -A 3 "error"
rg -l "import"
fd "\.go$"
fd -e json src/
fd -x wc -l {}
bat main.go
bat -n file.py
eza -la --git
eza --tree -L 2
sd "old" "new" file.txt
sd -p "pattern" "new"
dust -d 2
procs --tree
Productivity Tools
vim $(fd . | fzf)
rg "pattern" | fzf
hyperfine "rg pattern" "grep -r pattern"
tokei .
glow README.md
jq '.key' file.json
yq '.key' file.yaml