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.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | yoanbernabeu/grepai |
| Owner | yoanbernabeu |
| Primary language | C |
| License | MIT — OSI-approved |
| Stars | 1.8k |
| Forks | 145 |
| Open issues | 93 |
| Latest release | v0.35.0 (2026-03-16) |
| Last updated | 2026-06-22 |
| Source | https://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.
Get the grepai source
Clone the repository and explore it locally.
git clone https://github.com/yoanbernabeu/grepai.gitcd grepai# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
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.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
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.
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.coRelated 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?
Will grepai send my code to a server?
How does this integrate with my IDE?
What if I don't have support from the maintainer?
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.