Introduction
What is grepai?
grepai is a privacy-first semantic code search tool that indexes the meaning of your code using vector embeddings, enabling natural language searches.
Unlike traditional tools like grep or ripgrep that search for exact text matches, grepai understands what your code does, not just what it says.
Why grepai?
The Problem
When working on large codebases, finding relevant code is challenging:
- grep/ripgrep: Great for exact matches, but useless when you don’t know the exact variable name or function
- IDE search: Limited to the files you have open
- AI assistants: Often lack full context of your codebase
The Solution
grepai maintains a real-time “mental map” of your project:
- Indexes your code using vector embeddings (local or cloud)
- Watches for changes and updates the index automatically
- Searches semantically - find code by describing what it does
Example Searches
# Find authentication code without knowing function namesgrepai search "user login validation"
# Find error handling patternsgrepai search "how are errors handled in API requests"
# Find database operationsgrepai search "where are users saved to the database"Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐│ Your Code │ │ Embedder │ │ Vector Store ││ (files) │ ──► │ (Ollama/OpenAI)│ ──► │ (GOB/Postgres) │└─────────────────┘ └─────────────────┘ └─────────────────┘ │ ▼ ┌─────────────────────────────────────┐ │ Semantic Search │ │ "authentication flow" → results │ └─────────────────────────────────────┘Next Steps
- Installation - Install grepai on your system
- Quick Start - Get up and running in 5 minutes
- Configuration - Customize grepai for your needs