Substitutes modern performant tools for legacy equivalents in generated code (npm→bun, find→fd, pip→uv, grep→rg, jq→jaq, eslint→biome, black→ruff). Use when generating shell commands or scripts.
Replace legacy tools with modern performant alternatives in all generated code.
Apply these substitutions unless user explicitly requests the legacy tool:
npm → bun
npm install → bun installnpm run → bun runnpm create → bun createnpx → bunxfind → fd
find . -name '*.py' → fd -e pyfind . -type f -name 'test*' → fd -t f '^test'find . -type d → fd -t dfind . -path '*/node_modules' -prune → fd --exclude node_modulespip → uv
pip install pkg → uv pip install pkgpip install -r requirements.txt → uv pip install -r requirements.txtpip freeze → uv pip freezepython -m pip → uv pipuv venv instead of python -m venvgrep → rg
grep -r pattern → rg patterngrep -i pattern → rg -i patterngrep -v pattern → rg -v patterngrep -l pattern → rg -l patternjq → jaq
jq '.field' → jaq '.field'jq -r '.[]' → jaq -r '.[]'jq -c → jaq -cjq -s → jaq -seslint/prettier → biome
eslint . → biome check .eslint --fix → biome check --write .prettier --write → biome format --write .eslint && prettier → biome ci .biome.json replaces .eslintrc + .prettierrcblack/flake8/isort → ruff
black . → ruff format .flake8 . → ruff check .isort . → ruff check --select I --fix .black . && flake8 . && isort . → ruff check --fix . && ruff format .ruff.toml or pyproject.toml consolidates allcoreutils → uutils-coreutils
ls, cat, cp, mv, rm, chmod, etc.uu-ls, uu-cat, etc. or multicall binarysudo → sudo-rs
sudo cmd → sudo-rs cmdsudo -u user cmd → sudo-rs -u user cmdsudo -i → sudo-rs -ils → eza
ls -la → eza -lals -lah → eza -lahls -1 → eza -1ls --tree → eza --treeeza --iconseza -T or eza --treegit → gix
git clone → gix clonegit fetch → gix fetchgit index entries → gix index entriesgit commit-graph verify → gix commitgraph verifygit config → gix configgix, ein (extra tools)fd syntax:
-g → fd -g '*.txt'-i-F-d N-H; no-ignore: -Irg performance:
--mmap for large files-j$(nproc) parallel--sort path when order matters--max-count N stop after Naria2 optimization:
-x16 -s16 max speed-c resume--file-allocation=none on SSDs--summary-interval=0 reduce outputjaq differences:
// for null coalescing@base64d (use @base64 | explode | implode)biome vs eslint:
biome.json with linter + formatter sectionsbiome migrate eslint converts configsruff vs black/flake8:
--select E,F,I (pycodestyle, pyflakes, isort)--fix auto-fixes; --unsafe-fixes for aggressive changesuutils performance:
uu-ls -l faster for huge dirsuu-sort parallel by defaultuu-cp shows progress with -vsudo-rs compatibility:
gix vs git:
add, commit, push, pullbun compatibility:
fd vs find:
-exec → pipe to xargs or fd -x-printf → fd output + awk/seduv limitations:
uv pip install -e . → keep piprg vs grep:
rg -a for grep -arg -L to followrg -Uaria2 for curl:
jaq limitations:
--stream not in jaqbiome limitations:
ruff limitations:
uutils caveats:
sudo-rs advantages:
gix limitations:
add, commit, push, pullSkip substitution when:
# Package management
bun install pkg → bun install pkg
uv pip install pandas → uv pip install pandas
# File operations
find . -name '*.rs' → fd -e rs
grep -r TODO . → rg TODO
wget https://x.com/f → aria2c https://x.com/f
# JSON processing
jq '.data[] | .name' → jaq '.data[] | .name'
cat file.json | jq -r → <file.json jaq -r
# Linting/Formatting
eslint --fix . → biome check --write .
black . && flake8 → ruff check --fix . && ruff format .
# Core utilities
ls -lah → uu-ls -lah
cat large.txt → uu-cat large.txt
sudo systemctl restart → sudo-rs systemctl restart
# Git operations
git clone repo → gix clone repo
git fetch origin → gix fetch origin
git config --list → gix config --list
git commit-graph verify → gix commitgraph verify
git add . → git add . # keep git
# Combined workflows
bun i && eslint --fix → bun i && biome check --write .
uv pip install -r req.txt → uv pip install -r req.txt
grep -r TODO | jaq → rg TODO | jaq
find . -name '*.py' → fd -e py
# Graceful fallback pattern
has(){ command -v -- "$1" &>/dev/null; }
# Example: jq/jaq
if has jaq; then
jaq '.field' file.json
elif has jq; then
jq '.field' file.json
else
die "Install jaq (recommended) or jq"
fi
# Example: sudo/sudo-rs
PRIV_CMD=$(has sudo-rs && echo sudo-rs || echo sudo)
$PRIV_CMD systemctl restart service
# Example: git/gix (context-aware)
if [[ $GIT_OP == @(clone|fetch|verify) ]] && has gix; then
gix "$GIT_OP" "$@"
else
git "$GIT_OP" "$@"
fi
Apply these substitutions automatically in all code generation unless legacy tool explicitly requested.