Fast-Indexer is a Rust-based, trigram-driven incremental indexer and searcher for local codebases. Build an on-disk index once, then run sub-millisecond substring queries over file paths using memory-mapped Roaring bitmaps (Roaring).
- Parallel crawl (
ignore, same family as ripgrep) — respects.gitignore,.ignore, and optional.cixignore - Trigram extraction (Rayon) and compressed posting lists (Roaring bitmaps)
- No extension allowlist — anything that passes ignore rules, size limits, and a quick binary sniff is indexed (tune with
.cixignorefor images,node_modules, etc.) search— substring queries via trigram intersection; index opened with mmap (lazy paging)stats— document and trigram countswatch— filesystem watch with debounced rebuild (experimental)
- Rust 1.70+ (2021 edition)
- Windows, macOS, or Linux
cargo build --releaseBinary: target/release/cix (or cix.exe on Windows).
After cargo build --release, run the binary from the repo root with a backslash before target:
.\target\release\cix.exe index "C:\path\to\project"
.\target\release\cix.exe search "query" --index "C:\path\to\project\.cix-index".\cix.exeonly works ifcix.exeis actually in the current folder (it is not copied there bycargo build)..target\...(dot only) is wrong — PowerShell treats that like a module name. Use.\target\...(backslash-dot).
If you indexed VS Code at C:\...\vscode, the default index is C:\...\vscode\.cix-index. From another folder (e.g. this repo), you must pass --index to that path, or search looks for .cix-index in the current directory and will miss your index.
Index a directory (writes .cix-index in that directory by default):
cix index /path/to/project
# or explicit output:
cix index /path/to/project -o /path/to/.cix-indexSearch (from the project root, or pass --index):
cix search "fn main"
cix search "SomeType" --index /path/to/.cix-indexStatistics:
cix stats
cix stats --index /path/to/.cix-indexWatch and rebuild (debounced full rebuild):
cix watch /path/to/project| Mechanism | Role |
|---|---|
.gitignore |
Applied automatically in each directory (and parents), like ripgrep |
.ignore |
Extra ignore patterns (see ignore crate / ripgrep behavior) |
.cixignore |
Optional additional excludes (same syntax). Use for assets, vendored trees, or paths not in git |
Large trees (e.g. Linux kernel, monorepos) can take minutes on first index; use .cixignore to skip heavy dirs if needed.
- Search returns matching file paths (trigram filter + intersection); line numbers (
--lines) are not fully implemented yet - Watch currently triggers a full re-index after debounce (incremental posting updates are future work)
- Queries shorter than 3 characters use a simplified fallback
| Tool | Role |
|---|---|
| ripgrep | Line-oriented search; scans files (very fast, no persistent index) |
| cix | Persistent trigram index for repeated searches over the same tree |
Use cix when you want many searches against a fixed codebase without rescanning disk every time.
MIT — see LICENSE.
Issues and pull requests are welcome. Please run cargo test before submitting.
After you create the GitHub repo, add repository = "https://github.com/…" under [package] in Cargo.toml if you publish to crates.io.
git init
git add .
git commit -m "Initial commit: cix trigram indexer"
git branch -M main
git remote add origin https://github.com/YOUR_USER/YOUR_REPO.git
git push -u origin mainEnable Actions in the repo settings if CI workflows do not run automatically.
Inline video preview (plays on GitHub when file is in the repository):
Thumbnail previews (click to play):
Inline playback (small file):
If your videos are large, consider using Git LFS (already enabled for demo/*.mp4) or hosting on YouTube/Vimeo and linking from the README.