Skip to content
Back to search

lighton-tools

Semantic code search and multi-vector search tools by LightOn AI.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lightonai--next-plaid/badge.svg)](/listings/lightonai--next-plaid)

HTML

<a href="/listings/lightonai--next-plaid"><img src="/api/listings/lightonai--next-plaid/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

Install with **Homebrew** (macOS / Linux):

brew install lightonai/tap/colgrep && colgrep --install-agent

or with the **shell installer**:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/lightonai/next-plaid/releases/latest/download/colgrep-installer.sh | sh && "${CARGO_HOME:-$HOME/.cargo}/bin/colgrep" --install-agent

`colgrep --install-agent` downloads the local model behind agent mode (one-time, 2.5 GB): a small model that explores your codebase like a sub-agent and returns the code locations that answer a question. To install colgrep alone, drop the `&& …` part; you can run `colgrep --install-agent` later.

Build the index:

colgrep init /path/to/project  # specific project
colgrep init                   # current directory

Search:

colgrep "database connection pooling"

Or ask the agent: it searches with colgrep, reads the candidates, and returns the exact lines that answer the question (after `colgrep --install-agent`):

colgrep --agent "where is the database connection pool configured"

That's it. No server, no API, no dependencies. ColGREP is a single Rust binary with everything baked in. `colgrep init` builds the index for the first time. After that, every search detects file changes and updates the index automatically before returning results.

Regex meets semantics:

colgrep -e "async.*await" "error handling"

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 20 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "lighton-tools",
  4. "description": "Semantic code search and multi-vector search tools by LightOn AI.",
  5. "owner": {
  6. "name": "LightOn AI",
  7. "email": "contact@lighton.ai"
  8. },
  9. "plugins": [
  10. {
  11. "name": "colgrep",
  12. "source": ".",
  13. "version": "1.8.5",
  14. "description": "Semantic code search powered by ColBERT. Drop-in replacement for grep with natural language understanding.",
  15. "author": {
  16. "name": "LightOn AI"
  17. }
  18. }
  19. ]
  20. }
README.md · README · 364 lines · 1 finding marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. <h1>NextPlaid & ColGREP</h1>
  3. <p><b>NextPlaid</b> is a multi-vector search engine. <b>ColGREP</b> is semantic code search, built on it.</p>
  4. <p>
  5. <a href="colgrep/README.md"><b>ColGREP</b></a>
  6. ·
  7. <a href="next-plaid-api/README.md"><b>NextPlaid</b></a>
  8. ·
  9. <a href="#models"><b>Models</b></a>
  10. </p>
  11. </div>
  12. <p align="center">
  13. <img width="820" src="docs/colgrep-demo.gif" alt="ColGREP demo"/>
  14. </p>
  15. ---
  16. ## ColGREP
  17. Semantic code search for your terminal and your coding agents. Searches combine regex filtering with semantic ranking. All local, your code never leaves your machine.
  18. ### Quick start
  19. Install with **Homebrew** (macOS / Linux):
  20. ```bash
  21. brew install lightonai/tap/colgrep && colgrep --install-agent
  22. ```
  23. or with the **shell installer**:
  24. ```bash
  25. curl --proto '=https' --tlsv1.2 -LsSf https://github.com/lightonai/next-plaid/releases/latest/download/colgrep-installer.sh | sh && "${CARGO_HOME:-$HOME/.cargo}/bin/colgrep" --install-agent
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 35 on GitHub
  26. ```
  27. `colgrep --install-agent` downloads the local model behind agent mode (one-time, 2.5 GB): a small model that explores your codebase like a sub-agent and returns the code locations that answer a question. To install colgrep alone, drop the `&& …` part; you can run `colgrep --install-agent` later.
  28. Build the index:
  29. ```bash
  30. colgrep init /path/to/project # specific project
  31. colgrep init # current directory
  32. ```
  33. Search:
  34. ```bash
  35. colgrep "database connection pooling"
  36. ```
  37. Or ask the agent: it searches with colgrep, reads the candidates, and returns the exact lines that answer the question (after `colgrep --install-agent`):
  38. ```bash
  39. colgrep --agent "where is the database connection pool configured"
  40. ```
  41. That's it. No server, no API, no dependencies. ColGREP is a single Rust binary with everything baked in. `colgrep init` builds the index for the first time. After that, every search detects file changes and updates the index automatically before returning results.
  42. Regex meets semantics:
  43. ```bash
  44. colgrep -e "async.*await" "error handling"
  45. ```
  46. ### Change the model
  47. The default is [`lightonai/LateOn-Code-edge`](https://huggingface.co/lightonai/LateOn-Code-edge). Switch to any other ColBERT-style model on HuggingFace:
  48. ```bash
  49. # Persist as the default (existing indexes for other models are kept)
  50. colgrep set-model lightonai/LateOn-Code
  51. # One-shot override for a single query or init
  52. colgrep --model lightonai/LateOn-Code "database connection pooling"
  53. # See which model an index was built with
  54. colgrep status
  55. # Private HuggingFace model
  56. HF_TOKEN=hf_xxx colgrep set-model myorg/private-model
  57. ```
  58. Each (project, model) pair has its own index directory, so switching models never corrupts existing indexes and you can flip back and forth without re-indexing. `colgrep clear` scopes to the active model; `colgrep clear --all` wipes every index.
  59. ### Agent integrations
  60. | Tool | Install |
  61. | ----------- | ------------------------------- |
  62. | Claude Code | `colgrep --install-claude-code` |
  63. | OpenCode | `colgrep --install-opencode` |
  64. | Codex | `colgrep --install-codex` |
  65. | Hermes | `colgrep --install-hermes` |
  66. > Restart your agent after installing. Claude Code has full hooks support. OpenCode, Codex, and Hermes integrations are basic for now, PRs welcome.
  67. ### How it works
  68. ```mermaid
  69. flowchart TD
  70. A["Your codebase"] --> B["Tree-sitter"]
  71. B --> C["Structured representation"]
  72. C --> D["LateOn-Code-edge · 17M"]
  73. D --> E["NextPlaid"]
  74. E --> F["Search"]
  75. B -.- B1["Parse functions, methods, classes"]
  76. C -.- C1["Signature, params, calls, docstring, code"]
  77. D -.- D1["Multi-vector embedding per code unit · runs on CPU"]
  78. E -.- E1["Rust index binary · quantized · memory-mapped · incremental"]
  79. F -.- F1["grep-compatible flags · SQLite filtering · semantic ranking
  80. 100% local, your code never leaves your machine"]
  81. style A fill:#4a90d9,stroke:#357abd,color:#fff
  82. style B fill:#50b86c,stroke:#3d9956,color:#fff
  83. style C fill:#50b86c,stroke:#3d9956,color:#fff
  84. style D fill:#e8913a,stroke:#d07a2e,color:#fff
  85. style E fill:#e8913a,stroke:#d07a2e,color:#fff
  86. style F fill:#9b59b6,stroke:#8445a0,color:#fff
  87. style B1 fill:none,stroke:#888,stroke-dasharray:5 5,color:#888
  88. style C1 fill:none,stroke:#888,stroke-dasharray:5 5,color:#888
  89. style D1 fill:none,stroke:#888,stroke-dasharray:5 5,color:#888
  90. style E1 fill:none,stroke:#888,stroke-dasharray:5 5,color:#888
  91. style F1 fill:none,stroke:#888,stroke-dasharray:5 5,color:#888
  92. ```
  93. **Agent mode.** Your coding agent (Claude, GPT, Gemini, …) can call `colgrep` itself, or hand the whole question to `colgrep --agent`: a small search model that runs on your machine, calls colgrep as many times as it needs, reads the candidates, and returns only the lines that answer. The large model gets the answer without spending its context on the search.
  94. ```mermaid
  95. flowchart TD
  96. L["Coding agent · Claude, GPT, Gemini, …"]
  97. A["colgrep --agent · 2B search model"]
  98. S["colgrep"]
  99. M["LateOn-Code-edge · 17M"]
  100. I["NextPlaid index"]
  101. L -->|"delegates a question"| A
  102. L -->|"or searches directly"| S
  103. A -->|"many searches and reads"| S
  104. S --> M
  105. M --> I
  106. A -. "file:line locations" .-> L
  107. L -.- L1["Plans, edits, reviews · large model, any provider"]
  108. A -.- A1["Searches, reads files read-only, picks the exact lines
  109. runs locally on GPU or CPU"]
  110. M -.- M1["Multi-vector embedding per code unit · runs on CPU"]
  111. style L fill:#4a90d9,stroke:#357abd,color:#fff
  112. style A fill:#9b59b6,stroke:#8445a0,color:#fff
  113. style S fill:#50b86c,stroke:#3d9956,color:#fff
  114. style M fill:#e8913a,stroke:#d07a2e,color:#fff
  115. style I fill:#e8913a,stroke:#d07a2e,color:#fff
  116. style L1 fill:none,stroke:#888,stroke-dasharray:5 5,color:#888
  117. style A1 fill:none,stroke:#888,stroke-dasharray:5 5,color:#888
  118. style M1 fill:none,stroke:#888,stroke-dasharray:5 5,color:#888
  119. ```
  120. **What the model sees.** Each code unit is converted to structured text before embedding:
  121. ```python
  122. # Function: fetch_with_retry
  123. # Signature: def fetch_with_retry(url: str, max_retries: int = 3) -> Response
  124. # Description: Fetches data from a URL with retry logic.
  125. # Parameters: url, max_retries
  126. # Returns: Response
  127. # Calls: range, client.get
  128. # Variables: i, e
  129. # Uses: client, RequestError
  130. # File: src/utils/http_client.py
  131. def fetch_with_retry(url: str, max_retries: int = 3) -> Response:
  132. """Fetches data from a URL with retry logic."""
  133. for i in range(max_retries):
  134. try:
  135. return client.get(url)
  136. except RequestError as e:
  137. if i == max_retries - 1:
  138. raise e
  139. ```
  140. This structured input gives the model richer signal than raw code alone.
  141. **Documentation:** install variants, performance tuning, all flags and options → [ColGREP documentation](colgrep/README.md)
  142. ### Benchmark
  143. <p align="center">
  144. <picture>
  145. <source media="(prefers-color-scheme: dark)" srcset="docs/colgrep-bench-dark.svg">
  146. <img width="560" src="docs/colgrep-bench-light.svg" alt="NDCG@10 on the Semble code-search benchmark — ColGREP LateOn-Code 0.859, semble potion-code-16M 0.853, ColGREP LateOn-Code-edge 0.846">
  147. </picture>
  148. </p>
  149. ColGREP against Semble public bench: 1,251 queries × 63 repos × 19 languages (FP32).
  150. ---
  151. ## Why multi-vector?
  152. Standard vector search collapses an entire document into **one** embedding. That's a lossy summary. Fine for short text, bad for code where a single function has a name, parameters, a docstring, control flow, and dependencies.
  153. Multi-vector keeps ~300 embeddings of dimension 128 per document instead of one. At query time, each query token finds its best match across all document tokens (**MaxSim**). More storage upfront. That's what NextPlaid solves with quantization and memory-mapped indexing.
  154. ---
  155. ## NextPlaid
  156. A local-first multi-vector database with a REST API. It's what powers ColGREP under the hood, but it's a general-purpose engine you can use for any retrieval workload.
  157. - **Built-in encoding.** Pass text, get results. Ships with ONNX Runtime for ColBERT models, no external inference server needed.
  158. - **Memory-mapped indices.** Low RAM footprint, indices live on disk and are paged in on demand.
  159. - **Product quantization.** 2-bit or 4-bit compression. A million documents fit in memory.
  160. - **Incremental updates.** Add and delete documents without rebuilding the index.
  161. - **Metadata pre-filtering.** SQL WHERE clauses on a built-in SQLite store. Filter _before_ search so only matching documents are scored.
  162. - **CPU-optimized.** Designed to run fast on CPU. CUDA supported when you need it.
  163. **NextPlaid vs [FastPlaid](https://github.com/lightonai/fast-plaid).** FastPlaid is a GPU batch indexer built for large-scale, single-pass workloads. NextPlaid wraps the same FastPlaid algorithm into a production API that handles documents as they arrive: incremental updates, concurrent reads/writes, deletions, and built-in encoding. Use FastPlaid for bulk offline indexing and experiments, NextPlaid for serving and streaming ingestion.
  164. ### Quick start
  165. **Run the server (Docker):**
  166. ```bash
  167. # CPU
  168. docker pull ghcr.io/lightonai/next-plaid:cpu-1.8.5
  169. docker run -p 8080:8080 -v ~/.local/share/next-plaid:/data/indices \
  170. ghcr.io/lightonai/next-plaid:cpu-1.8.5 \
  171. --host 0.0.0.0 --port 8080 --index-dir /data/indices \
  172. --model lightonai/answerai-colbert-small-v1-onnx --int8
  173. ```
  174. ```bash
  175. # GPU
  176. docker pull ghcr.io/lightonai/next-plaid:cuda-1.8.5
  177. docker run --gpus all -p 8080:8080 -v ~/.local/share/next-plaid:/data/indices \
  178. ghcr.io/lightonai/next-plaid:cuda-1.8.5 \
  179. --host 0.0.0.0 --port 8080 --index-dir /data/indices \
  180. --model lightonai/GTE-ModernColBERT-v1 --cuda
  181. ```
  182. **Query from Python:**
  183. ```bash
  184. pip install next-plaid-client
  185. ```
  186. ```python
  187. from next_plaid_client import NextPlaidClient, IndexConfig
  188. client = NextPlaidClient("http://localhost:8080")
  189. # Create index
  190. client.create_index("docs", IndexConfig(nbits=4))
  191. # Add documents, text is encoded server-side
  192. client.add(
  193. "docs",
  194. documents=[
  195. "next-plaid is a multi-vector database",
  196. "colgrep is a code search tool based on NextPlaid",
  197. ],
  198. metadata=[{"id": "doc_1"}, {"id": "doc_2"}],
  199. )
  200. # Search
  201. results = client.search("docs", ["coding agent tool"])
  202. # Search with metadata filtering
  203. results = client.search(
  204. "docs",
  205. ["vector-database"],
  206. filter_condition="id = ?",
  207. filter_parameters=["doc_1"],
  208. )
  209. # Delete by predicate
  210. client.delete("docs", "id = ?", ["doc_1"])
  211. ```
  212. **Or via the CLI** (`pip install "next-plaid-client[cli]"`):
  213. ```bash
  214. next-plaid index create docs
  215. next-plaid document add docs --text "hello world"
  216. next-plaid search docs "hello"
  217. ```
  218. Once the server is running: [Swagger UI](http://localhost:8080/swagger-ui) · [OpenAPI spec](http://localhost:8080/api-docs/openapi.json)
  219. **Documentation:** REST API reference, Docker Compose, environment variables → [NextPlaid documentation](next-plaid-api/README.md)
  220. ---
  221. ## API Benchmarks
  222. End-to-end benchmarks against the NextPlaid API on [BEIR](https://github.com/beir-cellar/beir) datasets. Documents are uploaded as raw text in parallel batches of 64. Search queries are sent as raw text, one at a time, with 16 concurrent workers to simulate real user traffic. All throughput numbers (docs/s, QPS) include encoding time — the model runs inside the API, so every document and query is embedded on the fly within the API.
  223. **Setup:** `lightonai/GTE-ModernColBERT-v1` on NVIDIA H100 80GB, `top_k=100`, `n_ivf_probe=8`, `n_full_scores=4096`. CPU search uses INT8-quantized ONNX encoding on the same machine.
  224. | Dataset | Documents | MAP | NDCG@10 | NDCG@100 | Recall@10 | Recall@100 | Indexing (docs/s) | GPU QPS | GPU P95 (ms) | CPU QPS | CPU P95 (ms) |
  225. | -------- | --------: | -----: | ------: | -------: | --------: | ---------: | ----------------: | ------: | -----------: | ------: | -----------: |
  226. | arguana | 8,674 | 0.2457 | 0.3499 | 0.3995 | 0.7126 | 0.9337 | 77.1 | 13.6 | 170.1 | 17.4 | 454.7 |
  227. | fiqa | 57,638 | 0.3871 | 0.4506 | 0.5129 | 0.5184 | 0.7459 | 41.3 | 18.2 | 170.6 | 17.6 | 259.1 |
  228. | nfcorpus | 3,633 | 0.1870 | 0.3828 | 0.3427 | 0.1828 | 0.3228 | 86.7 | 6.6 | 262.1 | 16.9 | 219.4 |
  229. | quora | 522,931 | 0.8170 | 0.8519 | 0.8644 | 0.9309 | 0.9730 | 105.5 | 20.9 | 126.2 | 17.7 | 235.1 |
  230. | scidocs | 25,657 | 0.1352 | 0.1914 | 0.2732 | 0.2020 | 0.4418 | 46.9 | 17.5 | 139.3 | 16.5 | 281.7 |
  231. | scifact | 5,183 | 0.7186 | 0.7593 | 0.7775 | 0.8829 | 0.9633 | 53.1 | 7.9 | 169.5 | 16.9 | 305.4 |
  232. ---
  233. ## Models
  234. Any HuggingFace ColBERT-style model can be exported to ONNX. By default, both FP32 and INT8 quantized versions are created. INT8 quantization reduces size (~4x smaller) and improves speed with minimal quality loss.
  235. ```bash
  236. pip install pylate-onnx-export
  237. # Export model (creates model.onnx and model_int8.onnx)
  238. pylate-onnx-export lightonai/GTE-ModernColBERT-v1 -o ./my-models
  239. # Export + push to HuggingFace Hub
  240. pylate-onnx-export lightonai/GTE-ModernColBERT-v1 -o ./my-models --push-to-hub myorg/my-onnx-model
  241. ```
  242. ### Ready-to-use models
  243. These can be served with NextPlaid and used with ColGREP without export:
  244. | Model | Use case |
  245. | ------------------------------------------ | --------------------------- |
  246. | `lightonai/LateOn-Code-edge` | Code search, lightweight |
  247. | `lightonai/LateOn-Code` | Code search, accurate |
  248. | `lightonai/mxbai-edge-colbert-v0-32m-onnx` | Text retrieval, lightweight |
  249. | `lightonai/answerai-colbert-small-v1-onnx` | Text retrieval, lightweight |
  250. | `lightonai/GTE-ModernColBERT-v1` | Text retrieval, accurate |
  251. Any [PyLate-compatible ColBERT model](https://huggingface.co/models?other=PyLate) from HuggingFace can be used when converted to ONNX.
  252. ---
  253. ## License
  254. Apache-2.0
  255. ## Citation
  256. ```bibtex
  257. @software{next-plaid,
  258. title = {NextPlaid, ColGREP: Multi-vector search, from database to coding agents.},
  259. url = {https://github.com/lightonai/next-plaid},
  260. author = {Sourty, Rapha\"{e}l},
  261. contributors = {Dinaburg, Artem and Oruc, Omer Faruk and Tripathi, Abhishek and Carron, Igor and Hsu, Chao-Chun (Joe) and Ellis, Jonathan and NickSdot and Weitekamp, Raymond and R\k{a}czka, Szymon and Motliuk, Mark and Chechenev, Ivan},
  262. year = {2026},
  263. }
  264. @misc{LateOn-Code,
  265. title = {LateOn-Code: a Family of State-Of-The-Art Late Interaction Code Retrieval Models},
  266. author = {Chaffin, Antoine},
  267. url = {https://huggingface.co/collections/lightonai/lateon-code},
  268. year = {2026}
  269. }
  270. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.