What it is
grepai is a command-line tool that lets you, or a coding agent, search code by meaning rather than exact text. It turns your code into vector embeddings (numeric representations of meaning), so a query like "authentication logic" can find a function named handleUserSession. It also traces call graphs: which functions call a given function and which ones it calls.
It ships as a single Go binary under the MIT licence, made by Yoan Bernabeu. Embeddings come from Ollama by default, or LM Studio or OpenAI, so it can run fully offline. The index lives in a local file by default, or in PostgreSQL with pgvector or Qdrant. A file watcher keeps it current, and grepai mcp-serve exposes it to Claude Code, Cursor, Windsurf and other MCP clients.
Our review
grepai is a sensible local answer to coding agents that burn tokens on grep-and-read loops, and its one published benchmark is more modest than its headline. The maintainer ran Claude Code against Excalidraw, 155,000-plus lines of TypeScript, with and without grepai, asking five questions. Fresh input tokens fell 97%, but cache reads rose 30%, so the total cost at Opus 4.5 prices went from $6.78 to $4.92, a 27.5% saving. Tool calls dropped from 139 to 62. The post admits it did not measure answer quality, run time or any other codebase.
The feature list is broad for a one-person project: semantic search, callers and callees tracing, read and write references, multi-project workspaces, git worktree support and 27 agent skills. The docs list call-graph support for 12 languages, from Go and TypeScript to Rust and Zig. The PostgreSQL and Qdrant backends matter more than they look, because they turn a per-laptop index into one a team can share.
It is still young. The latest release, v0.37.0, came out on 10 September 2026 and nothing has been committed since; the project has about 1,900 stars and 81 open issues. The documented install is a curl-to-shell script or Homebrew, and search quality depends on the embedding model you run, nomic-embed-text by default. Choosing OpenAI embeddings for speed means sending code chunks to OpenAI, which undoes the privacy case.
Sourcegraph gives exact, exhaustive answers across thousands of repositories; grepai gives approximate ones across a few. For an agent that only needs a starting point before it opens files, approximate is usually enough, and the saving shows up in the cache-creation line of the bill rather than in the headline input figure.
Where it earns its place
A developer working on a 150,000-line TypeScript app with Claude Code on Opus
Cut the cost of "where is this behaviour handled?" questions
Run grepai watch and register grepai mcp-serve; the agent searches before reading files. The maintainer's benchmark on a repo that size measured 27.5% lower session cost, with Ollama embeddings costing nothing.
A contractor working on code under an NDA
Search a client codebase by meaning without sending it to a third party
Use Ollama with nomic-embed-text and the default local index file. Nothing leaves the laptop; switching to OpenAI embeddings would send code to OpenAI.
A platform team of 20 engineers on one monorepo
Share one semantic index instead of every laptop building its own
Point the store at PostgreSQL with pgvector or a Qdrant cluster. The software is free; the cost is running the database, and the docs describe no access controls beyond the database's own.
Before you commit
- Setup
- Homebrew or the install script, `ollama pull nomic-embed-text`, then `grepai init` and `grepai watch` in the project; first searches work once the initial index is built.
- Integrations
- MCP server via `grepai mcp-serve` for Claude Code, Cursor, Windsurf and other clients; embedders Ollama, LM Studio and OpenAI (text-embedding-3-small); stores in a local GOB file, PostgreSQL with pgvector, or Qdrant including Qdrant Cloud.
- Data and privacy
- With Ollama or LM Studio, code and embeddings stay local; OpenAI embeddings send code chunks to OpenAI. The docs make no statement about telemetry. MIT licence.
- Cost at scale
- No paid edition. Costs are local embedding compute, or OpenAI per-token fees, plus a database if the index is shared; on the benchmark, five questions cost $4.92 instead of $6.78 at Opus 4.5 prices.
- Limits
- Pre-1.0 with no release since 10 September 2026; 81 open issues; the token-saving evidence is one maintainer-run benchmark with no quality measure.
What's good
- Runs fully local with Ollama; code stays on the machine
- Call-graph tracing for 12 languages, per the docs
- Built-in MCP server and file watcher
- PostgreSQL and Qdrant backends for a shared index
What's not
- Still v0.x; no release since September 2026
- Only benchmark is maintainer-run, one repo, five questions
- Results depend on the embedding model you run
- Similarity search, not exact or exhaustive
Best for
Developers who want their coding agent to search a repo by meaning, locally, instead of reading whole files.
Alternatives
grepai: common questions
- Is grepai worth it?
- grepai trims an agent's code-reading bill without sending code anywhere, though its own benchmark puts the saving nearer a quarter than the 97% headline. We rate it 3.7 out of 5.
- How much does grepai cost?
- Free and open source (MIT). Runs locally with Ollama or LM Studio; OpenAI embeddings are billed by OpenAI.
- What are the downsides of grepai?
- Still v0.x; no release since September 2026; only benchmark is maintainer-run, one repo, five questions; results depend on the embedding model you run; similarity search, not exact or exhaustive.
- Who is grepai best for?
- Developers who want their coding agent to search a repo by meaning, locally, instead of reading whole files.
- How much does grepai cost for a team or in production?
- No paid edition. Costs are local embedding compute, or OpenAI per-token fees, plus a database if the index is shared; on the benchmark, five questions cost $4.92 instead of $6.78 at Opus 4.5 prices.
- Is grepai safe for company data?
- With Ollama or LM Studio, code and embeddings stay local; OpenAI embeddings send code chunks to OpenAI. The docs make no statement about telemetry. MIT licence.
- What are the best grepai alternatives?
- The closest alternatives we have reviewed are Repomix and code2prompt.
Answers checked Oct 23, 2026.