zvec-grep
Local-first search across your workspace, built for humans and AI agents.
English | 中文
<source media="(prefers-color-scheme: dark)" srcset="./.github/assets/zg-logo-dark.svg">
<img src="./.github/assets/zg-logo.svg" width="150" alt="zg logo" />
Know the words—or don’t. Just zg. The local-first search layer for humans and agents.
<img src="https://img.shields.io/badge/node-%3E%3D22-blue.svg" alt="Node.js 22 or newer" />
<a href="#tour">🎬 <strong>Tour</strong></a> |
<a href="#features">💫 <strong>Features</strong></a> |
<a href="#try-it-yourself">🚀 <strong>Try it yourself</strong></a> |
<a href="./docs/README.md">📚 <strong>Docs</strong></a> |
<a href="#benchmarks">📊 <strong>Benchmarks</strong></a> |
<a href="#community">🤝 <strong>Community</strong></a>
zg (zvec-grep), powered by zvec, unifies ripgrep, BM25, and vector search behind one local-first interface. Use it directly from the terminal, or let your agent use it for you.
🎬 See it in action
<source media="(prefers-color-scheme: dark)" srcset="./.github/assets/zvec-grep-tour-dark.gif">
<img src="./.github/assets/zvec-grep-tour.gif" width="1000" alt="Install the agent integration, index a workspace, and let the agent search it with zvec-grep" />
💫 Why zg?
- Ready for humans and agents — install once, index once, then use the same workspace from the CLI or your agent on macOS, Linux, and Windows.
- Search beyond keywords — discover by meaning, rank by relevance, then verify with exact text or regex when needed.
- Multi-format search — search source code, documents, and structured data while preserving useful structure and source locations.
- Less searching, less context — ranked, source-linked results surface the right evidence with fewer tool calls, fewer tokens, and less noise.
- Local by default — files, indexes, and local models stay on your machine; remote embeddings receive data only with your permission.
🚀 Try it yourself
1. Set up a sample bookshelf
# Requires Node.js 22 or newer.
npm install -g @zvec/zvec-grep
mkdir zg-mystery && cd zg-mystery
curl --retry 3 --retry-all-errors --progress-bar -fL \
-o alice-in-wonderland.txt https://raw.githubusercontent.com/GITenberg/Alice-s-Adventures-in-Wonderland_11/master/11.txt \
-o sherlock-holmes.txt https://raw.githubusercontent.com/GITenberg/The-Memoirs-of-Sherlock-Holmes_834/master/834.txt
zg index --embedding local/potion-retrieval-32m
[!NOTE] The index is stored in
.zvec-grep/under the indexed project root.
[!TIP] If
zg indexorzg queryfails, rerun the same command with--debugfor diagnostics (supported in both direct and server modes).zg status --mode direct --debugreports per-file failures stored in an existing index; rerun a failed direct command to diagnose command-level fatal errors. Usezg status --mode server --debugto inspect recorded server indexing errors. For server connection failures, checkzg server statusand the server logs.
2. Choose how to search
For agents: ask with OpenCode
With OpenCode configured:
zg install --target opencode --yes
opencode models
opencode run --model opencode/nemotron-3-ultra-free \
"An unseen creature left a few marks. What did the detective infer? Cite local evidence."
Free model availability can change. Check opencode models and replace the
example model with one that is currently available in your environment.
OpenCode chooses zg on its own—the prompt does not name a tool.
같은 카테고리 다른 리소스
Next.js
React 기반 풀스택 프레임워크. App Router와 서버 컴포넌트(RSC)가 사실상 표준이며, SSR·SSG·ISR을 한 프로젝트 안에서 다룬다.
shadcn/ui
복사·붙여넣기 방식의 React 컴포넌트 모음. npm 의존성이 아닌 코드 소유권 모델이라 커스터마이징이 자유롭다.
Supabase
PostgreSQL 기반 BaaS. Auth · Realtime · Storage · Edge Functions 통합.
Anthropic MCP
Claude가 외부 도구/데이터에 접근하도록 해주는 프로토콜 표준. 생태계의 근간.