fast-search-1.0.1 is not a library.
⚡ fsearch — Fast File & Content Search
A blazingly fast, production-ready, cross-platform CLI tool for searching files and file contents — written in Rust.
🚀 Features
| 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 |
📦 Installation
From crates.io
Pre-built binaries
Download 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 |
From source
# binary → ./target/release/fsearch (or fsearch.exe on Windows)
🔧 Usage
fsearch [OPTIONS] [PATTERN]
Options
| 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 | — |
💡 Examples
# Find all Rust source files (depth 5)
# Find files containing "TODO" in Python/JS/TS source
# Case-sensitive search for exact name
# Search in a specific directory, verbose output
# Exclude extra dirs on top of defaults
# Limit to first 20 results
# Generate your config file
# Inspect active config
⚙️ Configuration
# → ~/.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
All config keys
# Search behaviour
= 1 # default -d value
= 1 # 1 or 2
= true
= true
= 1024
= 10000
= 0 # 0 = all logical CPUs
# Output
= false
= false
= false
= 0 # 0 = unlimited
# Colours — any CSS hex string
= "#FF88FF"
= "#FFFF00"
= "#FF4444"
= "#00FFFF"
= "#FFFFFF"
= "#00FFFF"
= "#FF3333"
= "#FFAA00"
= "#00FF88"
= "#FF00FF"
# Filters
= ".git,node_modules,.svn,__pycache__,.hg,target,.cache"
= "" # e.g. "*.py,*.rs"
📊 Exit Codes
| Code | Meaning |
|---|---|
0 |
One or more matches found |
1 |
No matches found, or error |
130 |
Interrupted by Ctrl-C |
🏗️ Building for Windows from Linux
# Install rustup (https://rustup.rs), then:
# Uncomment the [target.x86_64-pc-windows-gnu] block in .cargo/config.toml, then:
# → target/x86_64-pc-windows-gnu/release/fsearch.exe
Or simply push a version tag — GitHub Actions builds all platforms automatically.
🤝 Contributing
- 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
📄 License
MIT — see LICENSE
👤 Author
Hadi Cahyadi — cumulus13@gmail.com
GitHub: @cumulus13
