erogol

erogol / ngi

Public

Fast trigram-indexed regex search for codebases — 2-6x faster than ripgrep

10
0
100% credibility
Found Mar 27, 2026 at 10 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Rust
AI Summary

ngi is a fast regex search tool for large codebases that uses trigram indexing to quickly narrow down candidate files before precise matching.

How It Works

1
🔍 Discover Fast Search

You learn about a handy tool that searches huge code folders way faster than usual tools.

2
📥 Add the Tool

You easily put the search tool on your computer so it's ready to use.

3
📁 Go to Your Folder

You open the folder with all your project files where you want to hunt for code.

4
Magic First Search

You describe what you're looking for, and it quietly sets up a speed system on its own.

5
🎯 Instant Matches

You see exact spots in your files with surrounding lines, super quick every time.

6
🔄 Stays Up to Date

It notices file changes and refreshes itself so searches always fly.

Code Explorer

Now you effortlessly find anything in your projects and work like a pro.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 10 to 10 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is ngi?

ngi is a Rust CLI tool for regex searching large codebases, building a trigram index to pre-filter files before handing off to ripgrep for matching. It auto-indexes on first use, updates incrementally on file changes, and delivers 2-6x faster results than ripgrep on selective queries like `ngi search 'fn parse'` or `ngi search -i 'mutex_lock'`. Add `.ngi/` to gitignore, tweak with `--max-file-size` or `.ngiignore`, and get JSONL output or context lines via `-C 3`.

Why is it gaining traction?

It crushes ripgrep on targeted searches in huge repos—benchmarks hit 2-6x gains on Linux kernel patterns, narrowing 90k+ files to hundreds before rg kicks in. Incremental freshness checks skip unchanged files, respecting .gitignore out of the box, while falling back to rg fullscan or pure Rust regex if needed. Devs love the zero-config speed for fast github search, nginx config greps, or docker compose regexes without tuning.

Who should use this?

Rust or kernel devs grep'ing massive codebases daily, like auditing nginx ingress proxies or fast github actions scripts. Open-source maintainers chasing fast github downloads or schedules in monorepos, or backend teams optimizing nginx docker compose setups and reverse proxy configs. Skip if your repo is tiny—ripgrep alone suffices.

Verdict

Grab it via `cargo install` if ripgrep feels sluggish on selective queries; benchmarks deliver real 2-6x wins. At 10 stars and 1.0% credibility, it's early—strong docs and tests help, but test thoroughly on your codebase before production reliance.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.