Your codebase, token by token: local semantic search in Rust
ColGREP keeps every token in play for semantic code search, running entirely offline so your code never leaves the machine.

What it does
NextPlaid is a local-first, multi-vector database written in Rust. It stores hundreds of small embeddings per document instead of one, then scores matches token-by-token using MaxSim. ColGREP is the terminal tool built on top: it parses your codebase with tree-sitter, structures functions and classes into rich text, and ranks them by meaning alongside regex filters. Everything stays on your CPU (or GPU if you insist), and indices update incrementally without rebuilding.
The interesting bit
The trick is making multi-vector search practical. NextPlaid compresses those token-level embeddings down to 2-bit or 4-bit quantized chunks and memory-maps them, so a million documents can sit on disk and page in on demand. For code specifically, ColGREP doesn’t embed raw text; it feeds the model a structured digest of each function—signature, parameters, docstring, calls, variables—so the embedding gets richer signal than a wall of code.
Key highlights
- Single Rust binary for ColGREP: no server, no API keys, no external dependencies.
- Built-in ONNX encoding and ColBERT-style models; swap HuggingFace models without corrupting existing indexes.
- Memory-mapped, quantized indices with incremental updates and SQLite metadata pre-filtering.
- Agent integrations for
Claude Code,OpenCode,Codex, andHermes(Claude hooks are full-featured; the others are basic). - NextPlaid exposes a REST API and Python client for general retrieval workloads, with CPU and CUDA backends.
Caveats
- Only the
Claude Codeagent integration has full hooks;OpenCode,Codex, andHermessupport is explicitly basic for now.
Verdict
Worth your time if you want local, offline semantic search for code or need a production multi-vector engine. Skip it if you are happy with a simple, cloud-hosted single-vector database and don’t need token-level resolution.
Frequently asked
- What is lightonai/next-plaid?
- ColGREP keeps every token in play for semantic code search, running entirely offline so your code never leaves the machine.
- Is next-plaid open source?
- Yes — lightonai/next-plaid is open source, released under the Apache-2.0 license.
- What language is next-plaid written in?
- lightonai/next-plaid is primarily written in Rust.
- How popular is next-plaid?
- lightonai/next-plaid has 518 stars on GitHub.
- Where can I find next-plaid?
- lightonai/next-plaid is on GitHub at https://github.com/lightonai/next-plaid.