# ripwire

> A zero-dependency C++23 CLI and MCP server that gives coding agents a ranked call-graph map of a repository and checks edits for blast radius, tests and quality.

ripwire is an open-source C++23 command-line tool and MCP server for coding agents, published under the redhat-et GitHub organization. It crawls a repository, builds a deterministic call graph and returns compact XML answers that tell an agent what to touch, what a change affects and which tests to run. The README describes it as "the ripgrep of AI context".

## What It Is

ripwire sits between a coding agent and a codebase. Instead of grepping and reading whole files, the agent runs a command such as `ripwire . --for="<task>"` and gets a ranked set of relevant symbols with their callers, complexity, churn and test coverage inline. It runs as a single process on the local machine with no API key, embeddings, index server or daemon. By default its output is XML sized for an AI agent to read, not for a person.

## How the Workflow Works

The workflow has two jobs. The first is orientation: `ripwire .` returns a ranked map of subsystems, entry points and important symbols. The second is asking questions, with verbs such as `--for`, `--expand`, `--callers`, `--impact`, `--path`, `--from-trace`, `--pack-task`, `--situ` and `--pr-context`. After an edit, `--edit-check` flags contract changes, `--quality-delta` reports only what got worse, and `--test-gate` names the tests that must run. Every truncation is disclosed, counts that cannot be proven totals are labelled as floors, and a zero means "none found".

## Quality Analysis

`--quality-panel` joins six independent evidence families (structural shape, naming, confusing idioms, git churn, colocation and non-local state). It ranks functions by how many families agree rather than by one blended score. Related lenses include `--hotspots`, `--clones`, `--lint`, `--field-affinity` and `--html`, which writes a self-contained call-graph visualization.

## Setup and Agent Integration

A one-line installer downloads a prebuilt binary for macOS on Apple silicon and Linux on arm64 or x86-64, and installs agent skills for detected agents. A Windows x64 preview zip is also published. The project can be built from source with CMake 3.24+ and a C++23 compiler, with dependencies vendored. The README names Claude Code, Codex, Cursor, Windsurf, Gemini, opencode and aider as agents that can call the CLI, and `ripwire wrap` prints per-client MCP wiring recipes. The README also describes 25+ source and document formats, including Python, Rust, TypeScript, Go and Swift, parsed with tree-sitter.

## Measurements the Project Reports

The README publishes its own benchmarks, which are vendor-reported. Its table of ten everyday tasks lists token savings versus naive grep-and-read, and a head-to-head against other code-context tools on a LocBench slice reports 58.3% strict file@10 against 40.0% for the best alternative. It also states where it loses and links to docs/EVALS.md for method and counterexamples.

## Features
- Ranked, deterministic call-graph map of a repository
- Task-focused lookup with --for and --pack-task
- Callers, impact and usage queries
- Stack-trace resolution with --from-trace
- Edit contract checking with --edit-check
- Quality delta reporting for changed code
- Test selection with --test-gate and --situ
- PR review context and merge scouting
- Six-family quality panel
- Self-contained HTML call-graph visualization
- Token budgets and disclosed truncation
- MCP server interface
- Agent skill installation
- No runtime dependencies or API key

## Integrations
Claude Code, Codex, Cursor, Windsurf, Gemini, opencode, aider, MCP

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source

## Version
0.6.7

## Links
- Website: https://github.com/redhat-et/ripwire
- Documentation: https://github.com/redhat-et/ripwire/blob/main/docs/COMMANDS.md
- Repository: https://github.com/redhat-et/ripwire
- EveryDev.ai: https://www.everydev.ai/tools/ripwire
