Speed up Claude Code with modern CLI tools
Claude Code runs shell commands constantly — finding files, searching code, processing JSON, running scripts. The default Unix tools (find, grep, sed, node) work, but modern replacements written in Rust and Zig are significantly faster.
Installing these tools and telling Claude Code to prefer them can noticeably speed up your workflow.
A real example
I searched this blog’s codebase for the word “astro”:
- grep: 1.7 seconds
- ripgrep: 0.025 seconds (68x faster)
A typical Claude Code session might run 50-100 searches. At 1.7 seconds each, that’s nearly 3 minutes of waiting. With ripgrep, it’s under 3 seconds total. The difference compounds fast.
The tools
bun
Run JS/TS, install packages
- Replaces
- node / npm
- Speedup
- 4-25x
ripgrep (rg)
Search file contents
- Replaces
- grep
- Speedup
- 10x+
fd
Find files by name/pattern
- Replaces
- find
- Speedup
- 5-10x
sd
Find-and-replace in files
- Replaces
- sed
- Speedup
- 2-5x
jq
JSON processing (essential, often missing)
- Replaces
- n/a
- Speedup
- n/a
GNU parallel
Run shell tasks concurrently
- Replaces
- n/a
- Speedup
- n/a
Install on macOS
# Install bun (has its own installer)curl -fsSL https://bun.sh/install | bash
# Install the rest via Homebrewbrew install ripgrep fd sd jq parallelInstall on Windows
Windows has three package managers. Pick one approach and stick with it.
Option A: winget (built into Windows 11)
winget install Oven-sh.Bunwinget install BurntSushi.ripgrep.MSVCwinget install sharkdp.fdwinget install jqlang.jqNote: sd is not available via winget. Install it with scoop (scoop install sd) or cargo (cargo install sd).
Option B: scoop (popular with developers, no admin rights needed)
First install scoop if you don’t have it:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserInvoke-RestMethod -Uri https://get.scoop.sh | Invoke-ExpressionThen install the tools:
scoop install bun ripgrep fd sd jqGNU parallel on Windows
GNU parallel is a Unix tool with no native Windows version. Use it through WSL:
wsl --installThen inside your WSL terminal:
sudo apt-get install parallelTell Claude Code to use them
The key step: add these tools to your ~/.claude/CLAUDE.md file so Claude Code knows they’re available. Without this, Claude Code will fall back to the slower defaults.
Add this section to your CLAUDE.md:
## Installed CLI tools
- **bun** is installed — prefer over `node`/`npm` for running scripts, installing packages, and executing JS/TS- **ripgrep** (`rg`) is installed — prefer over `grep` for shell searches- **fd** is installed — prefer over `find` for file finding by name/pattern- **sd** is installed — prefer over `sed` for find-and-replace in files- **jq** is installed — use for JSON processing in shell pipelines- **GNU parallel** is installed — use for concurrent shell tasks when beneficialWhy this works
Claude Code reads CLAUDE.md at the start of every session. When it sees these instructions, it will reach for the faster tool every time it needs to search, find, or process something in the shell.
The speed gains compound quickly. A typical coding session involves dozens of file searches, content greps, and script executions. Shaving milliseconds off each one adds up.