StackMap
Subscribe

cocoindex-code vs zvec-grep

AST-based semantic code search for coding agents: pipx install, zero config, local embeddings out of the box — a CLI/skill/MCP that cuts agent context ~70% vs grepping. Built on CocoIndex. — versus — zg: ripgrep, BM25 and vector search behind one local-first CLI for humans and agents — index a workspace once, search code, docs and data by meaning, then verify with exact text or regex.

The curated verdict

Both give coding agents local semantic search with zero-config embeddings. cocoindex-code is AST-aware and code-only; zg is text-level across code, documents and data, and pairs the vector hit with grep to verify.

cocoindex-codezvec-grep
Stars2.7k2.8k
Forks216144
LanguagePythonTypeScript
LicenseApache-2.0Apache-2.0
Last activity3 days agoyesterday
Topicscode-intel, localcode-intel, rag, local
Curated connections74

cocoindex-code — the curator's take

The lowest-friction entry in the code-context-server category: one pipx install, zero config, and the [full] variant ships local embeddings so there's no API key before first search. AST-aware chunking plus the CocoIndex engine underneath means the index stays fresh incrementally instead of rebuilding. Integrates as a skill or MCP with Claude Code, Codex, Cursor. NOT the deepest graph: it's semantic search, not call-graph analysis — no callers/blast-radius queries (that's TokenSave or codegraph-mcp territory) — and the slim install quietly requires a cloud embedding key while [full] costs ~1GB of torch.

zvec-grep — the curator's take

Give it to a coding agent that wastes tool calls grepping: `zg index` builds a local index (embeddings can stay local — potion-retrieval-32m is the default), then `zg query` returns ranked, source-linked results across code, Markdown and structured files, and the agent drops to exact/regex only to confirm. Fewer calls, fewer tokens, nothing leaves the machine unless you allow a remote embedder. Built on Alibaba's zvec engine; direct and server modes. NOT a symbol-aware tool — it doesn't know what a function is, only what text means — and NOT a graph: for call edges and blast radius use a code-intelligence server.