A blazingly fast, production-ready, cross-platform CLI tool for searching files and file contents — written in Rust.
| Feature | Detail |
|---|---|
| ⚡ Two search engines | Method 1: parallel walkdir + rayon; Method 2: deterministic recursive |
| 📄 Content search | grep-style search inside files with line numbers |
| 🎨 True-colour output | Every colour is a configurable #RRGGBB hex value |
| 🔍 Glob patterns | * and ? wildcards for file names and -i filters |
| 📁 Depth control | Limit recursion with -d |
| 🚫 Binary-safe | Auto-skips binary files; graceful permission handling |
| ⚙️ Config file | ~/.config/fsearch/config.toml or ./fsearch.toml |
| 🧵 Parallel search | Rayon thread pool (configurable thread count) |
| 🛑 Ctrl-C clean exit | Exits with code 130 |
| 🪟 Cross-platform | Linux · macOS · Windows |
cargo install fast-searchDownload from GitHub Releases:
| Platform | File |
|---|---|
| Linux x86_64 (glibc) | fsearch-linux-x86_64.tar.gz |
| Linux aarch64 | fsearch-linux-aarch64.tar.gz |
| Linux x86_64 (musl/static) | fsearch-linux-x86_64-musl.tar.gz |
| macOS x86_64 | fsearch-macos-x86_64.tar.gz |
| macOS Apple Silicon | fsearch-macos-aarch64.tar.gz |
| Windows x86_64 | fsearch-windows-x86_64.zip |
git clone https://github.com/cumulus13/fsearch
cd fsearch
cargo build --release
# binary → ./target/release/fsearch (or fsearch.exe on Windows)fsearch [OPTIONS] [PATTERN]
| Flag | Description | Default |
|---|---|---|
PATTERN |
Pattern to search (* ? wildcards supported) |
— |
-m, --method <1|2> |
Engine: 1 = walkdir+rayon, 2 = recursive | 1 |
-c, --case-insensitive |
Case-insensitive matching | on |
-C, --case-sensitive |
Case-sensitive matching | off |
-d, --deep <N> |
Maximum directory depth | 1 |
-p, --path <DIR> |
Search root directory | . |
-D, --no-dir |
Exclude directories from results | off |
-f, --file |
Search inside file contents | off |
-i, --include <GLOBS> |
Include only files matching patterns (CSV) | all |
-x, --exclude <DIRS> |
Extra directory names to skip (CSV) | — |
-n, --max-results <N> |
Limit results (0 = unlimited) | 0 |
-v, --verbose |
Print status, filters and elapsed time | off |
--init-config |
Write default config to ~/.config/fsearch/config.toml |
— |
--show-config |
Print active config as TOML and exit | — |
# Find all Rust source files (depth 5)
fsearch '*.rs' -d 5
# Find files containing "TODO" in Python/JS/TS source
fsearch TODO -f -i '*.py,*.js,*.ts' -d 10
# Case-sensitive search for exact name
fsearch README -C
# Search in a specific directory, verbose output
fsearch config -p ~/projects -d 3 -v
# Exclude extra dirs on top of defaults
fsearch main -x dist,build -d 5
# Limit to first 20 results
fsearch '*.log' -n 20 -d 4
# Generate your config file
fsearch --init-config
# Inspect active config
fsearch --show-configfsearch --init-config
# → ~/.config/fsearch/config.toml (fully annotated)Config lookup order (highest priority first):
./fsearch.toml— project-local override~/.config/fsearch/config.toml— user config- Built-in defaults
# Search behaviour
default_depth = 1 # default -d value
default_method = 1 # 1 or 2
case_insensitive = true
include_dirs = true
binary_check_bytes = 1024
max_line_length = 10000
threads = 0 # 0 = all logical CPUs
# Output
verbose = false
show_size = false
show_modified = false
max_results = 0 # 0 = unlimited
# Colours — any CSS hex string
color_index = "#FF88FF"
color_path = "#FFFF00"
color_line_num = "#FF4444"
color_line_text = "#00FFFF"
color_header = "#FFFFFF"
color_count = "#00FFFF"
color_error = "#FF3333"
color_warn = "#FFAA00"
color_info = "#00FF88"
color_pattern = "#FF00FF"
# Filters
exclude_dirs = ".git,node_modules,.svn,__pycache__,.hg,target,.cache"
default_include = "" # e.g. "*.py,*.rs"| Code | Meaning |
|---|---|
0 |
One or more matches found |
1 |
No matches found, or error |
130 |
Interrupted by Ctrl-C |
# Install rustup (https://rustup.rs), then:
rustup target add x86_64-pc-windows-gnu
sudo apt install gcc-mingw-w64-x86-64
# Uncomment the [target.x86_64-pc-windows-gnu] block in .cargo/config.toml, then:
cargo build --release --target x86_64-pc-windows-gnu
# → target/x86_64-pc-windows-gnu/release/fsearch.exeOr simply push a version tag — GitHub Actions builds all platforms automatically.
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Make your changes and ensure
cargo clippy -- -D warningspasses - Submit a pull request
MIT — see LICENSE
Hadi Cahyadi — cumulus13@gmail.com
GitHub: @cumulus13
