rawq
A single-binary, fully offline Rust CLI that combines semantic and lexical search over a codebase to hand an AI agent only the relevant code, with file paths, line ranges and confidence scores, instead of full files.
rawq indexes a codebase with tree-sitter-based chunking across sixteen languages and searches it with a fusion of semantic search, using local ONNX embeddings, and lexical search, using the Tantivy BM25 engine, combined through reciprocal rank fusion with adaptive weighting between the two. Searching a ten-thousand-file codebase this way returns five to ten relevant chunks instead of the dozens of full files an agent would otherwise need to read to find the same information.
Indexing is incremental, tracked with a SHA-256 hash per chunk and aware of git changes for sub-second re-indexing, and results can be returned as structured JSON in addition to plain text, or filtered to lexical-only or semantic-only search. An embedding model is downloaded and indexed automatically on first run.
It installs as a prebuilt binary, through Cargo, or from source, with optional GPU acceleration through DirectML, CUDA or CoreML depending on platform; it is written in Rust and licensed under MIT.