
repowise-dev/repowise
Developer toolsCodebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Overview
Five intelligence layers · Nine MCP tools · 15 languages · Multi-repo workspaces · One pip install Hosted for teams → · Docs · Discord · Contact Layers · Code Health · Refactoring · Benchmarks · Languages · Quickstart · MCP tools · Comparison · Hosted measure, locate, and fix what your AI ships code health that predicts real bugs · ROC AUC 0.74 across 21 repos · 2.3× CodeScene's defects under a fixed review budget graph-aware refactoring plans your agent can execute · up to −96% context tokens · −70% agent tool calls at answer-quality parity Measured, reproducible, on public codebases. See the benchmarks ↓ AI now writes a large and growing share of the code, and the humans accountable for it have to trust what ships. A score that says "this file is risky" isn't enough: you need to know the risk concentrates and to fix it. repowise closes that loop.
README
Set it up in one line
Open Claude Code, Codex, Cursor or any MCP-capable agent in your repository and paste:
Read https://docs.repowise.dev/setup.md and set up Repowise in this repository.
The agent installs Repowise, indexes the repo with no API key, connects itself to the index, and asks you before anything costs money. To do it by hand:
uv tool install repowise # or: pipx install repowise / pip install repowise
cd /path/to/your/repo
repowise init --yes --no-prose # graph, git, health, dead code, docs. No key, no spend.
# (add model-written docs any time with: repowise generate)
repowise serve # dashboard + MCP server (needs Node 20+; first run downloads the UI)
Restart Claude Code or run /mcp, then ask “What breaks if I change
src/auth.py?” or “Use Repowise get_overview to summarize this repository.”
init wires Claude Code for this repo and points the global repowise MCP entry
here. Full setup for every agent →
Your agent stops guessing
Without an index, an agent rediscovers your codebase on every task: grep, open a file, open three more, grep again. Repowise answers those questions ahead of time, so the agent asks once and gets on with the work.
In a measured run on django/django, an agent with Repowise made 3.8 tool calls
instead of 7.2, opened 3.0 files instead of 7.2 and wrote 31.6% less, with
answers just as good. That is the largest saving of the five context tools we
tested. On a small local model the output cut reaches 47.9%.
How it was measured →
- Your agent gets ten task-shaped MCP tools. Ask about several files at once and get callers, risk, tests, owners and the reasons behind the code in one answer. The tool list ↓
- Up to 99% less command noise.
repowise distilltrims test, install and git output before the agent reads it and keeps every error line. Distill → - Context before the agent asks. Optional hooks warn it
off fragile files and stale paths, and Repowise keeps your
CLAUDE.mdandAGENTS.mdcurrent from the index. - See your own savings.
repowise savedand the dashboard’s Usage and savings page count the tokens your agent no longer has to read.
What it does
One index of your code, its history and its decisions, used three ways: to understand the code, to change it safely, and to keep improving it.
Hosted, and Foresight
Everything above runs free on your own machine. repowise.dev runs it for you, private repos included, and is where Foresight arrives first: models trained on years of real commits and fixes that rank the files a fix will touch, name what a change forgot, and explain every answer, with no LLM. What Foresight does →
Already indexed locally? repowise publish puts the repo on repowise.dev in one
command. It indexes your GitHub remote, so nothing is uploaded from your machine.
Public repos are free.
Know what breaks before you merge
All of this comes from the graph and git history, with no LLM, so the same diff always gets the same answer.
- Change risk. Score any commit or branch 0 to 10 against your repository’s own
recent commits, with what it may break, the companion files it forgot, the
tests it is missing and the tests to run.
repowise risk main..HEAD(reference) - Tests without a coverage run. Which tests reach a file and which ones a diff
exercises, from a coverage report when you have one and from the call graph
when you do not: 97.5% correct on which tests to run.
repowise impacted-tests main..HEAD(reference) - Bug magnets. Which files keep getting bug fixes, with a warning when your agent edits one. (reference)
- Branch overlap. Other open branches editing the same files.
repowise overlap(reference) - In CI. Patch coverage, doc drift, security and change risk as gates through the GitHub Action, a GitLab template or plain CLI, with SARIF output. No API key. Repowise in CI →
On every pull request. The free Repowise PR Bot posts one comment, edited in place on every push, with the callers outside the PR, the tests and companion files it is missing, and its change risk. A green PR gets no comment at all.
A real comment on a real PR: repowise-dev/repowise#1204 · its analysis page → · install the PR bot →
Every change, with its evidence
Each merged PR or commit becomes a Change Record: what it touched, who owns it, the tests that reach it, the contracts and decisions it crosses, and what happened after it landed. No forge API is called.
| You ask | Repowise gives you |
|---|---|
| What landed in this PR, and what backs it up? | The change’s evidence checklist, each item ok, attention or unknown, with an in-toto export. Change Records |
| Can CI hold changes to our payment code to a higher bar? | Rules in .repowise/policies.yaml, matched to components by name, tag or criticality and evaluated by repowise check, with SARIF or JUnit output. Change policy |
| Something broke. Which change do we read first? | Recent changes ranked against an error, a stack trace or an issue. On 43 real regressions, the change a later revert or fix named was in the top 5 for 67% of them, against 28% for ranking by shared files. Suspects |
| Who owns this, and are they still working on it? | Backstage-shaped components with owners from your catalog and CODEOWNERS, compared with the last 90 days of commits. Components |
| Can we show an auditor or an acquirer where we stand? | Evidence packs: a repository assessment, a change report for a period and a component inventory, as JSON, Markdown, HTML or CSV. Reports |
Know exactly what to fix
Every file gets a 1 to 10 score from 53 deterministic detectors, read three ways: defect risk, maintainability and performance. Performance findings such as N+1 queries and I/O in loops are traced across functions and files.
The score is checked against real bugs. On 21 open-source projects, ranking by Repowise found 2.3x as many later-buggy files as CodeScene in the same review budget. It also checks itself on your repository after every index: “16 of the 20 lowest-health files had a bug fix in the last 6 months, 3.3x the 24% baseline.”
Then it names the fix: Extract Method, Extract Class, Move Method, Split File or Break Cycle, with the exact symbols that move, ranked so a fix on a central file comes before the same fix on a leaf. Each plan has a copy-to-agent button.
repowise next # what to fix first, ranked by impact and effort
repowise health --refactoring-targets # concrete plans
repowise dead-code # what can go, by confidence tier
Code health · Refactoring · Dead code · How it was validated →
Across your repositories
Real systems are more than one repository, and the expensive failures live between them. Change a backend contract and Repowise names the frontend calls that consume it, the services downstream, and the architecture rule the new dependency breaks, before it ships.
| Workspace intelligence | What it answers |
|---|---|
| Contract map | Which services provide and consume each HTTP, gRPC, event, socket and data contract? Links keep their exact or candidate confidence and the source evidence. |
| Cross-repo blast radius | If this provider changes, which downstream services are in structural reach, and which may drift through historical co-change? |
| Breaking-change guard | Was an endpoint removed or an OpenAPI, proto or signature shape changed incompatibly, and which consumer files are linked to that contract? |
| Test impact | Which tests in the consumer repos should run for this provider change, measured from coverage or inferred from the call graph? |
| Architecture as code | Does the live system graph violate declared dependency rules or contain cycles? repowise workspace check gates CI. |
| Architecture health | How coupled is the estate? Propagation cost, the cyclic core, service roles and a deterministic 1-10 architecture score. |
| Federated context | One dashboard and one MCP server answer across every repository while keeping repo-level evidence. |
Workspace guide and support matrix → · Keeping the index fresh →
Measured against the field
The same repositories, commits and questions for every tool, each given its full advertised surface, against answer keys we did not write.
| Result | |
|---|---|
| Work saved in an agent loop | 3.8 tool calls instead of 7.2, 3.0 files opened instead of 7.2, 31.6% less output. The best of five context tools. n=43, p<0.0001 |
| Finding the right files | 0.876 of the files a fix needed, against 0.610 for the next tool, on a sealed set. n=42, p=0.00004 |
| Command output | Up to 99.5% smaller (npm ci), 89% for git log, 86% for git diff, no error line lost |
| Call graph the compiler agrees with | 93.8% to 99.8% precision on Go, TypeScript, Dart, C and Python, graded by each language’s own toolchain. Against four other tools, none that finds as much of the graph gets more of it right, in 7 of 7 cells |
| Health that predicts bugs | 2.3x CodeScene’s recall of later-buggy files at the same review budget. 2,770 files, p=0.003 |
| Scale | 15 million lines (dotnet/runtime) on one laptop. Building the call graph takes 75 MB, 10x less than the next tool |
Every result, in plain English, with the method → · The research it is built on →
Supported languages
28 languages parsed to an AST, 42 on a five-rung ladder, framework-aware where an ecosystem handler exists. Every language ships in the open-source distribution.
Full
Good
· Partial
Supported agents and editors
Eight agents wired end to end · two at the Full tier · every other MCP host one paste away.
Full tier
Good tier
Full is every surface Repowise has: MCP tools, skills, slash commands, a managed
instructions file, hook-level interception of tool calls, and transcript mining after
the session. Good is MCP tools plus an instructions file or skills, without transcript mining
(hooks only where the matrix says). Basic is the MCP config alone. Anything else that speaks MCP is one snippet away:
repowise agents print-config claude-code prints a server entry for Cline, Windsurf,
Zed, Gemini CLI or any host that reads mcpServers.
Integration matrix →
In VS Code, the Repowise extension shows what your change breaks before you push (riskiest files, what is downstream, forgotten companion files, missing tests, suggested reviewers), health in the gutter and status bar, callers and ownership on hover, and refactoring plans as CodeLens. One install also registers the MCP server, so the same index serves you and your agent. Install from the Marketplace or Open VSX and run Repowise: Set Up This Repository. VS Code guide →
In Claude Code, Lens ships inside the Repowise plugin and shows you what the index
knows while Claude works: the file it is on and how many files depend on it, a change
review after a turn that edits files (code health, tests to run, other branches on the
same files), and /lens, a pane with Flow (what to check before accepting each turn),
a map of the repo lit by what Claude searched, opened and edited and what its edits
reach, Ask, and a session recap. Nothing reaches Claude unless you press a button, and
Lens makes no model calls of its own. It needs Claude Code 2.1.287 or later, and the
map needs repowise serve --no-ui running. Lens guide →
The ten MCP tools
Every response carries a _meta envelope with the indexed commit, the index age and a
stale warning when the index has fallen behind your checkout, so your agent always
knows how much to trust what it just read.
For teams and enterprises
AI makes producing a change cheaper. It does not make understanding its consequences cheaper. Repowise gives developers, agents, reviewers and platform teams the same evidence about what exists, what depends on it, what is risky and what will break, from one index, in place of a separate health tool, dead-code tool, code-search layer for agents, docs generator and test-impact service.
| Deployment | Where your code is read | What leaves your network |
|---|---|---|
Self-hosted, open source (pip install repowise) |
your machine | anonymous CLI telemetry you can switch off, and your own LLM provider only if you turn prose on |
| Self-hosted, commercial | your VPC or an air-gapped network | nothing at all in air-gapped mode |
| Hosted (repowise.dev) | our managed indexer | your code goes to the platform |
Graph, git, health, change risk, tests, dead code and PR review make zero LLM calls, and raw source is never stored. Prose is optional and runs on your own provider or fully offline through Ollama.
Evidence you can hand to someone else.
| Who is asking | What Repowise produces |
|---|---|
| An auditor reviewing change management (SOC 2 CC8.1, ISO 27001 A.8.32, PCI DSS 6.5) | Every change in the period with its review record, reaching tests, policy verdict and later outcome: repowise report changes |
| A software inventory review (PCI DSS 6.3.2) | Components with owner teams, languages, entry points and the packages they import: repowise report inventory |
| A security team asking which of your code uses a package | Import sites with component, owner team and reachability, plus a CycloneDX 1.6 usage export: repowise packages where |
| An acquirer, a board or a migration committee | Component posture, hotspots, bus factor, dead code, test reach and contracts: repowise report assessment |
| An incident review | The recent changes to read first, with the signals behind each: repowise suspects |
Any git host works, because indexing reads a local checkout: GitHub (PR bot, Action, webhooks), GitLab (CI template, webhooks), Bitbucket and others through the CLI, and plain directories or Perforce and SVN exports for every layer except history.
Commercial licences come per seat, per indexed repository or enterprise-wide, with a named contact, an SLA and a quarterly architecture review. Using Repowise inside your company under the AGPL creates no obligation to publish your own code.
Commercial detail and capability status · Security review pack · Evaluating it for your company · [email protected]
Privacy
- Deterministic or offline mode: with
--no-prose, code-derived content stays on your infrastructure. The CLI reports anonymous, opt-out usage telemetry (command names and coarse environment only); turn it off withrepowise telemetry disable,DO_NOT_TRACK=1, or by running fully offline. What’s collected → - Optional LLM features: generated prose, decision extraction and refactoring code generation send code-derived prompts directly to the provider configured with your own key. Repowise does not proxy those calls.
- What’s stored: the graph, embeddings, generated wiki pages and git metadata. Raw source is processed transiently and never persisted.
- Fully offline: Ollama plus a local embedding model means zero external calls.
Doing a security review? docs/business/SECURITY_COMPLIANCE.md →
CLI
Contributing
git clone https://github.com/repowise-dev/repowise
cd repowise
uv sync --all-packages
uv run repowise --version
uv run pytest tests/unit/
New here? You do not have to read 3,000 files to start. We keep a public index of this repository built by Repowise itself, re-indexed on every push: explore repowise with repowise → (architecture, hotspots, ownership, decisions, and a ranked refactoring backlog you are welcome to pick from).
Full guide, including how to add languages and LLM providers: CONTRIBUTING.md · architecture: docs/architecture/
License
AGPL-3.0. Free for individuals, teams and companies using Repowise internally.
For commercial licensing (the enterprise security and compliance layer, SSO/SCIM, RBAC, workflow integrations, priority support and SLA, or embedding Repowise in a product without AGPL obligations), see docs/business/COMMERCIAL.md or contact [email protected].
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →