You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rewrite: add fd (find) and sd (sed) to rewrite registry #1759
fd and sd are vastly superior alternatives to find and sed for AI agents:
Agents frequently write broken find commands (complex flag escaping, -not -path vs ! -path portability)
Agents frequently write broken sed commands (POSIX regex escaping, -i portability between GNU/BSD)
fd has simpler syntax, respects .gitignore by default, parallel traversal
sd uses standard regex (no POSIX escape hell), simpler syntax
Proposed rewrite rules
find . -name "*.ts" → fd -e ts
find . -name "*.ts" -not -path "*/node_modules/*" → fd -e ts --exclude node_modules
sed -i "s/foo/bar/g" file.txt → sd foo bar file.txt
sed "s/foo/bar/g" file.txt → sd foo bar file.txt
Notes
rtk find already exists as a compact-output wrapper for native find — this would be a separate rewrite rule (like how rtk git wraps git but rg rewrites grep)
Both tools are widely available: brew install fd sd / apt install fd-find sd
Guards needed: only rewrite when fd/sd are in PATH
Context
Discovered while setting up RTK across Claude Code, Codex, Gemini CLI, and opencode. The find and sed rewrite gap is the most common agent error class not currently covered by RTK.
Reacted by Edoardo Tenani, nikai, audiomuze and Gabriel Preda
Feature request to add fd and sd as rewrite targets in RTK registry, with PATH guards; well-scoped but not a duplicate of existing find-rewrite issues.
Triaged automatically by wshm · This is an automated analysis, not a human review.
Thanks for the suggestion. rtk keeps the command the agent asked for and only filters its output, so what the agent reads stays a subset of what the original tool would print (the Transparency principle in CONTRIBUTING.md). Rewriting find to fd or sed to sd would run a different tool with different results: fd skips hidden and gitignored files by default, so the agent would get a different file list than the one it asked for. find is already rewritten to rtk find, which filters find's own output. Closing as not planned.
Activity
pszymkowiak commentedon May 27, 2026
🔍 Automated Triage
featuremediumSummary
Feature request to add fd and sd as rewrite targets in RTK registry, with PATH guards; well-scoped but not a duplicate of existing find-rewrite issues.
Triaged automatically by wshm · This is an automated analysis, not a human review.
KuSh commentedon Nov 28, 2026
Thanks for the suggestion. rtk keeps the command the agent asked for and only filters its output, so what the agent reads stays a subset of what the original tool would print (the Transparency principle in CONTRIBUTING.md). Rewriting
findtofdorsedtosdwould run a different tool with different results:fdskips hidden and gitignored files by default, so the agent would get a different file list than the one it asked for.findis already rewritten tortk find, which filtersfind's own output. Closing as not planned.