Semantic grep — like ripgrep, but with vector search.
Search your codebase by meaning, not just text. Ask for "error handling for network timeouts" and find the relevant code, even if it doesn't contain those exact words.
- Local-first — embedding model ships inside the binary. No API keys, no GPU, your code stays on your machine.
- Fast — indexes thousands of files in seconds, searches in milliseconds. Interactive TUI and HTTP server update results progressively during indexing.
- Bring your own model — optionally connect to Ollama, LM Studio, or any OpenAI-compatible API. See BENCHMARK.md.
Pre-built binaries on the releases page, or:
mise use github:martintrojer/vecgrep # mise
cargo install vecgrep # cargonpx skills add martintrojer/vecgrep # Codex / generic
/plugin marketplace add martintrojer/vecgrep # Claude Codevecgrep "error handling" ./src # search by meaning
vecgrep --reindex --hybrid-index ./src # build lexical index support
vecgrep --hybrid "IndexConfig" ./src # optional lexical + semantic ranking
vecgrep -i "authentication" # interactive TUI
vecgrep -l "retry logic" | xargs rg "unwrap" # combine with ripgrep
vecgrep --serve --port 8080 ./src # HTTP server for IDE plugins
vecgrep --embedder-url http://localhost:11434/v1/embeddings --embedder-model mxbai-embed-large "query"| Feature | |
|---|---|
TUI mode (-i) |
Live search with preview pane, score colors, configurable file opener (--open-cmd) |
HTTP server (--serve) |
/search and /status endpoints for IDE integration (vecgrep.nvim) |
| Path scoping | Results scoped to requested paths, like ripgrep. --no-scope to search entire project |
Hybrid search (--hybrid) |
Optional lexical + semantic ranking for grep-like searches |
Hybrid index (--hybrid-index) |
Builds lexical index support required by hybrid queries |
| File type filters | -t rust, -T markdown, -g "*.rs" — same flags as ripgrep |
| JSONL output | --json for scripting with jq |
| Config files | Project (.vecgrep/config.toml) and global (~/.config/vecgrep/config.toml) |
| Cache | BLAKE3 content hashing — only changed files are re-embedded |
- User Guide — examples, path semantics, embedding models, ignoring files
- Configuration — config files, options reference, environment variables
- Server API — HTTP endpoints for IDE integration
- Benchmarks — model comparisons and retrieval accuracy
- Philosophy
- Walk —
.gitignore-aware file discovery (same engine as ripgrep) - Chunk — overlapping token-window chunks, snapped to line boundaries
- Embed — built-in ONNX model or external API
- Index — SQLite + sqlite-vec, keyed by content hash
- Search — cosine similarity KNN, fast enough for every-keystroke use
MIT
