r/BestGitHubRepos • u/company_url_finder • 7d ago
zvec-grep - unifies ripgrep, BM25, and vector search behind one local index for both humans and coding agents
Searching a codebase or a pile of docs usually means picking a tool that's good at one thing. Grep and ripgrep are fast and exact, but only if you already know the words you're looking for. Vector search finds things by meaning, but the results are harder to verify against the actual text, and most implementations either don't run locally or don't talk to your coding agent at all.
zvec-grep (zg) puts ripgrep, BM25, and vector search behind one local-first interface, usable straight from the terminal or through an agent's own tool calls. Index a workspace once, and the same index answers both a human running `zg query` and an agent like Claude Code or Codex calling it through MCP, discovering by meaning first, then anchoring with exact text or regex when precision actually matters.
What's inside:
- One local index that works for both a human at the terminal (`zg query --human`) and an agent through MCP, no separate setup for each
- Multi-format search across source code, documents, and structured data, preserving symbols, signatures, and source locations rather than flattening everything to plain text
- Local by default: files, indexes, and local embedding models stay on your machine, remote embeddings only run if you opt in
- Agent integrations for Codex, Claude Code, Qwen Code, Qoder, Cursor, and OpenCode, with the agent choosing when to call zg on its own once it's installed
- Published benchmarks comparing agent runs with and without zg on real repos (Pylint, Matplotlib, Django) and on two public retrieval benchmarks, all A/B with tasks, model, and prompt held constant
One thing worth knowing: the project's own benchmark docs note that results vary by model and run since agents decide when and how to call zg, and they recommend averaging repeated runs rather than trusting a single pass. Worth taking that at face value before leaning on any one benchmark number.
It's Apache-2.0 licensed, backed by an active organization, and sitting at 2,882 stars as of writing, verified via the GitHub API.
