For AI agents

Give your coding agent the repository, not a pile of files.

repowise indexes the code graph, git history, decisions and code health once, then serves them to your agent through 10 MCP tools. Free and open source. The analysis runs on your machine and needs no model key.

Set up your agentpip install repowise
10
MCP tools, each shaped like a task
Each one is listed in the MCP reference.
31.6%
fewer output tokens in a real agent loop
n = 43 · p = <0.0001 · Codex (gpt-5.6-sol) · django/django at a single pinned commit · 2026-08
3.8
Tool calls to reach an answer, against a bare agent's 7.2
n = 43 · Codex (gpt-5.6-sol) · django/django at a single pinned commit · 2026-08

MCP tools

One call answers what ten file reads would guess at.

Each tool returns the evidence for one job: who depends on a file, how often it broke, who owns it, which decision governs it. Every response says which commit it describes, so the agent knows when to trust it.

  • get_answer, get_context, get_symbol, search_codebase, get_why, get_risk, get_change_risk, get_health, get_dead_code, get_overview
get_risk, MCP response (excerpt)
{
  "targets": {
    "packages/core/src/repowise/core/pipeline/persist.py": {
      "dependents_count": 43,
      "hotspot_score": 0.9989,
      "co_change_partners_total": 25,
      "primary_owner": "Raghav Chamadiya",
      "bus_factor": 1,
      "defect_profile": {
        "fix_count": 39,
        "bug_magnet": true,
        "window": "6 months"
      },
      "line_coverage_pct": 85.47
    }
  },
  "_meta": {
    "indexed_commit": "e07c79f151ee",
    "index_behind": false
  }
}
One call on a file in the repowise repository. Fields trimmed, values as returned.

Hooks

Context arrives before the agent asks for it.

In Claude Code and Codex, hooks add context at the moment it matters. A session starts with the index freshness and the decisions relevant to the branch. A broad or empty search gets the related files, what imports them and who owns them. A read of a file that changed since is flagged as stale.

  • No model calls and no network: local reads only
  • Fail silent, so a broken setup never blocks the agent
  • Edit-time notice when a decision governs the file
SessionStart hook, Claude Code
[repowise 0.54.0] Codebase index is current (HEAD e07c79f1). The MCP tools (get_answer, get_context, search_codebase, get_risk) serve content verified against this exact tree; prefer them over raw file reads for locating and understanding code before you edit.
[repowise] Proposed but NOT accepted - mined from prior sessions and awaiting review. Weigh these; do not treat them as rules:
- Make the composed refactoring opportunity the unit on every surface
What the agent reads before its first message. The decision line is one of the repository's own.

Distill

Command output, errors first.

repowise distill runs a test, build, lint, git or search command and prints a compact rendering. Every error line is kept, the exit code is preserved, and anything dropped can be restored with repowise expand. An opt-in hook rewrites noisy agent commands automatically.

  • 86% of tokens saved on a 30-commit git diff, 61% on a failing pytest run
$ repowise distill git log -6
6 commits (showing 6 most recent; subjects only)
e07c79f1  Oct 1 2026   feat(health): Fix first applies the baseline precision levers and says why in plain words (#2839)
953f880f  Oct 1 2026   feat(ui): plot the whole filtered set on the Findings impact and effort graph (#2832)
285057d6  Oct 1 2026   fix(ui): give the unknown and no-strategy exclusions their words in Fix first (#2838)
ad5755ec  Oct 1 2026   feat(ui): lead Code Health with Fix first and put the code in the plan drawers (#2831)
44061e8a  Oct 1 2026   feat(performance): one opportunity per place you change, ranked by value (#2817)
b6959cf6  Oct 1 2026   fix(csharp): type each link of a chained call from the one before (#2833)

[repowise#907ca9de761b: 493 lines omitted (~6856 tokens); restore: repowise expand 907ca9de761b]
500 lines of git log in, 8 lines out. The marker restores the rest.

Where it runs

One index for every agent you use.

repowise init wires up the agents it finds and writes a CLAUDE.md or AGENTS.md that names the files to handle with care. The VS Code extension registers the server and adds language model tools. On hosted repowise the same tools answer over a URL, per repository or across a workspace.

  • Claude Code, Codex, Cursor, VS Code, OpenCode and Hermes
  • Any other MCP client over the hosted endpoint
$ repowise agents
Agent        Tier   Status
claude-code  full   configured
codex        full   configured
vscode       good   configured
cursor       good   installed, not configured
opencode     good   installed, not configured
hermes       good   installed, not configured

Add or remove with repowise agents add --target=<id>.
The agents found on one machine, and which ones are wired to the index.

FREQUENTLY ASKED

Questions, answered

Which agents does repowise work with?

Claude Code, Codex, Cursor, VS Code, OpenCode and Hermes are set up by repowise init or repowise agents add. Any other client that speaks MCP can connect to the local server or to the hosted endpoint.

Does my code leave my machine?

Not for the analysis. The graph, git history, code health and dead code are computed locally with no model call. Generated prose is optional and goes to the model provider you configure, under your own key.

What does it cost?

The CLI and MCP server are free and open source under AGPL-3.0. Hosted repowise has a free tier for public repositories; private repositories need Pro.

What are the 10 tools?

get_answer, get_context, get_symbol, search_codebase, get_why, get_risk, get_change_risk, get_health, get_dead_code, get_overview. Start with get_overview on a new repository, then get_answer or get_context for a question and get_risk before an edit.

How does the index stay current?

repowise init installs a post-commit hook that updates only what changed. Responses carry the indexed commit, and the session hook says when the index is behind.

Install it and connect your agent.

One install, one init, and your agent has the repository.