DEV.co
Vector Databases · yoanbernabeu

grepai

grepai is a local, privacy-first CLI tool that uses vector embeddings to search code by meaning rather than exact text matching. It integrates with AI agents and IDEs to reduce token usage by providing semantically relevant code context.

Source: GitHub — github.com/yoanbernabeu/grepai
1.8k
GitHub stars
145
Forks
C
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryyoanbernabeu/grepai
Owneryoanbernabeu
Primary languageC
LicenseMIT — OSI-approved
Stars1.8k
Forks145
Open issues93
Latest releasev0.35.0 (2026-03-16)
Last updated2026-06-22
Sourcehttps://github.com/yoanbernabeu/grepai

What grepai is

grepai implements semantic code search via vector embeddings (supporting Ollama, LM Studio, OpenAI backends), maintains call graphs, and exposes an MCP server interface for AI agent integration. Written primarily in Go with C bindings, it watches the filesystem to keep the index fresh.

Quickstart

Get the grepai source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/yoanbernabeu/grepai.gitcd grepai# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Reducing AI agent token consumption

Provides semantically relevant code snippets instead of raw search results, directly lowering input token costs when feeding codebase context to Claude, Cursor, or other AI agents.

Developer code navigation and refactoring

Enables natural-language queries like 'authentication logic' to find conceptually related functions across large codebases, even when naming conventions differ; trace callers before making changes.

Integration with IDE plugins and MCP-compatible tools

Operates as an MCP server, allowing direct calls from Claude Code, Cursor, Windsurf, and other tools that support the Model Context Protocol without manual context passing.

Implementation considerations

  • Embedding provider selection (Ollama default; LM Studio or OpenAI optional) must be decided upfront; Ollama setup adds ~5–10 min for first-time users.
  • Index initialization and ongoing file watching consume disk space and CPU; initial indexing time scales with codebase size (not specified in data).
  • Shell completions are available for Zsh, Bash, Fish, PowerShell; integration into developer workflows is straightforward but requires shell configuration.
  • MCP server setup is mentioned as 'out of the box' for Claude Code, Cursor, Windsurf; verify compatibility with your specific IDE/agent version.
  • 93 open issues suggest active development; assess release cycle stability and whether unresolved issues affect your use case.

When to avoid it — and what to weigh

  • Exact regex or pattern-based search is primary need — grepai is optimized for semantic understanding; if your workflow relies on precise regex patterns or exact text matching, grep/ripgrep remain more direct.
  • Air-gapped or strict offline environments without embedding infrastructure — Requires a local embedding provider (Ollama, LM Studio) or OpenAI credentials. Deployment complexity increases in restricted network environments.
  • Very small codebases or single-file projects — The overhead of initialization, indexing, and maintaining a vector index may not justify benefit for tiny projects; traditional search is simpler.
  • Teams requiring strong audit trails or commercial support contracts — MIT-licensed open-source project with no official SLA, warranty, or vendor support. Suitable for self-supported adoption only.

License & commercial use

MIT License. Permissive open-source; allows commercial use, modification, and distribution with minimal restrictions. No patent or trademark claims.

MIT is a permissive OSI-approved license compatible with commercial use. No vendor support, SLA, or indemnification provided. Teams deploying in production should review liability and support plans independently.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Data privacy is a core design principle: code remains local and is never sent to remote servers (when using Ollama or LM Studio). OpenAI backend option would send embeddings to third party; users must evaluate that trade-off. No mention of encryption, audit logging, or security scanning in provided data.

Alternatives to consider

grep / ripgrep

Exact text and regex search; no semantic understanding. Simpler, zero setup, but cannot find conceptually related code or reduce AI token usage.

Codebase.ai / Sourcegraph

Cloud-hosted semantic code search; enterprise features and strong integrations. Requires uploading code; not privacy-first and incurs hosting costs.

Custom embeddings + vector DB (Pinecone, Weaviate, Milvus)

Full control and scalability. Significantly higher setup and operational overhead; grepai is pre-built and optimized for developer workflows.

Software development agency

Build on grepai with DEV.co software developers

Evaluate grepai's semantic search for your codebase. Start with a local Ollama setup (5 min), test on a sample project, and measure token reduction with your AI agent.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

grepai FAQ

Do I need OpenAI or Ollama running?
One embedding provider is required. Ollama (free, local) is recommended and default. LM Studio or OpenAI are alternatives; Ollama is simplest for first-time users.
Will grepai send my code to a server?
No, if using Ollama or LM Studio. Code remains on your machine and only embeddings (vector representations) are generated locally. OpenAI backend would send embeddings to their service.
How does this integrate with my IDE?
grepai runs as an MCP server. Claude Code, Cursor, and Windsurf can call it directly as a tool. Integration is 'out of the box' for supported IDEs; manual setup required for others.
What if I don't have support from the maintainer?
grepai is MIT-licensed open-source with no official support. Community contributions and self-support via GitHub issues are the primary channels. Consider this for production deployments.

Work with a software development agency

DEV.co helps companies turn open-source tools like grepai into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your vector databases stack.

Ready to reduce your AI token costs?

Evaluate grepai's semantic search for your codebase. Start with a local Ollama setup (5 min), test on a sample project, and measure token reduction with your AI agent.