Find code by what it means, not what it's called.
Rapu ranks your repo by relevance — so it surfaces where gemv_trit is defined even when that exact string appears nowhere in the file. Grep and ripgrep can't do that: they match characters, Rapu matches relevance. One binary, zero telemetry, your source never leaves the disk it was indexed on.
--json emits a stable edit handle for AI agents and MCP toolsWhat it does
rapu index <dir> walks your tree — honoring .gitignore — splits each file into line-aligned chunks of about 800 bytes, and tokenizes them with subword splitting that understands camelCase and snake_case. So gemvTrit, gemv_trit, and a function called ternary_matvec all share the tokens that connect a query to the right code. It fits a BM25 model over those chunks and saves everything to .rapu/index.json. Local file, your disk, no network.
rapu search <query> ranks the chunks by relevance and prints file:start-end (score) with the best-matching line, so you go straight to the spot:
- relevance, not literal match — BM25 surfaces the most relevant chunk first, even when your query string never appears in it
- subword-aware —
camelCase/snake_caseare split so names match across naming styles - respects
.gitignore— built on the sameignorecrate ripgrep uses, so build dirs and vendored junk stay out of the index - agent-ready output —
--jsonemits{file, start, end, score, blake3-hash}— a stable edit handle to hand straight to an AI agent, an MCP tool, or repo-printer - single binary — no runtime, no daemon, no account, no cloud
rapu index . # walk + chunk + fit BM25 → .rapu/index.json
rapu search "ternary matrix kernel" # → file:start-end (score) + best line
rapu search "gemv_trit" --json # → {file,start,end,score,blake3-hash}
What's in active development
Rapu is the lexical leg of Scarlet's sovereign code-intelligence suite. Three capabilities are being composed onto it from engines we've already built — tracked openly, gate-verified:
- semantic recall — ask in plain language, get the function not the string (from our
scarlet-graphembedding + fusion engine) - symbol & import graph — navigate by function / struct / call, not just text (from our
repo-printerserver, already tested) - agent access over MCP — token-frugal, safe, surgical repo access for local AI agents
These are in development, not shipped. We say so plainly because the tool sells on what it does, not what it promises.
How it compares to grep and ripgrep
ripgrep and the silver searcher are excellent, and Rapu doesn't try to replace them. They're literal-match tools: you tell them a string, they find every line that contains it, fast. When you know the exact text, reach for them.
Rapu does a different job. It answers "where is the code about this?" — ranking chunks by relevance so the definition you want comes back even when the words you typed never appear in it. A character matcher structurally cannot do that; it can only find what's literally there. That's the whole gap Rapu fills.
The other difference is sovereignty. Rapu is local-first by construction: the index is a file on your disk, nothing uploads, nothing phones home. No editor plugin, no account, no monthly bill — and the JSON output makes it a clean building block for your own scripts and local AI agents.
Get it
One-time purchase: the cross-platform binary, a license key, and a year of updates — including every code-intelligence capability above as it ships. No subscription, no seat metering, no telemetry.
Rapu · binary + license key + one year of updates $49USD · one-time
License Rapu →Checkout and tax handled by Polar as merchant of record. Download link + license key arrive by email the moment payment clears. If it doesn't do what this page says it does, we refund.
Who this is for
- Developers in regulated or air-gapped shops who structurally cannot send source to a cloud search
- Anyone working a large unfamiliar codebase who wants ranked, meaning-leaning search without an editor plugin and a monthly bill
- Teams who want code tooling that costs a fixed amount once, not a per-seat subscription that grows with headcount
Contact
- Questions, bulk licensing, feature requests: hello@scarletsystems.co.nz
- The engineering behind the retrieval pipeline: the journal