Skip to content

grepai

grep on steroids

Give your AI coding agents semantic code search. Find relevant code instantly, save tokens, ship faster.

v0.16.0 100% Local Open Source
grepai — semantic search
$

Why grepai?

Semantic Search

Ask in plain English. grepai understands code meaning, not just text patterns.

Call Graph Tracing

Find callers and callees of any function. Build dependency graphs. Supports Go, JS/TS, Python, PHP, C#, Java, C/C++, Rust, Zig.

100% Local

Runs entirely on your machine with Ollama. Your code never leaves your laptop.

AI Agent Ready

First-class integration with Cursor, Windsurf, Claude Code, Gemini CLI, and more.

MCP Server

Run as a native MCP server. AI agents discover grepai as a first-class tool automatically.

Real-time Indexing

File watcher keeps your index up-to-date as you code. No manual re-indexing needed.


Get started in seconds

  1. Install grepai

    Terminal window
    curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh
  2. Initialize your project

    Terminal window
    grepai init
  3. Start indexing & watching

    Terminal window
    grepai watch
  4. Search with natural language

    Terminal window
    grepai search "user authentication flow"
  5. Trace function calls

    Terminal window
    grepai trace callers "Login" # Who calls this?
    grepai trace callees "Handler" # What does it call?

Choose your embedder

.grepai/config.yaml
embedder:
provider: ollama
model: nomic-embed-text

Recommended Privacy-first, runs 100% offline.


Choose your storage

GOB — Local File

Default

Zero setup, single portable file. Perfect for small & medium codebases.

store:
backend: gob

PostgreSQL — pgvector

Large projects

Shared index, native vector similarity. Scales to large codebases.

store:
backend: postgres

Search Boost

Enabled by default

Automatically penalizes test files, mocks, and docs. Boosts source directories.

search:
boost:
enabled: true
Learn more

Hybrid Search

Optional

Combines vector similarity with text matching (RRF). Better for exact identifiers.

search:
hybrid:
enabled: true
Learn more

Ready to dive deeper?