grepai
An explorer holding a lantern stands on a cliff above a vast labyrinth city at dawn. A thin golden thread runs from the lantern through the streets to one lit building.

Give your agent a map of the code.

Coding agents burn time and tokens opening file after file to find the right code. With grepai they ask in plain English and go straight to it. Free, open source, and it runs on your machine.

curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh

Open source, MIT, 1,930 stars on GitHub, 26,575 downloads. Latest release v1.2.0.

Your agent spends most of a session looking for code. grepai cuts that short.

97%

Fewer tokens spent reading

In a benchmark on Claude Code, the agent answered the same questions with 97% fewer input tokens and a 27.5% lower bill, because it opened the right files instead of scanning the repository.

How it was measured

The right file on the first try

Your agent asks what it needs in plain English, like “where do we refresh expired tokens?”, and gets the matching functions. The code doesn't need to contain those words.

Changes that don't break callers

Before editing a function, your agent lists every place that calls it, so it updates them in the same change instead of finding out from your tests.

Set up once, then forget it

One command connects grepai to your agent, and grepai watch keeps the index current as you save files.

On a real project

“How does gin turn a panic into a 500?”

A question you might ask about gin, the Go web framework. Searching for the word gives you a pile. Asking grepai gives you the file.

grep -rn "panic" --include='*.go' .
102 matching lines in 20 files

grepai search "how a panic in a handler is recovered and turned into a 500"
1. recovery.go:1-70       score 0.59
2. gin.go:360-424         score 0.54

grepai trace callers "Recovery"
Default                   gin.go:253
+ 3 more in tests and benchmarks

grepai v0.39.0 on gin at commit 0f09c3a, local Ollama embeddings. Output condensed.

The explorer draws the map of the city by lantern light, alone in a tower room.

Your code stays on your machine.

By default grepai builds its index with Ollama on your laptop. Nothing is sent anywhere. If you prefer a hosted model, OpenAI and other providers are one line of config away.

Works with

  • Claude Code
  • Cursor
  • Codex CLI
  • Windsurf
  • Gemini CLI
  • OpenCode

and any tool that speaks MCP. MCP setup

From people who installed it

“I just hit my limit and it took 13% of my max5 plan just to read my codebase. I am very, very excited about your new tool.”
u/911pleasehold, Reddit, r/ClaudeAI
“It works great! Takes 5 minutes to install. Crazy!”
@LesSaleGeek, X
“The results are incredible!”
Kenny Nguyen, LinkedIn

Open source, 58 releases and 46 contributors since January 2026. Latest: v1.1.0 (Oct 26, 2026), Large GOB Index Warning.

Get started

Three commands to get going.

You need Ollama running with the embedding model: ollama pull nomic-embed-text.

Full quick start

  1. Install grepai
    curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh
  2. Index your project and keep it in sync
    cd your-project && grepai init && grepai watch
  3. Tell your agent to use it
    grepai agent-setup
At dusk, the explorer reaches the small lit building where the golden thread ends.

Hand your agent the map.

curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh