redhat-et/ripwire
The ripgrep of AI context: a zero-dependency C++23 CLI + MCP server for coding agents. Find what you want without reading the repo, then check you built what you meant — blast radius, tests-to-run, quality deltas. Signatures at 74.7% fewer bytes than bodies; every guess labelled, every loss published. Paddle out with a map.
What it is ripwire is a single binary you run in a code repository. It builds a lightweight index and answers questions like “Where is X handled?” or “What will this change break?” with a concise, ranked answer — no server, no API key, no embeddings, no background daemon. It works offline and supports many languages (C++, Python, Rust, Java, TypeScript, and more).
Why it matters Coding agents (like Claude Code, Codex, or Cursor) often explore code by reading whole files or grepping repeatedly, which burns tokens and time. ripwire gives them the same information in one call: a ranked call graph of what’s relevant, what callers exist, what tests cover a symbol, and what a proposed edit would affect. The goal is “one question, one complete answer” — no follow-up greps needed.
Key features
- Orientation:
ripwire .gives a ranked overview of the main subsystems, entry points, and important symbols. - Targeted queries:
--for(“the change you’re about to make”),--callers,--expand,--path, and more each return a lean, complete response. - Edit safety:
--edit-checkflags call-site compatibility, blast radius, and which tests reach the change. - Quality gates:
--quality-deltareports only what got worse across 12 kinds of code-quality issues (e.g., duplication, misuse of shared utilities). It also tracks persistent notes you can pin to symbols for later agents. - Honesty: Output always labels limits (e.g., “this is a floor, not a total”), discloses truncations, and provides a
next=token to fetch missing rows — no silent drops. - Token budgets: You can set a budget per answer; if it can’t fit, it tells you and shows how to get the rest.
Installation and use One line installs the binary and automatically teaches every coding agent it finds on your machine when to use ripwire (Claude Code, Codex, Cursor, Windsurf, Gemini, opencode, aider). Then start a session with something like “Use ripwire on this repo” — the agent will call it as needed. There’s also an optional MCP server interface.
Performance evidence The README includes measurements: indexing a repo takes 0.25–0.45 seconds using 6.6–16.5 MB, while a leading graph-database MCP server takes 23–52 seconds and 391–623 MB. Warm queries answer in 197 ms vs 1,082 ms. Token savings for typical tasks range from 2–25× compared to naive file reads or greps.
How it’s built Its quality lens is grounded in 50 years of software-engineering research (McCabe 1976, Halstead 1977, etc.) plus recent papers (as of late 2026), all logged one-by-one in docs/LINEAGE.md. It also surveyed 237 tools that contributed nothing (and says so) — keeping the approach honest and evidence-based.
Limitations (stated in the README)
- It’s a floor for honesty, not a substitute for custom measurement design.
- The arity heuristic can over-count incompatible call sites when defaulted trailing parameters exist (documented; compiling verifies).
- For broad, common-word conceptual queries, plain grep-and-read can still win.
Version and license Current version is 0.6.8 (Apache 2.0). The full reference guide, install options, and evals are in the repository’s docs.
Related
- Project
- Project
- Project
- Project
- Project