zg, a local-first AI search layer built on Alibaba's zvec, lands on GitHub
The tool combines ripgrep, BM25 and vector search over one indexed workspace, and gives terminal users and AI agents the same results with source positions.
The developer tool zg (zvec-grep), a local-first search layer built on Alibaba's zvec vector database, has been published on GitHub at zvec-ai/zvec-grep, according to gigazine.net. The project combines ripgrep, BM25 and vector search in a single index over a working directory.
Once a workspace is indexed, zg can be used directly from the terminal or by AI agents against the same index. It supports keyword, semantic and regex verification search across source code, documents and structured data, and keeps source positions in its results.
The tool is described as local-first: files, indexes and local models stay on the user's machine, and data is sent to remote embedding models only with the user's permission. Indexing is performed with the zg index command using a local embedding model such as local/potion-retrieval-32m.
zg requires Node.js 22 or later and is installed with the npm command for @zvec/zvec-grep. Benchmarks published with the project, run against pylint, matplotlib and django, report savings in input tokens, tool calls and wall-clock time, alongside small or notable gains in LLM answer quality.
Quick answers
How do I install zg?
It requires Node.js 22 or later and is installed with the npm command for @zvec/zvec-grep.
Does zg send my files to a remote server?
Files, indexes and local models stay on the user's machine; data goes to remote embedding models only with the user's permission.
How is the index created?
With the zg index command, using a local embedding model such as local/potion-retrieval-32m.