Branchcut
Find files by name or path and search inside selected files.
Branchcut combines globs, ignore rules, exclusions, and file filters into a single query. It can skip directories that cannot contain a match and stream the results as it finds them.
branchcut config
branchcut grep TODO src/
branchcut --glob 'src/**/*.rs' --gitignore --limit 10Install Branchcut
Download a prebuilt binary or install from source.
Run your first query
Find a file and see why it matched.
Search file contents
Search files or stdin, show context, and export matches.
Search a monorepo
Narrow the search and exclude generated directories.
Automate file selection
Use JSON Lines, NUL output, or command templates.
Find an option
| Need | Reference |
|---|---|
| Copy a command | Cheat sheet |
| Look up a flag | CLI reference |
| Understand globs and ignores | Glob syntax and ignore rules |
| Reuse Branchcut from Rust | Rust library tutorial |
Release status
The release archives cover Windows x64, Linux x64, Intel Mac, and Apple Silicon. In v0.3.0, the ordinary branchcut executable supports literal content search. branchcut-regex adds regular expressions for filenames, paths, and content lines. See the content search guide for inputs, results, and examples.
See how traversal works and the measured timings and memory usage.