Modern CLI Overrides
As an AI agent, you were likely trained heavily on traditional POSIX tools (grep, find, sed, awk, ls). However, modern development environments use faster, safer, and more intelligent alternatives.
ABSOLUTE RULE: Do not use the traditional tools if a modern equivalent exists in this environment.
The Overrides
When generating shell commands or writing scripts, apply the following tool substitutions:
1. Use rg (ripgrep) instead of grep
rgis drastically faster and respects.gitignoreby default.- DO NOT USE:
grep -r "pattern" . - USE:
rg "pattern"
2. Use fd instead of find
fdhas a simpler syntax and respects.gitignore.- DO NOT USE:
find . -name "*.py" - USE:
fd -e py
3. Use sd or sg instead of sed
sedescaping is error-prone and dangerous for code refactoring.- For simple string/regex replacement, use
sd. - DO NOT USE:
sed -i 's/old/new/g' file - USE:
sd 'old' 'new' file - For codebase-wide structural refactoring, use
sg(ast-grep). See theast-grepskill.
4. Use eza instead of ls
ezaprovides better defaults and git status integration.- DO NOT USE:
ls -la - USE:
eza -la --git
5. Use jq instead of grep/awk for JSON
- Never attempt to parse or extract values from JSON files using text-processing tools.
- DO NOT USE:
grep '"key":' file.json | awk '{print $2}' - USE:
jq '.key' file.json
6. Use httpie (http) instead of curl
curlsyntax for JSON payloads is tedious and error-prone.httpieprovides intuitive syntax, automatic JSON parsing, and avoids escaping hell.- DO NOT USE:
curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' api.com - USE:
http POST api.com key=value
Syntax Reference
For exact flag translations and advanced usage of these modern tools, refer to: references/tool-mappings.md