Open Source · v0.8.0 · MIT License
A local-first knowledge search CLI built for humans and AI agents. BM25 full-text search, vector embeddings, and LLM-powered Q&A — all in a single binary. Your data never leaves your machine.
Architecture
qi combines BM25 full-text search with optional vector embeddings — fused through Reciprocal Rank Fusion for results that are both precise and semantically aware. A single SQLite file holds everything. No servers, no sync, no subscriptions.
Why qi
BM25 via SQLite FTS5. No external search engine, no daemon, no configuration. Works out of the box the moment you run qi index.
Embeddings stored and queried locally. Works with Ollama, LM Studio, llama.cpp, MLX, or OpenAI — swap providers in a single config line.
Reciprocal Rank Fusion combines BM25 and vector rankings for results that are both lexically precise and semantically rich.
Ask questions in plain English. Get grounded answers with citations pointing back to your actual documents. No hallucination about sources.
A single SQLite file holds your entire index. Content-addressable blobs via SHA-256 eliminate duplicates automatically — no extra tooling.
Vector search and Q&A are optional enhancements. BM25 search works entirely offline — no API keys, no internet, no surprises.
Reference
| qi init | Create config and database |
| qi index [path] | Index a directory or named collection |
| qi search <q> | BM25 full-text search |
| qi query <q> | Hybrid search (BM25 + vector) |
| qi ask <question> | RAG-powered answer with citations |
| qi get <id> | Retrieve document by 6-char hash ID |
| qi list | List all named collections |
| qi delete <col> | Delete a collection and its index |
| qi stats | Show index statistics |
| qi doctor | Health check |
--modeBM25 full-text only. No embeddings required. Fastest option, great for keyword-heavy corpora.
BM25 + vector search fused with RRF. Default. Best balance of precision and semantic recall.
Hybrid + optional reranking pass. Highest quality. Use --explain to see scoring breakdown.
Get started
Install via Homebrew, go install, or as a Claude Code plugin. Zero dependencies — qi ships as a single static binary.
Use qi directly from Claude Code — index your codebase and query it as an agent skill.
qi is MIT licensed, written in Go, and built for developers who believe their data belongs to them — not a vendor's cloud.