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 solves
Ripwire provides a high-precision, token-efficient way for AI coding agents to navigate and understand large codebases. Instead of relying on naive grep-based searches or reading entire files—which consumes excessive tokens and often introduces noise—ripwire generates a ranked, deterministic call graph. This allows agents to identify exactly which symbols to touch, what the potential blast radius of a change is, and which tests to run, all while staying within a strict token budget.
How it works
Ripwire operates as a self-contained binary that runs locally and offline. It uses vendored tree-sitter grammars to parse code across 21 different languages. It does not require API keys, embeddings, or a background daemon.
When queried, it produces a minified XML output containing:
- Ranked Symbols: Symbols relevant to the task, ordered by importance with metadata like complexity, git churn, and change amplification.
- One-hop Call Context: Immediate callers and callees for the identified symbols.
- Confidence Scores: A rating of how certain the tool is about the result.
It can also generate a self-contained HTML map of the codebase, visualizing the call graph with nodes colored by metrics like cyclomatic complexity or git churn.
Who it’s for
Developers using AI coding agents (such as Claude Code, Cursor, Windsurf, Gemini, or Aider) who want to reduce token costs and improve the accuracy of the agent's code modifications by providing a structured "map" of the repository.
Highlights
- Token Efficiency: Reduces token usage by up to 90% compared to naive read-and-grep methods for common tasks.
- Broad Language Support: Supports 21 languages including Rust, C++, Python, Go, TypeScript, and Java.
- High Performance: Indexes repositories in fractions of a second (median 0.31s) and provides fast warm queries.
- Deterministic and Transparent: Explicitly labels guesses and discloses all truncations in the output, refusing to paraphrase or lie by omission.
- Zero Infrastructure: No index server, no embeddings, and no API keys required.
Related
- Project
- Project
- Project
- Project