grepai
A privacy-first command-line tool for semantic code search that uses local vector embeddings to find code by meaning, trace call graphs, and feed relevant context to AI coding agents through an MCP server.
grepai is a command-line tool for semantic code search. It uses vector embeddings to understand code meaning so a natural-language query, such as searching for authentication logic, can find matching code even when naming conventions differ from the query's wording, and it can trace call graphs to show who calls a function before it is changed.
It runs entirely on the local machine, so code never leaves it, and a file watcher keeps the index up to date automatically as files change. It works with Claude Code, Cursor and Windsurf out of the box, and exposes an MCP server so an AI agent can call grepai directly as a tool, which the project says reduces the amount of raw search text an agent has to read.
It requires an embedding provider, either a local Ollama or LM Studio model or OpenAI, and installs through Homebrew or a shell or PowerShell install script; it also ships shell completion for Zsh, Bash, Fish and PowerShell.