Overview

zg (zvec-grep) is a local-first search layer that unifies ripgrep, BM25, and vector search behind a single interface for humans and AI agents. Powered by zvec (Alibaba’s vector compute library), zg indexes a workspace once and then serves both keyword and semantic queries from the same local index. It exposes an MCP server so agents can search without manual setup, and integrates with OpenCode, Codex, Claude Code, Qwen Code, Qoder, and Cursor.

Key Facts

  • Name: zg / zvec-grep (npm package @zvec/zvec-grep)
  • Language: Rust (binary) with TypeScript/JavaScript tooling
  • License: Apache 2.0
  • Runtime: Node.js 22+, macOS/Linux/Windows
  • Embedding models: pluggable — defaults to local models (e.g. local/potion-retrieval-32m); remote embeddings require explicit opt-in
  • Index location: .zvec-grep/ under the indexed project root
  • Architecture: MCP server + CLI + direct/server execution modes
  • Benchmarks: self-reported paired A/B runs against Claude Code (Opus 5) and Codex (GPT-5.6) showing reduced input tokens, fewer tool calls, and faster agent wall-time across coding and prose retrieval tasks

Relationships

  • “uses” model-context-protocol — ships an MCP server and MCP tools for agent access
  • “operates-with” claude-code — listed as a supported agent integration target
  • “compatible-with” qmd — both are hybrid search tools for knowledge workspaces (qmd for Shopify docs, zg for general workspaces)
  • “compatible-with” docmd — docmd auto-generates llms.txt while zg indexes and searches; complementary indexing pipeline
  • “implements” memory-retrieval-patterns — ranked semantic + lexical + regex verification pipeline
  • “extends” open-knowledge-format — workspace indexing layer that can surface OKF-structured evidence by relevance

Implications

zg represents the emergence of a search-as-a-service layer for agent workspaces — a reusable component that sits between a wiki/vault and an AI agent. Unlike wiki-specific tools like qmd or docmd, zg is generic: it indexes any workspace (code, docs, structured data) and exposes it to any MCP-capable agent. For the LLM Wiki ecosystem, this means a wiki vault can be augmented with a zg index to give agents a fast, local, multi-strategy retrieval path without modifying wiki structure. The local-by-default model aligns with LLM Wiki’s on-device preference, while the agent auto-detection (OpenCode choosing zg without prompt instruction) demonstrates the MCP integration pattern other wiki tools could adopt.

Open Questions

  • Stars/forks not publicly available in captured sources (GitHub page did not render) — resolved 2026-10-12: 4,032★ / 942 forks via canonical repo zvec-ai/zvec-grep, see ## Recent Updates (2026-10-12) above 1.
  • Benchmark claims are vendor-sourced and self-reported; independent reproduction pending.
  • Whether zg has explicit support for indexing the OKF object-form frontmatter or typed wikilinks.

Recent Updates (2026-10-12)

As of 2026-10-12, the canonical repository zvec-ai/zvec-grep reports 4.0k stars (4,032) and 239 forks; last push 2026-10-10; 77 open issues — resolving the “Stars/forks not publicly available in captured sources” open question above. Recent commits: fix(retrieval): parse grouped Rust CLI status output (#238) (2026-10-10), feat(rust): add ninth agent installation target (#216) (2026-10-10), fix(rust): honor explicit roots when indexing nested workspaces (2026-10-10), fix(rust): treat daemon lock records naming the current PID as stale (2026-10-09), fix(rust): honor global client and server configuration (#223) (2026-10-04). Identifier note: zvec-ai/zvec-grep is the zg tool repository; the Alibaba vector library it depends on is the separate alibaba/zvec repository — both identifiers are correct, for different things. 2

Recent Updates (2026-10-17)

As of 2026-10-17, the canonical repository zvec-ai/zvec-grep reports 4,111 stars and 242 forks; latest release v0.2.0 (2026-08-27); last push 2026-10-17; 80 open issues. Recent commits: feat: add Pi agent support (#250) (2026-10-15); feat(ci): publish automatic retrieval results to PR comments (#252) (2026-10-15); chore(rust): simplify zg-daemon (#255) (2026-10-14). 3
Implication: the Rust rewrite is the live development line (recent commits are overwhelmingly Rust-side fixes), and the ninth agent installation target confirms the integration surface this page lists is still expanding — the MCP-server pattern here is proven at modest scale (~4k stars), not hype scale.

Sources

4
5

Footnotes

  1. raw/repositories/llm-wiki-ecosystem-stale-refresh-2026-10-12.md ↩

  2. raw/repositories/llm-wiki-ecosystem-stale-refresh-2026-10-12.md ↩

  3. raw/repositories/llm-wiki-ecosystem-stale-refresh-2026-10-17.md ↩

  4. raw/external/github-com-zvec-grep-a0e159be.md ↩

  5. raw/external/raw-githubusercontent-com-readme-md-f04c951e.md ↩