zg (zvec-grep) indexes a project locally and combines ripgrep, BM25, and vector search in one interface for humans and coding agents. It keeps files and indexes on your machine by default.
Overview
Zvec Grep, invoked as zg, is a command-line search tool built on zvec that unifies exact text search, full-text ranking, and semantic retrieval over a workspace you index once. The index lives under .zvec-grep in the project root.
You can run hybrid, full-text, or vector queries from the terminal, including multiple labeled query groups in one invocation. The same indexed workspace can be used by agent tools so models find relevant passages with fewer broad scans.
Search spans source code, documents, and structured text while preserving symbols and locations where configured. Embeddings can stay local; remote embedding providers are used only with your permission. The tool works on macOS, Linux, and Windows.
Key features
- Ripgrep, BM25, and vector search
- Local project index
- Hybrid and separate query modes
- Agent and CLI shared workspace
- Symbol-aware code indexing
- Ranked results with source links
- Local-first files and models
- MCP-oriented agent workflows
Use cases
- Semantic code exploration
- Reducing agent tool calls in repos
- Cross-file architecture questions
- Meaning-based document search
- Combining regex with vector recall