Filesystem search CLI for finding paths by regex or glob with ignore-aware defaults, metadata filters, and command execution.
$brew install fd
AI Analysis
fd is a filesystem search CLI that finds files and directories by name or path, then narrows results with ignore rules and metadata filters. It covers the common cases where find feels verbose, while still letting you hand matches off to other shell commands.
What It Enables
- Find files or directories by regex, glob, exact string, or full path while respecting
.gitignore,.ignore,.fdignore, and hidden-file defaults. - Narrow large trees by type, extension, depth, size, modified time, owner, or custom exclude rules before taking follow-up action.
- Feed matches into other commands with
--execor--exec-batch, or emit null-delimited and templated path output for pipelines such asxargs,rm,rg, or formatters.
Agent Fit
- Non-interactive flags, predictable stdout,
--print0,--format, and--quietexit behavior make it easy to slot into search, select, and verify loops. - There is no real JSON mode, so agents have to parse paths, long listings, or custom templates rather than structured records.
- Best as a local filesystem primitive inside broader workflows: locate the right files first, then hand them to editors, linters, search tools, or destructive commands deliberately.
Caveats
- By default it skips hidden files and ignore-matched paths, which is convenient for humans but easy to miss in automation unless
-H,-I, or-uis set deliberately. --execruns matches in parallel and--exec-batchdoes not guarantee argument order, so follow-up commands should not depend on traversal order.