
Gives AI agents five intelligence layers over your codebase: a tree-sitter dependency graph with call resolution and PageRank centrality, git history analysis for hotspots and co-change patterns, auto-generated docs with hybrid RAG search, architectural decisions mined from eight sources, and a 25-biomarker code health score calibrated against real defect data. Exposes nine MCP tools for querying graph structure, ownership, health alerts, and refactoring targets. The health layer runs deterministically in under 30 seconds with no LLM calls and benchmarks show 2.3x better defect detection than commercial alternatives. Built for multi-repo workspaces across 15 languages. You'd use this when your agent needs to understand why code exists and how files relate, not just what they contain. Replaces the exploration phase most agents burn tokens on with indexed context that updates on every commit.
claude mcp add repowise -- uvx repowise mcp '<repo_path>' --transport stdioRun in your terminal. Replace YOUR_* placeholders with real values; add --scope user to install for every project.
Review the command, arguments, and environment values before installing — MCP servers run with your local permissions.
Verified live against the running server on Jun 11, 2026.
get_answerSynthesised answer to a code question with verified citations and a calibrated trust signal. The only tool that pairs RAG retrieval over the wiki with an LLM-written answer plus a separately-reported retrieval_quality. Use it as the first call on "how does X work" / "where is...3 paramsSynthesised answer to a code question with verified citations and a calibrated trust signal. The only tool that pairs RAG retrieval over the wiki with an LLM-written answer plus a separately-reported retrieval_quality. Use it as the first call on "how does X work" / "where is...
question*stringrepovaluescopevalueget_contextTriage card for files / modules / symbols — relationships, not source bytes. Returns a compact card the agent can use to decide its next move: title, summary, signatures, hotspot bit, top callers, and pointers (decision_record titles, symbol_ids) into the deeper tools. For the...4 paramsTriage card for files / modules / symbols — relationships, not source bytes. Returns a compact card the agent can use to decide its next move: title, summary, signatures, hotspot bit, top callers, and pointers (decision_record titles, symbol_ids) into the deeper tools. For the...
compactbooleanincludevaluerepovaluetargets*arrayget_dead_codeUnused exports, unreachable files, zombie packages — what grep cannot tell you. Static reachability analysis the agent cannot derive from imports alone. Returns findings tiered by confidence (high = zero refs; medium = likely unused; low = check first) with per-directory and p...13 paramsUnused exports, unreachable files, zombie packages — what grep cannot tell you. Static reachability analysis the agent cannot derive from imports alone. Returns findings tiered by confidence (high = zero refs; medium = likely unused; low = check first) with per-directory and p...
directoryvaluegroup_byvalueinclude_internalsbooleaninclude_zombie_packagesbooleankindvaluelimitintegermin_confidencenumberno_unreachablebooleanno_unused_exportsbooleanownervaluerepovaluesafe_onlybooleantiervalueget_healthCode-health biomarkers and per-file scores. Dashboard mode (no ``targets``) returns repo-level KPIs + the lowest-scoring files. Targeted mode returns per-file findings and metrics for each path in ``targets``. Biomarkers in v1: ``brain_method``, ``nested_complexity``, ``comple...4 paramsCode-health biomarkers and per-file scores. Dashboard mode (no ``targets``) returns repo-level KPIs + the lowest-scoring files. Targeted mode returns per-file findings and metrics for each path in ``targets``. Biomarkers in v1: ``brain_method``, ``nested_complexity``, ``comple...
includevaluelimitintegerrepovaluetargetsvalueget_overviewArchitecture map for an unfamiliar repo — first call when you don't know your way around. Returns the synthesised overview plus key modules, entry points, repo-wide git health (hotspot count, churn trend, bus-factor distribution), the knowledge map (top owners, knowledge silos...1 paramsArchitecture map for an unfamiliar repo — first call when you don't know your way around. Returns the synthesised overview plus key modules, entry points, repo-wide git health (hotspot count, churn trend, bus-factor distribution), the knowledge map (top owners, knowledge silos...
repovalueget_riskWhat history says about touching these files — hotspot, churn, owners, blast radius. The only tool that fuses git temporal signals (churn percentile, trend, bus factor) with graph topology (dependents, co-changes, impact surface) and security findings into one decision-shaped...3 paramsWhat history says about touching these files — hotspot, churn, owners, blast radius. The only tool that fuses git temporal signals (churn percentile, trend, bus factor) with graph topology (dependents, co-changes, impact surface) and security findings into one decision-shaped...
changed_filesvaluerepovaluetargets*arraysearch_codebaseFind pages by concept — semantic search across the wiki. The right tool when ``get_answer`` punted and you need candidate files for a conceptual query ("authentication flow", "rate limiting", "where do we handle webhooks"). For exact identifiers or token matches, use Grep — it...5 paramsFind pages by concept — semantic search across the wiki. The right tool when ``get_answer`` punted and you need candidate files for a conceptual query ("authentication flow", "rate limiting", "where do we handle webhooks"). For exact identifiers or token matches, use Grep — it...
kindvaluelimitintegerpage_typevaluequery*stringrepovalueget_symbolRead one function/class with exact line bounds — cheaper and safer than Read+math. The only tool that returns the raw source bytes of a single indexed symbol without the agent having to compute offsets or guess at file structure. Bounded to ~400 lines (hard cap) so a misconfig...4 paramsRead one function/class with exact line bounds — cheaper and safer than Read+math. The only tool that returns the raw source bytes of a single indexed symbol without the agent having to compute offsets or guess at file structure. Bounded to ~400 lines (hard cap) so a misconfig...
context_linesintegerqueryvaluerepovaluesymbol_id*stringget_whyWhy this code looks the way it does — decision archaeology git log cannot answer. The only tool that surfaces architectural decision records, their status (active / proposed / deprecated / superseded), and the commits that are evidence for them. ``git log`` tells you *what* ch...3 paramsWhy this code looks the way it does — decision archaeology git log cannot answer. The only tool that surfaces architectural decision records, their status (active / proposed / deprecated / superseded), and the commits that are evidence for them. ``git log`` tells you *what* ch...
queryvaluerepovaluetargetsvalueRepowise indexes your code, dependency graph, git history, tests,
documentation, and decisions once, then gives agents and developers cited answers,
change impact, and concrete code-health fixes.
−31.6% |
97.2% |
2.3× |
| less agent output 3.8 vs 7.2 tool calls n=43 · p<0.0001 |
smaller context payload 393 vs 13,984 tokens 30 Flask commits |
more defects surfaced same 20%-of-lines budget 2,770 files · p=0.003 |
Graph accuracy leader at matched coverage.
No tool finding as much was more precise in all 7 compiler-graded cells.
5 tools · 37,853 oracle edges
Zero LLM calls for graph, risk, health, tests, dead code, and PR review. Generated prose is optional. Every benchmark publishes its sample, method, limitations, and losing rows.
Free and self-hosted · core analysis stays on your infrastructure · no API key needed · AGPL-3.0 or commercial
Why Repowise · Agents · Changes · Code health · Workspaces · Evidence · Enterprise · Docs
| Understand the code | Change it safely | Improve it continuously |
|---|---|---|
| Ask cited questions · explore architecture and execution flows · read always-current docs · recover the decisions behind the code | See symbol-level blast radius · run only the tests a diff exercises · catch missing companion files · detect breaking contracts before merge | Find defect-prone files · separate maintainability from performance risk · remove dead code · hand concrete, graph-aware refactoring plans to an agent |
These are not disconnected scanners. The graph locates what git history flags; code health measures it; tests show what guards it; decisions explain why it exists; and the same evidence reaches your agent, editor, pull request, local dashboard, and cross-repository system map.
A dashboard tour recorded on this repository. The same local index powers the UI, MCP tools, editor views, and PR analysis. No API key and nothing uploaded.
| If you care about… | Start here |
|---|---|
| A coding agent that understands the repository | Repowise finds the right files, returns task-shaped context in fewer calls, and proactively supplies decisions and risk. For agents ↓ |
| Safer pull requests and faster test feedback | Get change risk, symbol-level callers, co-change partners, and a measured or graph-inferred test run list before merge. Change intelligence ↓ |
| Finding and fixing the code most likely to hurt you | A defect-validated 1–10 health score across defect risk, maintainability, and performance, followed by the concrete refactoring plan. Code health ↓ |
| Understanding an estate, not one repository | Match backend and frontend contracts, catch breaking providers, map downstream services, enforce architecture rules, and query every repo through one MCP endpoint. Workspaces ↓ |
| Rolling this out across an engineering organization | Keep analysis on your infrastructure, give agents and reviewers the same evidence, and add commercial licensing, security controls, custom extensions, and SLA-backed support. Teams and enterprise ↓ |
pip install repowise
cd /path/to/your/repo
repowise init --no-prose -y
repowise serve
That builds the graph, git, decisions, health, dead-code and structural-wiki layers
locally. Connect Claude Code, Codex, Cursor or any MCP host, or open the dashboard.
init wires Claude Code automatically. Then ask your agent: "Use Repowise
get_overview to summarize this repository" or "What breaks if I change
src/auth.py?"
Full setup, every agent, and optional model-written prose →
Every question your agent asks about a repository has an answer that could have been computed ahead of time. Who calls this function? What breaks if I change it? Why is it written this way? Which files are actually dangerous? Without an index, the agent rediscovers that answer on every task: grep, read, re-read, forget.
Repowise exposes ten task-shaped MCP tools to Claude Code, Codex, Cursor, VS Code and anything else that speaks MCP: graph, git, docs, decisions, and ten MCP tools behind one index. See the canonical surface. Most tools are built around data entities (one file, one symbol), which forces agents into long chains of sequential calls. These are built around tasks: pass several targets in one call, get complete context back.
Because the exploration work is already done, that phase mostly disappears. In a
measured agent loop across 43 questions on django/django, Repowise cut the agent's
own output by 31.6% (p<0.0001) and reached the answer in 3.8 tool calls
instead of 7.2. That is the end-to-end result.
One mechanism is much larger but narrower: loading a commit's context through
get_context costs 393 tokens instead of 13,984, or 97.2% less. That is one
retrieval payload, not a claim of 97.2% total agent savings. Both measurements and
every competitor row are published in the benchmark report.
And it arrives without being asked. Optional hooks push
context into the session at the moment it matters: the governing architectural
decision when your agent edits a file that decision covers, a warning when it touches
a file with a run of recent bug fixes, a compact briefing at session start. Repowise
also generates your CLAUDE.md and AGENTS.md from the real index, so even an agent
with no MCP support starts informed.
It learns from how you actually work. Switch on transcript capture
(repowise decision source set session --on) and Repowise reads your own agent
transcripts for the corrections you keep making ("use the shared HTTP client,
not raw requests"), turning the durable ones into tracked decisions it delivers
back later. Transcripts never leave your machine; one batched model call per
update turns the candidates that clear the deterministic gates into records, and
--no-llm keeps the gates and drops that call. The wiki generation budget tilts
toward the modules you and your agent ask about most, with no switch needed.
| Foundation | What it contributes |
|---|---|
| Graph | File + symbol dependencies across 26 AST-parsed languages, confidence-stamped call resolution, communities, centrality, cycles, and execution flows |
| Git | Hotspots, ownership, co-change, bus factor, and bug-fix history: behavioral signals static analysis cannot see |
| Docs | A wiki for every module and file, rebuilt incrementally with freshness and confidence scoring plus hybrid search |
| Decisions | Architectural rationale mined from five index-time sources plus human and agent capture, each claim traced to evidence |
| Code health | 49 deterministic detectors across defect risk, maintainability, and performance, followed by concrete refactoring plans |
The structural wiki needs no model. Model-written prose is an optional upgrade, one page or directory at a time. Six of the seven decision sources are deterministic too; only comment archaeology needs a provider.
Most of what an agent reads back from a shell command is noise: 300 lines of passing
tests wrapped around 4 failures, full commit bodies when it asked "what changed
recently". repowise distill <cmd> compresses command output before the agent reads
it, errors first, exit code preserved.
repowise distill pytest # 61% fewer tokens, all 11 failure lines kept
repowise distill git log -50 # 89% fewer tokens
repowise saved # what distillation saved you, in tokens and dollars
Nothing is lost. Every omission leaves an inline [repowise#<ref>] marker that
repowise expand <ref> reverses in full, so the agent can always pull the detail back
without re-running the command. Small outputs pass through untouched. An opt-in hook
rewrites noisy commands automatically, shown to you for approval first.
The Costs dashboard tallies both savings surfaces, priced at your own agent's model. Example from a week of heavy local use.
Full guide: docs/agent/DISTILL.md →
Four deterministic signals, all computed from the graph and git history, no LLM:
base..HEAD range 0-10 from the shape of
the diff, ranked against your repo's own recent commits. PR mode returns directives
rather than vibes: may_break, missing_cochanges, missing_tests, tests_to_run.
One command: repowise risk main..HEAD. (reference →)same file, or a co-change pair with the commit
counts behind it), and whether the diff in front of you is one change or several
groups the index links nothing between. Both stay quiet when there is nothing to
report. repowise overlap and repowise risk.
(reference →)Plus the free Repowise PR Bot, which puts all of it on every pull request. Zero LLM calls.
Ingest LCOV, Cobertura or Clover and you get the measured answer. Most repositories never produce one, so the graph answers instead: a test file that imports a source file reaches it, which is a recorded edge rather than the name-shaped guess everything else falls back to.
That fallback fails in both directions, and this repo is the proof. Five of its six worst bug-magnet files have no test named for them and read as untested while the graph names 3 to 23 test files each. The sixth is worse: matching on basename paired the health engine with the distill engine's tests and called it tested.
repowise impacted-tests main..HEAD # only the tests this diff actually exercises
repowise health # untested hotspots, now graph-aware
Dogfooded against a real coverage run --contexts=test:
95.7% precision on what reaches a file and 97.5% on the
run list, at a 100% hit rate, against 72.1% and 94.8% for the one-hop
import walk this replaced. The two tiers are never averaged: rows are stamped
basis: "measured" or "inferred", measured wins outright
where both can answer, and the inferred tier may never produce a percentage.
Sound as a floor, unsound as a quantity, and labelled so.
Test intelligence →
Install the GitHub App and the index shows up where the decision actually gets made. One comment per pull request, edited in place on every push rather than reposted, and a green PR gets no comment at all.
See a real comment on a real PR, not a mockup: repowise-dev/repowise#1204.
What decides a review is inline. What is context sits behind one fold, so the comment stays about seventeen rows whatever it finds.
Markdown runs out. The comment shows three callers and says "+6 more"; the page shows all nine. Public, no sign-in, on a repository the reader has never seen.
The page leads with change risk and newly introduced findings, then maps every changed file and outside caller across the repository. See it live →
Install the PR bot → · how it works →
A score that says "this file is risky" is where most tools stop. Repowise scores every file, locates where the risk concentrates, and then names the specific fix.
Every file is scored 1-10 by 49 deterministic detectors (McCabe complexity, brain methods, LCOM4 cohesion, god classes, native Rabin-Karp clone detection, untested hotspots, change entropy, prior-defect history and more), split into three lenses: defect risk, maintainability, and performance: static N+1 and I/O-in-loop risk traced across files through the call graph, where file-local linters found 0 of the cross-function cases and repowise surfaced ~90. Only 26 of the 49 are permitted to move the defect number, because that is the number carrying published accuracy claims.
Zero LLM calls, zero cloud, zero new runtime dependencies. Pure Python over tree-sitter and git data, under 30 seconds on a 3,000-file repo, a budget enforced by a CI test, not an estimate. Marker weights are calibrated against a real defect corpus, not hand-tuned: every file scored at a commit preceding the bug window so nothing leaks backward, and an L2-logistic fit with file size as an explicit control, so a marker only earns weight for defect lift beyond being big. Only the learned constants ship.
It proves itself on your repo, not just on a benchmark. After every index, Repowise checks its own flags against your git history and reports what it found: "16 of the 20 lowest-health files had a bug fix in the last 6 months, 3.3x the 24% baseline." If that number is bad on your codebase, you will see it. (It is an association on your indexed history, not a forward prediction, the leakage-free version is in the benchmarks.)
Then it names the fix. Not "this class is too big", but Extract Class, Extract Helper, Move Method, Break Cycle, Split File, or Extract Method, with the exact methods, edges and symbols that move, the blast radius of callers and co-changing files that have to move with them, and a graph-aware ranking so a fix on a central hub outranks the same fix on a leaf. Extract Method goes down to an intra-procedural dataflow pass that lifts the exact span and infers a behavior-preserving signature.
repowise health # KPIs and lowest-scoring files
repowise health --refactoring-targets # ranked, concrete plans
repowise health --trend # snapshots plus declining-health alerts
The dashboard renders each plan as a card with a copy-to-agent button. An optional LLM step, never in the indexing path and only on request, expands any plan into generated code and a unified diff.
Validated on 21 open-source repos across 9 languages (2,826 files, scored at a fixed point and checked against the following 6 months of bug fixes, keyword-labelled): ROC AUC 0.737 [0.683, 0.787]. The signal is correlated with file size and weakens sharply within a fixed size band, which we report rather than bury. Independently recomputed from the raw data.
Against CodeScene, the leading commercial code-health tool, on the same 2,770 files and the same defect labels, ranking by repowise health surfaces 2.3x the defects under a fixed review budget (paired, p = 0.003). Full head-to-head, methodology and limitations →
Guides: code health · refactoring
repowise serve starts the full web dashboard next to the MCP server. No separate
setup, all local.
![]() Architecture · the dependency graph, laid out and explorable, with per-node context and change coupling |
![]() Code Health · every file as a bubble, hover any one to inspect its score, size, coverage and findings |
![]() Chat · ask the codebase a question, answers cite the files and pages they came from |
![]() Docs · auto-generated wiki pages for the whole codebase, with confidence and freshness badges |
Also in there: Chat (ask the codebase in natural language) · Docs (the generated wiki, with Mermaid and a graph sidebar) · Architecture and C4 (Context → Containers → Components) · Knowledge Graph plus a zoomable canvas map · Risk, Hotspots, Coupling and Blast radius · Contributors · Decisions (evidence drawer and evolution timeline) · Symbols · Security · Dead code · Stats · Costs · Workspace.
Every view and what each one answers: docs/start/DASHBOARD.md →
Real systems are not one repository, and the expensive failures live in the gaps between them. Change a backend contract and Repowise can name the frontend calls that consume it, the services downstream, the historical companion files missing from the change, and the architecture rule the new dependency violates before it ships.
| Workspace intelligence | What it answers |
|---|---|
| Contract map | Which services provide and consume each HTTP, gRPC, event, socket, and data contract? Links retain exact/candidate confidence and the source evidence. |
| Cross-repo blast radius | If this provider changes, which downstream services are in structural reach, and which ones may drift through historical co-change? |
| Breaking-change guard | Was an endpoint removed or a supported OpenAPI / proto / 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, and which links could not be determined? |
| 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? Track 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 preserving repo-level evidence. |
The system map models services, not merely repository boxes, and never conflates a real contract with “these files often changed together.” HTTP field-level comparison supports the bounded OpenAPI 3.x JSON subset documented in the workspace guide; matched consumers prove endpoint exposure, not field use or runtime failure.
Workspace guide and exact support matrix →
Worktrees and updates stay lightweight: a linked worktree seeds its index from the base checkout automatically, and post-commit hooks, file watching, webhooks, or polling keep each repository and the cross-repo graph current.
The Repowise VS Code extension puts the index where code actually gets written: know what your change breaks before you push (riskiest files ranked, what is downstream, forgotten companion files, missing tests, suggested reviewers), health in the gutter and status bar, callers and ownership on hover, refactoring plans as CodeLens, and the full dashboards inside the editor. One install also registers the MCP server with VS Code, so the same local index serves both you and your agent, and exposes six tools to GitHub Copilot. Quiet by default, everything toggleable, nothing leaves your machine.
Install from the Marketplace (search Repowise) or Open VSX, then run Repowise: Set Up This Repository. Guide: docs/agent/VSCODE.md →
Six 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 the honest half of that: MCP tools and the config to reach them, but no hook-level interception and no transcript mining. A Good-tier agent can ask repowise anything; repowise never sees the tool calls in between. The tier is computed from what each integration actually wires, so this list cannot claim a depth the code does not have.
Everything else that speaks MCP is one snippet away. repowise agents print-config claude-code prints a stdio server entry to paste into Cline, Windsurf, Zed, Gemini
CLI or any other host that keys on mcpServers, and repowise writes nothing.
Adding an agent takes one descriptor file and one registry line, with no changes to the orchestrators. Full matrix and the contributor recipe: docs/agent/INTEGRATIONS.md →
26 languages parsed to AST · 40 on a five-rung ladder · framework-aware where an ecosystem handler exists.
"Do you support X" has five useful answers, not two, so languages land on a ladder and every rung says what it buys you.
Full tier
Good tier
· Partial
Below those two rungs the ladder keeps going, and a language on a lower rung is still doing real work rather than being ignored:
| Rung | Languages | What you get |
|---|---|---|
| Full (13) | Python · TypeScript · JavaScript · Svelte · Vue · Java · Kotlin · Go · Rust · C++ · C# · Scala · Ruby | The whole pipeline: AST symbols, import resolution, a resolved call graph, heritage, docstrings, framework edges, and code-health markers |
| Good (11) | C · Swift · PHP · Dart · Object Pascal · COBOL · GDScript · VB.NET · Elixir · F# · Objective-C | All of the above except the full health suite, subject to the language-specific ceilings in the full matrix |
| Partial (2) | Luau / Roblox · Razor / Blazor | Luau: AST symbols and require() resolution, Rojo and .luaurc aware. Razor: component symbols, @code and component-tag call edges, C# health markers; no import resolution yet |
| ⎯⎯ tree-sitter parsing stops here; the rungs below come from git and imports ⎯⎯ | ||
| Lightweight (6) | Clojure · Haskell · Lean 4 · Erlang · HTML · QML | A real file-to-file import graph, and no symbol-level claims |
| Structural (8) | R · Zig · Julia · Elm · OCaml · Crystal · Nim · D | Git history: blame, hotspots, co-change, ownership, bug history |
Every language ships in the open-source distribution. None is gated behind the commercial licence, and none will be. COBOL now ships at the Good tier; languages still moving up the ladder are tracked on the roadmap →.
SQL and dbt projects get real ref() / source() lineage, shell scripts get
function-level symbols, HTML pages contribute their <script src> / <link href>
dependencies (including index.html → src/main.ts), and OpenAPI, Protobuf,
GraphQL, Dockerfile, Terraform and friends get dedicated handlers. Anything else is
still tracked through git history: blame, hotspots, co-change.
Every call edge is stamped with how it was resolved and how much to trust it, from
same_file at 0.95 down to a repo-wide name match at 0.50, labelled as the guess it is
(how that works).
Adding a language takes five small steps and no changes to the parser core.
Full matrix: docs/layers/LANGUAGE_SUPPORT.md → · The graph itself: docs/layers/GRAPH.md → · Contributor recipe and internals: docs/architecture/language-support.md →
1. Install
pip install repowise # Windows: python -m pip install repowise
repowise --version
2. Index your repo
cd /path/to/your/repo
repowise init
Bare init asks. It scans the repo first, then offers three ways to index it:
everything (the wiki written by a model), no prose (the same wiki rendered from
your code's structure, no key and no spend), or advanced, which walks through the
indexing and generation knobs. Nothing is spent before you see an estimate and
confirm it.
If you would rather not answer questions, or you are scripting this, name the
mode and add -y:
repowise init --no-prose -y # free, no key, no questions
repowise init --prose -y # model-written subsystem pages, cost pre-approved
Either way you get the dependency graph, git history, code-health scores and dead-code findings in seconds, plus a complete wiki: file, module, layer and cycle pages, the architecture diagram, the repo overview, API and infra pages, and the onboarding collection. On the keyless path every page carries a footer saying it was derived from structure, and the repo overview describes composition, entry points, clusters and dependencies rather than what the project does end to end, because no template can derive that. Full-text search works on this index; semantic search needs an embedder configured (Ollama is the keyless option).
Went keyless and want the wiki written by a model later? You do not have to decide
now. Upgrade it whenever you like with repowise generate, a page, a directory,
or the whole thing at a time, each behind a cost estimate:
export ANTHROPIC_API_KEY="sk-ant-..." # or OPENAI_API_KEY / GEMINI_API_KEY
repowise generate # write the unwritten subsystem pages, behind one cost estimate
repowise generate --path src/api # or just one area first
repowise generate --all # or rewrite the prose on every subsystem page
Bare repowise generate prints the wiki's state and writes the unwritten
subsystem (concept) pages behind a single cost estimate. Every other page was
already rendered from structure at index time.
Or pick the provider for the first index directly with repowise init --provider gemini|anthropic|openai.
Resuming an interrupted index. If init is interrupted (timeout, crash,
Ctrl+C), re-run it with --resume and it continues from where it stopped —
pages already written to the vector store are skipped, and only the missing
ones are generated:
repowise init . --resume
--resume is a safe no-op on a fully indexed repo, so it is the right thing to
reach for whenever a long run is cut short. It works because pages are written
to LanceDB incrementally, while the SQL generation_jobs row only finalizes at
the end — a hard interrupt can leave LanceDB ahead of SQL, and --resume is
the supported recovery path (repowise doctor flags the drift).
3. Connect your agent. Step 2 already did this for Claude Code: init
writes a repo-root .mcp.json unconditionally and, unless you passed
--no-editor-setup, also registers repowise with ~/.claude/settings.json.
Open a session in this repo and it is already wired; check with repowise agents.
Skipped editor setup, or setting up another machine?
repowise agents add --target=claude-code
The plugin additionally adds slash commands and skills, which init does not
install:
/plugin marketplace add repowise-dev/repowise
/plugin install repowise@repowise
Or wire the MCP server by hand:
claude mcp add repowise -- repowise mcp
Or edit the project .mcp.json init already wrote:
{ "mcpServers": { "repowise": { "command": "repowise", "args": ["mcp"] } } }
Add to ~/.codex/config.toml:
[mcp_servers.repowise]
command = "repowise"
args = ["mcp"]
Or: codex mcp add repowise -- repowise mcp
4. First real call. Ask your agent: "Use repowise get_overview to summarize this
repo", or "get_context for src/auth.py". You get graph-grounded architecture and
per-file triage instead of a flurry of greps.
get_overviewandget_contextwork in index-only mode with no key, synthesized from the graph, git and health layers.search_codebaseandget_answerread the wiki, which index-only mode does build, but they answer from pages rendered from structure rather than model-written prose, andsearch_codebaseis full-text only until you configure an embedder.
Full walkthrough: docs/start/QUICKSTART.md →
Every response carries an _meta envelope with index_age_days, indexed_commit, and
a stale_warning that fires only when the indexed HEAD diverges from live .git/HEAD,
so your agent always knows how much to trust what it just read.
| Tool | What only this tool answers |
|---|---|
get_overview() | Architecture summary, module map, entry points, git health. The first call on any unfamiliar codebase. |
get_answer(question) | Hybrid retrieval (full-text plus vector via RRF), PageRank bias and 1-hop graph expansion into one cited answer with a calibrated retrieval_quality. Collapses search → read → reason into a single round-trip. |
get_context(targets, include?) | Triage card for files, modules or symbols: summary, signatures, hotspot bit, governing decisions, symbol_ids. include opens callers, callees, ownership and metrics. Batch many targets in one call. |
get_symbol("file.py::Name") | Source for one indexed symbol with exact line bounds. Cheaper and safer than Read plus offset math. |
search_codebase(query, kind?) | Semantic search over the wiki, filterable by kind (implementation / test / config / doc), tagging each result's search_method. |
get_risk(targets, changed_files?) | Hotspots, dependents, co-change partners, ownership, test gaps, bug history. Pass changed_files for PR mode and get a directive block back. |
get_change_risk(revspec) | What a commit, range or uncommitted change newly made worse across defect, maintainability and performance, why each finding is attributable to it, the tests coverage proves it touches, and how the diff's shape ranks against recent commits. |
get_why(query?, targets?) | Architectural decisions and their verbatim evidence spans, stamped exact / fuzzy / unverified. Falls back to git archaeology when no decisions exist. |
get_dead_code(...) | Unreachable code by confidence tier with cleanup-impact estimates, and cross-repo consumer detection in workspace mode. |
get_health(targets?, include?) | Per-file marker scores across all three signals. include opens coverage, trends, per-file signals, the accuracy self-check, and structured refactoring plans. |
Ten is a deliberate ceiling rather than a limit we ran into: a small, task-shaped surface is easier for an agent to choose from than a large one. Worked example ("add rate limiting to all API endpoints" in 5 calls instead of ~30 greps and reads), the opt-in tools, and the full reference: docs/agent/MCP_TOOLS.md →
Six open-source agent-context tools, the same repositories, the same pinned commits, the same questions, each one given its own full advertised tool surface. The full page carries the rows we lose beside the rows we win.
Token reduction needs a denominator. If the comparison is one context payload, Repowise reduces 13,984 naive-read tokens to 393, a 97.2% reduction. If the comparison is the agent's complete output across a real task loop, the reduction is 31.6%. Competitor pages often publish the first kind as "token savings"; we publish both and call only the second one agent savings.
The same rule applies to graphs: coverage without correctness rewards fake edges, while precision without recall rewards drawing almost nothing. Our compiler-graded claim is therefore the pair: in all seven comparisons, no tool that recovers as much of the call graph gets more of it right.
The full results, the methodology, and the rows we lose →
No single product competes with all of this, so there is no single table. Three axes, three sets of real peers. Rows marked measured are head-to-head numbers, and they link to docs/BENCHMARKS.md where the sample sizes, the tests and the rows we lose all live.
Against the tools doing the same job: index a repository, serve it to a coding agent over MCP.
| repowise | CodeGraph | Serena | DeepWiki | |
|---|---|---|---|---|
| Self-hostable, open source | ✅ AGPL-3.0 | ✅ | ✅ | ❌ cloud only |
| Private repo, no cloud | ✅ | ✅ | ✅ | ❌ OSS forks only |
| MCP tools served | 10 core + workspace tools | 1 | 29 | 3 |
| Finds the gold files (measured, n=42 sealed) | ✅ 0.876 | 0.610 | not in this run | not measured |
| Output tokens vs a bare agent (measured, n=43) | ✅ -31.6% | -24.4% | -14.8% | not measured |
| Memory to build the graph (measured, 5 tools, 35 repos) | ✅ 75 MB, lowest on 35 of 35 | 757 MB | not measured | n/a, cloud |
| Time to build the graph (measured, same run) | 2.77s, fastest on 14 of 35 | 3.65s, fastest on 16 | not measured | n/a, cloud |
| Time to build the full index, django (measured) | ⚠️ 366.8s, slowest here | ✅ 16.4s | not measured | n/a, cloud |
| five layers against their one; one-time, updates after it are incremental | ||||
| Call-edge precision (measured, 540 rows hand-graded from source) | ✅ 84.8% | 57.0% | not measured | not measured |
| Call-edge precision, judged by a compiler (measured, 5 tools, 7 cells, 37,853 edges) | ✅ nothing that finds as much gets more of it right, 7 of 7 | lower precision in 7, and lower recall in 5 | not measured | not measured |
| Generated documentation | ✅ | ❌ | ❌ | ✅ |
| Proactive agent hooks | ✅ Claude + Codex | ❌ | ❌ | ❌ |
Auto-generated AI instructions (CLAUDE.md, AGENTS.md) | ✅ | ❌ | ❌ | ❌ |
| Command-output distillation | ✅ reversible | ❌ | ❌ | ❌ |
| Learns from your usage (session-mined decisions, demand-weighted docs) | ✅ | ❌ | ❌ | ❌ |
| Architectural decision records | ✅ | ❌ | ❌ | ❌ |
| Multi-repo workspace intelligence | ✅ contracts, co-change, federated MCP | ❌ | ❌ | ❌ |
The two cost rows answer different questions. Building the call graph, we are
the lightest tool measured, about ten times lighter than the next, and roughly as
fast as the fastest. Building the whole index, CodeGraph is 22x faster than we
are, because by then we have also built the git-history layer, the wiki, the
decisions and the health pass. If a call graph is all you need, that is the right
trade and you should take it. With prose generation on, which is what a default
repowise init costs, it is 135x. Graphify and
code-review-graph were in the same measured field and are on the benchmarks page.
The precision row cuts the other way and is worth stating as plainly: of the call
edges we draw, about fifteen percent are wrong, and on seastar CodeGraph
grades better than we do. Nine languages were read on both sides, four separate,
five are statistical ties.
The compiler row exists because we graded the hand-read one ourselves. On Go and
TypeScript the answer key is the Go team's own RTA call graph and the tsc
checker's own resolution, which we neither wrote nor can tune.
Read that row carefully, because it is a claim about two numbers. Precision alone is easy to win by drawing almost nothing, and two of the five tools score above us that way, one of them at 0.997 from a graph holding 17% of the calls in the repository. Recall alone is easy to win by drawing everything, and the tool that leads it emits, on the largest repository measured, more than a third of its edges as calls that do not exist. What we claim is the pair: in all seven cells, no tool that recovers as much of the call graph as we do gets more of it right. The column we lose is still there and is still ours to lose: the tool with the highest recall in every Go cell is not us.
Measured against CodeGraph 1.5.0, Graphify 0.9.31, Serena 1.6.2.dev0,
code-review-graph 2.3.7, on repowise 081a59fa (between v0.37.0 and v0.38.0),
August 2026. Unmarked rows are capability presence, not measurements.
| repowise | CodeScene | |
|---|---|---|
| Self-hostable, open source | ✅ AGPL-3.0 | ⚠️ on-prem Docker, proprietary |
| Code health score (1-10) | ✅ 49 detectors, 26 scoring | ✅ 25-30 |
| Brain Method / LCOM4 / god class | ✅ | ✅ |
| Defects found at a 20% review budget (measured, 2,770 files) | ✅ 0.173 | 0.074 |
| Effort-aware ranking, Popt (measured, p=0.003) | ✅ 0.607 | 0.462 |
| Precision at that budget (measured) | 0.580 | ✅ 0.636, a shorter list |
| Discrimination, ROC AUC (measured, paired) | 0.731 | 0.705, p=0.054, not significant |
| Defect-prediction AUC, published and reproducible | ✅ 0.737 over 21 repos, held-out 0.76-0.78 | ✅ Code Red study |
| Business impact (resolution time) | ❌ we could not replicate this on open data | ✅ Code Red study |
| Git intelligence (hotspots, ownership, co-change) | ✅ | ✅ |
| Pre-merge change-risk scoring | ✅ 0-10 + directives | ✅ |
| Health trend + declining alerts | ✅ rolling snapshots | ✅ |
| Bus factor analysis | ✅ | ✅ |
| Concrete cross-file refactoring plans | ✅ graph-aware + blast radius | ⚠️ within-function only |
| Dataflow-verified within-function plans | ✅ CFG + reaching definitions | ⚠️ LLM-generated, unverified |
| Test-coverage intelligence | ✅ LCOV/Cobertura/Clover | ❌ |
| Untested-hotspot detection | ✅ coverage × hotspot | ❌ |
| Dead code detection | ✅ | ❌ |
| Serves it to an AI agent over MCP | ✅ | ✅ |
| Local dashboard | ✅ | ✅ |
CodeScene is the only other vendor in this category with a published empirical defect study, which is why it is the one we ran head to head against. It flags about 27 files where we flag 132, so if you want a short list to action rather than the ranking that catches the most defects, its threshold is the better fit.
DeepWiki, Google Code Wiki and Swimm generate documentation from a repository, which overlaps one of our five layers. We have not measured against them, so there is no table here rather than a table of checkmarks. DeepWiki appears above because it also serves an agent over MCP, which is a job we can be measured on.
| Repowise PR Bot | CodeRabbit | Greptile | |
|---|---|---|---|
| LLM calls per PR | ✅ zero | ❌ every review | ❌ every review |
| Same diff, same review | ✅ deterministic | ❌ sampled output | ❌ sampled output |
| Your code sent to a model provider | ✅ never | ❌ yes | ❌ yes |
| Symbol-level blast radius (changed contracts → their callers) | ✅ call graph | ❌ | ⚠️ prose, from context |
| Co-change partners missing from the PR | ✅ git history | ❌ | ❌ |
| Change risk vs the repo's own distribution | ✅ 0-10 + percentile | ❌ | ❌ |
| Public analysis page per PR, no sign-in | ✅ | ❌ | ❌ |
| Silent on a clean PR | ✅ by default | ⚠️ configurable | ⚠️ configurable |
| Cost on public repos | ✅ free, uncapped | ⚠️ free tier | ⚠️ free tier |
| Self-hostable | ✅ AGPL-3.0 | ❌ | ❌ |
The axis where this is not close is the first two rows. An LLM reviewer is a different product with a different failure mode: it can read intent, and it can also be wrong in a new way on every run. This one does set arithmetic over a call graph and a git history, so there is nothing to hallucinate and nothing to prompt-inject, and pushing the same diff twice produces the same review twice.
Repowise is the intersection: an agent-native context layer and behavioral git intelligence and a defect-validated health score with the fix attached, all out of one index, self-hostable and open source. Full side-by-side comparisons: repowise.dev/compare →
AI makes producing a change cheaper; it does not make understanding its consequences cheaper. In a large estate, the answer crosses repositories, ownership boundaries, service contracts, test suites, and years of architectural history. 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.
That is the engineering reason to deploy it. The security reason is structural: graph, git, health, change risk, tests, dead code, and PR review make zero LLM calls. Documentation prose is optional and can use your provider contract or run fully offline through Ollama.
| Status | Enterprise capability |
|---|---|
| Shipping now | Five deterministic intelligence layers, ten MCP tools, multi-repo workspaces, contract extraction and blast radius, test intelligence, architecture conformance, local dashboard, auto-sync, and full-history secret scanning. |
| GA commercially | Hosted graph-aware security, CVE prioritization, CycloneDX SBOM and VEX, PCI-DSS and SOC 2 evidence reports, audit exports and webhook stream, Jira and Confluence, customer-infrastructure HA topology, custom extensions, SLA support, and IP indemnification. |
| Rolling out | GitHub Enterprise, Azure DevOps, GitLab and Bitbucket integrations; SAML/OIDC SSO and SCIM; engineering-leader dashboards. |
| Planned | RBAC and multi-tenancy, packaged air-gap install bundle, and the Helm chart. |
Self-host with pip install or run the API, workers, dashboard, Postgres, and
LanceDB/pgvector containers on your infrastructure. Deterministic analysis needs no
provider. When optional prose is enabled, provider choice is per repository. Stored
data includes the graph, embeddings, wiki pages, and git metadata; raw source is
processed transiently and is not persisted.
Past one repository. Workspaces index an estate as one unit: API contracts matched producer to consumer so a breaking change is caught before it ships, cross-repo co-change, and one federated MCP endpoint that answers across all of it. (Estate-scale dashboards: in development.)
Not on git? Only the history layer needs a commit log. Point repowise init
at a plain directory, an export, or a Perforce or SVN workspace and the graph,
documentation, decisions and code-health layers all build normally; what is
missing is hotspots, ownership, co-change and bug history until the history layer
learns to read your system.
(Perforce, SVN, Endevor and ChangeMan on the roadmap →)
The complete capability matrix is maintained in COMMERCIAL.md, with every item labelled GA, rolling out, in development, or planned.
repowise.dev runs the same engine fully managed, at feature parity with self-hosted. We run it on our own codebase in the open: live snapshot → · explore public repos →.
Commercial detail and pricing models → · Security review pack → · Roadmap → · hello@repowise.dev · security@repowise.dev
--no-prose, code-derived content stays on
your infrastructure. The CLI reports anonymous, opt-out usage telemetry
(command names and coarse environment only); disable it with repowise telemetry disable, DO_NOT_TRACK=1, or by running fully offline.
What's collected →Doing a security review? docs/business/SECURITY_COMPLIANCE.md →
repowise init [PATH] # index a codebase (one-time; asks, or --no-prose -y needs no LLM)
repowise generate [PATH] # write wiki pages with a model, on demand (upgrade a keyless wiki)
repowise serve [PATH] # MCP server + local dashboard
repowise update [PATH] # incremental update (seconds; --workspace for every repo)
repowise watch # auto-sync daemon, re-index on file change
repowise search "<q>" # hybrid search (fulltext / semantic / symbol / path)
repowise ask "<q>" # a synthesized answer with citations
repowise context <files> # triage card: layer, hotspot, fix history, freshness
repowise symbol <id> # one symbol's body, with verified line bounds
repowise why <q|path> # decisions, rationale, git archaeology
repowise health # code-health KPIs and lowest-scoring files
repowise risk main..HEAD # score a branch or PR range for defect risk
repowise risk -t <file> # what history says about touching a file
repowise impacted-tests # only the tests a diff actually exercises
repowise dead-code # unreachable-code report
repowise decision list # architectural decisions
repowise export --format structurizr # the architecture as Structurizr DSL, no LLM
repowise distill pytest # compact, errors-first, reversible command output
repowise saved # tokens and dollars saved by distillation
repowise workspace add # multi-repo workspace management
repowise doctor # check setup, API keys, index drift
repowise uninstall # remove what repowise wrote, and say what it left
Every command and flag: docs/reference/CLI_REFERENCE.md · config: docs/reference/CONFIG.md · examples: examples/
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 repo 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/