whereismyai
Sgrep
Sgrep is a command-line tool that searches code and documents in plain English using local models.
Sgrep is a command-line tool for searching code and documents using plain English queries and local static embeddings. It combines semantic scores with BM25, giving exact identifier priority and bypassing the need for per-query API calls or hosted infrastructure. The tool splits files into syntax-aware chunks using Tree-sitter and Chonkie, supporting languages such as Python, Rust, Go, and JavaScript. It runs entirely on local hardware, keeping source files and queries private while supporting offline searches after initial model downloads. It is designed for developers and coding agents needing fast, local semantic discovery alongside traditional tools like ripgrep.
Sgrep at a glance
- Best for: Software engineer
- Runs on: CLI, macOS, Linux, open source
- Pricing: Free
- Released: October 2026
- Category: AI coding tool
- Website: github.com/context-dot-dev/sgrep
Key features
- Searches code and documents in plain English
- Combines semantic scores with BM25 lexical matching
- Runs locally on CPU without accounts or hosted servers
- Supports syntax-aware chunking for multiple programming languages
- Ranks piped results from ripgrep commands
- Provides JSON output options for automated workflows
Use it for
- Finding code passages using intent-based English queries
- Ranking and filtering results from ripgrep searches
- Searching local repositories offline without cloud API calls
Alternatives to Sgrep
- jevgrep — Reduces coding agent costs by providing targeted, relevant repository context.
- jscpd — A native Rust binary that runs fast without a Node.js runtime and integrates with AI agents.
- Semgrep — Unifies SAST, SCA, and secrets scanning with AI-assisted noise filtering.
- Semble — It indexes code in milliseconds on CPU with zero external services required.
- Enzyme — It indexes markdown notes locally so AI coding agents can cite them.
- RAG Evaluation Starter — Runs five metrics locally with no SaaS signup or mandatory API key required.
- Shim — It offers zero runtime dependencies, no telemetry, and a static binary.
- Gspot — Stops bad code, type errors, and leaked keys before commits happen.
- opensrc — Provides AI agents direct access to package source code rather than types.
- GLiNER — Enables zero-shot entity extraction without labeled training data on consumer CPUs.
- Gsearch — Runs a real browser over MCP to fetch genuine Google results with zero API keys.
- daidocs — It keeps code graphs as plain text for lower token costs and better accuracy.
All Sgrep alternatives