grep, but it understands what you meant
A local CLI that indexes your codebase with embeddings so AI agents (and you) can search by meaning instead of regex.

What it does
grepai is a semantic code-search CLI. It embeds your codebase into a vector index, so a query like “authentication logic” can surface handleUserSession even though the words don’t overlap. It also builds call graphs, so you can ask who calls a function before renaming it. A file-watching daemon keeps the index fresh as you edit.
The interesting bit
The real pitch isn’t search quality — it’s token economics. Instead of an AI agent grepping your repo and dumping raw results into context, grepai hands it a small, semantically relevant slice. One Reddit user reported a single codebase read ate 13% of their Claude plan; this is the tool built to make that problem go away. It runs entirely on your machine, with Ollama as the default embedding provider (LM Studio or OpenAI also work).
Key highlights
- Natural-language queries that survive inconsistent naming conventions
trace callersfor call-graph answers before refactors- 100% local — code never leaves your machine
- MCP server mode, so Claude Code, Cursor, or Windsurf can call it as a tool directly
- Ships as a single Go binary with shell completion for zsh, bash, fish, and PowerShell
Caveats
- Not fully self-contained: you need a separate embedding provider installed (Ollama by default), or you accept OpenAI as the provider — at which point “100% local” no longer applies.
- The README claims “drastically reduces” input tokens but points to a blog for benchmarks rather than showing numbers here.
Verdict
Worth a look if you use Claude Code or Cursor on a large codebase and are watching your token budget evaporate. If you just need fast text search, ripgrep already does that job perfectly — and doesn’t need an embedding model to do it.
Frequently asked
- What is yoanbernabeu/grepai?
- A local CLI that indexes your codebase with embeddings so AI agents (and you) can search by meaning instead of regex.
- Is grepai open source?
- Yes — yoanbernabeu/grepai is open source, released under the MIT license.
- What language is grepai written in?
- yoanbernabeu/grepai is primarily written in C.
- How popular is grepai?
- yoanbernabeu/grepai has 1.9k stars on GitHub and is currently accelerating.
- Where can I find grepai?
- yoanbernabeu/grepai is on GitHub at https://github.com/yoanbernabeu/grepai.