Quick start
Install Branchcut, run a useful query, inspect the plan, and check its work.
1. Install
Use the complete platform command from Installation. The recommended Windows and Unix commands run the checked-in installer and verify the resulting executable.
Confirm the command before searching:
branchcut --version
branchcut --help2. Run a simple search
From a project directory:
branchcut configconfig is a literal filename search. Hidden paths are excluded by default. Repeated terms match with OR:
branchcut readme licenseUse an explicit glob when path structure matters:
branchcut --glob 'src/**/*.{rs,toml}' --type file3. Exclude generated trees
branchcut \
--glob '**/*.{rs,ts}' \
--exclude '**/target/**' \
--exclude '**/node_modules/**' \
--exclude '**/dist/**' \
--type filePositive patterns form a union. Exclusions remove matches and can prune a safely excluded subtree.
4. Explain before walking
branchcut \
--glob 'packages/**/src/**/*.{rs,ts}' \
--exclude '**/{target,node_modules,dist}/**' \
--limit 100 \
--explainThe plan shows the root, shared pattern structure, exclusions, metadata requirement, and termination rule. --explain does not traverse.
5. Measure actual work
branchcut \
--glob '**/*.rs' \
--exclude '**/target/**' \
--limit 100 \
--statsStatistics are written to standard error so stdout remains suitable for a pipeline. Results stream while useful directories are traversed.
6. Keep paths machine-safe
branchcut --glob '**/*.rs' --json
branchcut --glob '**/*.rs' --print0JSON Lines preserves unusual Windows names through a companion path_utf16 field. NUL output preserves native Unix path bytes and pairs with xargs -0.