█

AI/TLDR

Buy me a coffee
Buy me a coffee

ripwire

A ranked call-graph map of your repo for coding agents, plus checks on what the agent changed

Code Indexing & SearchOpen source
Latest
v0.6.2
Updated
21 Sep 2026
Language
C++
License
Apache-2.0

What's new

v0.6.221 Sep 2026

Calls that live outside any named function now have a caller, the compact output legend became the default, and native Windows x64 builds with both clang-cl and MSVC.

IN SHORT

What is ripwire?

ripwire bills itself as "the ripgrep of AI context": a single self-contained binary that reads a source tree and writes a ranked symbol map to standard output, sized for a coding agent to read. It sits in the Code Indexing & Search category of the Retrieval & Knowledge (RAG) tools and is open-source, written in C++ and licensed Apache-2.0.

Updated Markdown version ↗

Overview

ripwire bills itself as "the ripgrep of AI context": a single self-contained binary that reads a source tree and writes a ranked symbol map to standard output, sized for a coding agent to read. Instead of grepping and opening whole files, the agent asks one question — where is this handled, who calls this function, is it safe to change, which tests reach this diff — and gets the relevant symbols, their callers, the change risks and the tests back in one answer. It is open source under the Apache-2.0 licence, published in the redhat-et GitHub organisation.

Under the hood it crawls the tree, extracts symbols with tree-sitter, resolves references into a call graph, ranks it with Personalized PageRank and streams a deterministic, minified XML map. There is no API key, no embeddings, no index server and no daemon; every dependency, including 25 tree-sitter grammars, is vendored in the source tree, so it builds and runs offline. The first call on a tree parses it and later calls read a cache, and two runs over the same tree are byte-identical.

ripwire's HTML call-graph map of Django's migration autodetector: 120 symbols and 183 call edges, nodes coloured by cyclomatic complexity, with module outlines
Django's migration autodetector, mapped by `ripwire --html` and coloured by cyclomatic complexityripwire README ↗

The second half of the tool checks the edit rather than the lookup: blast radius, the tests that reach a change, a quality panel that reports only what got worse, forgotten co-changes from git history, and a check on whether a function's contract changed. The project's "honesty contract" labels any count it cannot prove is complete as a floor, discloses every truncation, and treats a zero as "none found" rather than "none exists". A `--html` mode renders the ranked graph as one self-contained HTML page, with dashed edges marking calls the resolver could not pin to a single target.

What it does

  • Ranked, deterministic call-graph map built with tree-sitter and Personalized PageRank, emitted as compact XML sized for an agent
  • Task lenses such as `--for`, `--pack-task` and `--help-task` that return what to touch for a change described in words
  • Navigation verbs: `--callers`, `--callees`, `--uses`, `--impact` (blast radius), `--from-trace` for stack traces, and `--test-gate` for the tests a change must run
The same ripwire call graph shown twice, coloured first by cyclomatic complexity and then by git commit count
One graph, two lenses: complexity above, git churn belowripwire README ↗
  • Change review: `--quality-delta`, `--edit-check`, `--situ`, `--pr-context` and `--merge-scout`, drawing on git history for churn and co-change
  • Optional stdio MCP server (`ripwire --mcp`) exposing 33 verbs, including span-addressed edit verbs with staleness and ambiguity refusal
  • Seventeen task-shaped agent skills, and `ripwire wrap` recipes for Claude Code, Codex, Cursor, Windsurf, Gemini, opencode, aider and others
  • 25 vendored grammars covering languages including Rust, C++, Python, Go, TypeScript, Java, Kotlin, Elixir, Dart and CUDA, plus Markdown, JSON, TOML and YAML
  • `--scan-skills` security scanner for agent skill files, run automatically before `wrap` prints a recipe

Getting started

Install the prebuilt binary (macOS on Apple silicon, Linux arm64/x86-64 for RHEL 8+) or build from source with CMake 3.24+ and a C++23 compiler. The installer also activates the agent skills for every agent it detects, so most people only need to tell their agent: "Use ripwire on this repo."

Install the prebuilt binary

The installer downloads the latest GitHub release, verifies its SHA-256, installs to ~/.local/bin and stages the agent skills. It does not edit your shell profile.

bashbash
RIPWIRE_REPO=redhat-et/ripwire bash -c "$(curl -fsSL https://raw.githubusercontent.com/redhat-et/ripwire/main/scripts/install.sh)"
export PATH="$HOME/.local/bin:$PATH"
ripwire --version

Or build from source

Every dependency is vendored, so the build completes with the network off. Use a Release tree for the fast binary.

bashbash
git clone https://github.com/redhat-et/ripwire.git
cd ripwire
cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release
cmake --build build-release -j

Map a repository and ask it questions

Start with the ranked map under a token budget, then ask task-shaped questions. Output is compact XML meant for your agent. If the first call looks wrong, `ripwire . --doctor` checks the binary, grammars, cache and git identity.

bashbash
cd your-repo
ripwire . --max-tokens=3000                        # the ranked map
ripwire . --for="incremental cache invalidation"   # what to touch, ranked
ripwire . --callers=someFunction                   # who calls it
ripwire . --test-gate                              # which tests must run

Render the map as HTML

`--html` writes one self-contained HTML file with no server or CDN; `--color-by` picks the initial lens (lang, community, cx, churn or tested) and the page keeps a live selector.

bashbash
ripwire path/to/django/db/migrations --rank-by=rrf --top-k=120 --color-by=cx --html=map.html
Close crop of a ripwire call graph showing solid call edges next to dashed edges the resolver could not pin to a single target
A dashed shaft is a guess: the resolver split that call over several same-name definitionsripwire README ↗

Wire it into your agent (MCP optional)

The CLI is the recommended interface. `ripwire wrap` prints, but never applies, the setup recipe for your client; the MCP server is a plain stdio process for clients that want it.

texttext
ripwire wrap claude     # or: ripwire wrap --all

# any MCP client:
{
  "mcpServers": {
    "ripwire": { "command": "ripwire", "args": ["--mcp"] }
  }
}

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when a coding agent burns tokens grepping and reading whole files to orient itself in a large repository
  • Reach for it before a refactor to see a symbol's callers, use sites and blast radius in one call
  • Reach for it after an edit to find the tests that must run and what the change made worse in the quality panel
  • Reach for it when code context must stay fully local and offline, with no embeddings service or index server

How ripwire compares

ripwire alongside other open-source code indexing & search tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
CodeGraph★ 79.3kBuilds a local SQLite knowledge graph of a codebase with a Rust tree-sitter kernel, keeps it in sync through a file watcher, and serves symbols, call paths and blast radius to coding agents over MCP.
codebase-memory-mcp★ 49.4kA native MCP server that indexes a repository into a persistent tree-sitter knowledge graph of functions, call chains and routes, queried by agents through 15 tools.
GitNexus★ 49kIndexes a codebase into a knowledge graph of dependencies, call chains and execution flows, then exposes it to Claude Code, Cursor and Codex through MCP tools.
code-review-graph★ 33kA local-first code intelligence graph built with Tree-sitter that serves precise, incrementally-updated structural context to AI coding tools over MCP, so they read only the code a task needs.
XERJ★ 22.9kSingle-binary, Elasticsearch-compatible search engine whose autoindex command turns any folder of code, docs, logs or PDFs into typed indices that AI coding agents query via CLI or MCP instead of grepping.
Claude Context★ 12.7kAn MCP server that indexes your codebase into a vector database so AI coding agents can find relevant code by meaning instead of loading whole folders.
Graft★ 11.6kBuilds a persistent knowledge graph of your codebase as linked markdown files, then feeds the matching nodes to coding agents so they stop re-exploring the repo on every task.
ripwire★ 2.6kA ranked call-graph map of your repo for coding agents, plus checks on what the agent changed