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...
repovaluescopevaluequestion*stringget_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...
repovaluecompactbooleanincludevaluetargets*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...
kindvaluerepovaluetiervaluelimitintegerownervaluegroup_byvaluedirectoryvaluesafe_onlybooleanmin_confidencenumberno_unreachablebooleaninclude_internalsbooleanno_unused_exportsbooleaninclude_zombie_packagesbooleanget_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...
repovaluelimitintegerincludevaluetargetsvalueget_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...
repovaluetargets*arraychanged_filesvaluesearch_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...
kindvaluerepovaluelimitintegerquery*stringpage_typevalueget_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...
repovaluequeryvaluesymbol_id*stringcontext_linesintegerget_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...
repovaluequeryvaluetargetsvalueThe intelligence layer that gives your AI agent context, ownership, decisions — and a code-health score proven to predict real bugs.
Five intelligence layers · Nine MCP tools · 15 languages · Multi-repo workspaces · One pip install
Hosted for teams → · Docs · Discord · Contact
Layers · Code Health · Benchmarks · Languages · Quickstart · MCP tools · Comparison · Hosted
Your AI coding agent reads files. It doesn't know which ones change together, which ones are dead, or why they were built the way they were. It has the source code and no memory of how the codebase got there.
repowise fixes that. It indexes your codebase into five intelligence layers —
dependency graph, git history, auto-generated docs, architectural decisions, and
code health — and exposes them to Claude Code, Codex, and any MCP-compatible agent
through nine task-shaped tools. The result: your agent answers "why does
auth work this way?" instead of "here is what auth.ts contains" — with
fewer tool calls, fewer file reads, and lower cost per query, at comparable
answer quality (benchmarks ↓).
repowise runs once, builds everything, then keeps it in sync on every commit. Each layer is queryable from the CLI, the MCP tools, and the local dashboard.
| Layer | What it gives you | Edge |
|---|---|---|
| ◈ Graph | tree-sitter dependency graph across 15 languages · two-tier file + symbol nodes · 3-tier call resolution · Leiden communities · PageRank / centrality / execution flows · framework-aware route→handler edges | A real graph most tools never build |
| ◈ Git | hotspots (churn × complexity) · ownership % · co-change pairs (hidden coupling) · bus factor · contributor profiles · module health · reviewer suggestions | Behavioral signals static analysis can't see |
| ◈ Docs | LLM-generated wiki per module/file · incremental on every commit · freshness + confidence scoring · hybrid RAG search (FTS + vector via RRF) | Stays current — rebuilt every commit |
| ◈ Decisions | architectural decisions mined from 8 sources, evidence-backed (verified / fuzzy / unverified), linked to graph nodes, connected by supersedes/refines/conflicts_with edges, tracked for staleness | ★ Captured nowhere else |
| ★ Code Health | 25 deterministic biomarkers, 1–10 score per file · defect-calibrated weights · coverage ingestion · trend alerts · refactoring targets · zero LLM, <30s | ★ Defect-validated — our edge ↓ |
Full deep-dive on every layer (graph, git, docs, decisions, hooks, auto-sync, dead code, CLAUDE.md generation): docs/INTELLIGENCE_LAYERS.md →
Code health is repowise's deepest differentiator — the one layer with no real equivalent, and the only one we can prove predicts real bugs.
repowise scores every file 1–10 from 25 deterministic biomarkers — McCabe complexity, deep nesting, brain methods, class cohesion (LCOM4), god classes, native Rabin–Karp clone detection, untested hotspots, function-level churn, code-age volatility, ownership dispersion, change entropy, co-change scatter, prior-defect history, test-quality smells, and more.
Zero LLM calls. Zero cloud requirement. Zero new runtime dependencies. Pure Python over tree-sitter + git data — finishes in under 30 seconds on a 3,000-file repo. The biomarker weights are calibrated against a real defect corpus, not hand-tuned; only the learned constants ship and the runtime stays fully deterministic.
repowise health # KPIs + lowest-scoring files
repowise health --coverage cov.lcov # ingest LCOV/Cobertura/Clover → untested-hotspot
repowise health --refactoring-targets # ranked by impact / effort
repowise health --trend # snapshots + declining / predicted-decline alerts
And it proves itself on your repo, not just a benchmark: after every index, repowise checks its own flags against your git history and reports the hit rate in the terminal and on the dashboard — "16/20 lowest-health files had a bug fix in the last 6 months, 3.3x the 24% baseline". See Does the score find the bugs?.
Does the score actually find bugs? Yes — and it out-ranks the leading commercial code-health tool. On the same 2,770 files across 9 languages, scored at the same leakage-free commit against the same defect labels:
| Axis (head-to-head, paired tests) | repowise | Leading commercial tool |
|---|---|---|
| Recall @ 20%-of-lines budget | 0.173 | 0.074 |
| Effort-aware ranking (Popt) | 0.607 | 0.462 |
| Defect density, size-normalized (defects/KLOC, Alert:Healthy) | 2.18× | 0.56× |
| Discrimination (ROC AUC) | 0.731 | 0.705 |
Ranking by repowise health surfaces 2.3× the defects under a fixed review budget (Popt Δ +0.144, recall Δ +0.098, density Δ p = 0.003 — all paired, significant). Full methodology & CIs →
User guide & per-biomarker reference: docs/CODE_HEALTH.md
Reproducible, on public codebases — repowise-bench →
Most of a coding agent's spend goes to exploration — greping for symbols, reading candidate files, re-reading them as context grows. repowise does that work once so the agent skips it on every query. Paired SWE-QA runs on real repositories (same model, same harness, with vs without repowise's MCP tools):
up to −96% tokens to load context · −89% file reads · −70% fewer tool calls · answer quality at parity
The win is context: repowise hands the agent a curated answer instead of a
pile of files to read. Loading a commit's context via get_context costs
2,391 tokens vs 64,039 raw — ~27× fewer (−96%). Across the two
benchmarks, agents read −69% to −89% fewer files and make −49% to −70%
fewer tool calls at answer quality on par with raw exploration; on a long,
multi-step investigation that compounds to −41% of the context re-read across
the whole session. Saved tokens are tokens you don't pay for — dollar cost
drops too, though agent-side prompt caching now mutes the cost delta. Reports: flask48 · flask v3 · sklearn48
Most of what an agent reads from a shell command is noise: 300 lines of
passing tests around 4 failures, full commit bodies for "what changed
recently". repowise distill <cmd> compresses command output before the
agent reads it — errors-first, exit code preserved, and every omission
reversible via an inline [repowise#<ref>] marker (repowise expand <ref>).
Paired runs on a public OSS repo, per command:
| Command | Raw → distilled tokens | Saved |
|---|---|---|
pytest -q (11 failures) | 3,374 → 1,317 | 61% — all 11 failure lines preserved |
git log -50 | 3,064 → 331 | 89% |
git diff (30 commits) | 62,833 → 8,635 | 86% |
Small outputs pass through untouched (net-positive guard), and in an
end-to-end spot-check the agent reached the identical root-cause diagnosis
from distilled output as from raw. Opt-in Claude Code hook rewrites noisy
commands automatically (shown for approval); repowise saved tracks tokens
and dollars saved. Full guide: docs/DISTILL.md →
The Costs dashboard tallies both savings surfaces — repowise distill (command output) and the MCP tools (each curated answer replacing the raw file reads it stood in for) — priced at your coding agent's own model. Example shown from a week of heavy local use.
Health scores are collected at a historical commit (T0); bug-fixing commits are counted over the following 6 months; the two are correlated — strictly no leakage. Across 21 open-source repositories spanning all 9 Full-tier languages:
Full report: health-defect/BENCHMARK_REPORT.md →
repowise serve starts a full web UI alongside the MCP server — no separate
setup.
Highlights: Chat (natural-language Q&A) · Docs (wiki with Mermaid + graph sidebar) · Graph (interactive, 2,000+ nodes, community coloring, path finder) · C4 Architecture (Context → Containers → Components) · Risk (hotspots, ownership heatmap, module health, dead code, blast radius) · Contributors (per-author profiles) · Decisions (evidence drawer, evolution timeline, decision-graph) · Health (biomarker scores, coverage, trends) · Security (local pattern scan) · Costs · Workspace (cross-repo contracts & co-changes). Full view-by-view list in docs/USER_GUIDE.md.
15 languages parsed to AST · 9 at the Full tier · framework-aware across all of them.
Full tier
Good tier
· Partial
| Tier | Languages | What works |
|---|---|---|
| Full | Python · TypeScript · JavaScript · Java · Kotlin · Go · Rust · C++ · C# | AST parsing, import resolution, named bindings, call resolution, heritage extraction, docstrings; multi-project workspace resolvers; framework-aware edges; per-language dynamic-hint extractors; code-health biomarkers |
| Good | C · Ruby · Swift · Scala · PHP | AST parsing, import resolution, named bindings, call resolution, heritage (mixins / derive / extensions / traits), docstrings; dedicated workspace-aware resolvers; Rails / Laravel / TYPO3 framework edges; dynamic-hint extractors |
| Config / data | OpenAPI · Protobuf · GraphQL · Dockerfile · Makefile · YAML · JSON · TOML · SQL · Terraform · Markdown · Shell | Included in the file tree; special handlers extract endpoints / targets where applicable |
| Git-blame only | Objective-C · Elixir · Erlang · Dart · Zig · Julia · Clojure · Haskell · OCaml · F# · … | Tracked in git history (blame, hotspots, co-change); no AST parsing yet |
Adding a language needs one .scm query file and one config entry — no
changes to the parser core. Full per-language matrix, code-health checklist, and
the contributor recipe: docs/LANGUAGE_SUPPORT.md →
| Start here | |
|---|---|
| Individual developers | pip install repowise → repowise init → query from Claude Code in minutes. 100% local, BYO API key, free under AGPL-3.0. |
| Teams | repowise.dev hosted — zero ops, hosted MCP endpoint, auto re-index on every commit, plus the free Repowise PR Bot that comments on hotspots, hidden coupling, and declining health per PR. |
| Enterprises | On-prem topology, SSO/SCIM, RBAC, CVE-aware security layer, workflow integrations, and commercial licensing (no AGPL obligation) — see docs/COMMERCIAL.md. |
pip install repowise # or: uv tool install repowise
cd your-project
repowise init # builds all five intelligence layers (one-time)
repowise serve # starts MCP server + local dashboard
cd my-workspace/ # parent dir containing backend/, frontend/, shared-libs/
repowise init . # scans for git repos, indexes each, runs cross-repo analysis
repowise serve # workspace dashboard + per-repo pages
repowise init automatically registers the MCP server, installs a PostToolUse
hook in ~/.claude/settings.json, generates .mcp.json at the project root, and
offers a post-commit hook that keeps everything in sync. If the Codex CLI is
installed and logged in, interactive runs also offer to write project-local
.codex/config.toml, .codex/hooks.json, and a managed AGENTS.md;
non-interactive runs require --codex. Skip Codex setup with --no-codex; force or
skip AGENTS.md with --agents / --no-agents.
Claude Code plugin. Prefer a one-command setup? Install the plugin from the
marketplace — it registers the MCP server and hook and adds /repowise:* slash
commands (init, health, risk, dead-code, decision, …):
/plugin marketplace add repowise-dev/repowise
/plugin install repowise@repowise
To add the MCP server to another editor manually:
{
"mcpServers": {
"repowise": { "command": "repowise", "args": ["mcp", "/path/to/your/project"] }
}
}
Init time: the graph, git, dead-code, and code-health layers build in minutes with zero LLM calls — run
repowise init --index-onlyfor a queryable index almost immediately. The one-time cost is the documentation layer (LLM-generated wiki pages, can run in the background). After that, every commit-triggered update takes under 30 seconds and only regenerates the pages your change touched.
Docs: Quickstart · User Guide · CLI Reference · Codex · MCP Tools · Distill · Workspaces · Auto-Sync · Config
Most tools are designed around data entities — one module, one file, one symbol —
forcing agents into long chains of sequential calls. repowise tools are designed
around tasks: pass multiple targets in one call, get complete context back.
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.
| Tool | What only this tool answers |
|---|---|
get_overview() | Architecture summary, module map, entry points, git health, community summary. First call on any unfamiliar codebase. |
get_answer(question) | Hybrid retrieval (FTS + vector via RRF) + PageRank bias + 1-hop graph expansion → a cited answer with calibrated retrieval_quality. Returns structured best_guesses on low confidence. Collapses search → read → reason into one round-trip. |
get_context(targets, include?) | Triage card for files / modules / symbols: title, summary, signatures, hotspot bit, governing_decisions, and symbol_ids. include opens callers/callees, ownership, metrics, decisions, full_doc. Batch many targets. |
get_symbol("file.py::Name") | Raw source bytes for one indexed symbol with exact line bounds — cheaper and safer than Read + 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?) | Hotspot scores, dependents, co-change partners, ownership, test gaps, security signals. Pass changed_files for PR mode → a directive block (will_break, missing_cochanges, missing_tests, governance_risk). |
get_why(query?, targets?) | Architectural decision records, status, evidence spans, and the supersession lineage chain. Falls back to git archaeology when no ADRs exist. |
get_dead_code(...) | Unreachable code by confidence tier with cleanup-impact estimates; cross-repo consumer detection in workspace mode. |
get_health(targets?, include?) | 25-biomarker scores per file. Dashboard mode → KPIs + lowest-scoring files + module rollup; targeted mode → per-file findings. include: coverage, refactoring, trend. |
Worked example ("Add rate limiting to all API endpoints" in 5 calls instead of ~30 greps+reads) and the full reference: docs/MCP_TOOLS.md →
| repowise | Google Code Wiki | DeepWiki | Swimm | CodeScene | |
|---|---|---|---|---|---|
| Self-hostable, open source | ✅ AGPL-3.0 | ❌ cloud only | ❌ cloud only | ❌ Enterprise only | ✅ Docker |
| Private repo — no cloud | ✅ | ❌ in development | ❌ OSS forks only | ✅ Enterprise tier | ✅ |
| Auto-generated documentation | ✅ | ✅ Gemini | ✅ | ✅ PR2Doc | ❌ |
| MCP server for AI agents | ✅ 9 tools | ❌ | ✅ 3 tools | ✅ | ✅ |
| Proactive agent hooks | ✅ Claude + Codex hooks | ❌ | ❌ | ❌ | ❌ |
Auto-generated AI instructions (CLAUDE.md, AGENTS.md) | ✅ | ❌ | ❌ | ❌ | ❌ |
| Code health score (1–10) | ✅ 25 biomarkers | ❌ | ❌ | ❌ | ✅ 25–30 |
| Brain Method / LCOM4 / god class | ✅ | ❌ | ❌ | ❌ | ✅ |
| Test-coverage intelligence | ✅ LCOV/Cobertura/Clover | ❌ | ❌ | ❌ | ❌ |
| Untested-hotspot detection | ✅ coverage × hotspot | ❌ | ❌ | ❌ | ❌ |
| Health trend + declining alerts | ✅ rolling snapshots | ❌ | ❌ | ❌ | ✅ |
| Refactoring recommendations | ✅ deterministic | ❌ | ❌ | ❌ | ✅ |
| Git intelligence (hotspots, ownership, co-change) | ✅ | ❌ | ❌ | ❌ | ✅ |
| Bus factor analysis | ✅ | ❌ | ❌ | ❌ | ✅ |
| Dead code detection | ✅ | ❌ | ❌ | ❌ | ❌ |
| Architectural decision records | ✅ | ❌ | ❌ | ❌ | ❌ |
| Multi-repo workspace intelligence | ✅ co-changes, contracts, federated MCP | ❌ | ❌ | ❌ | ❌ |
| Local dashboard | ✅ | ❌ | ❌ | ❌ IDE only | ✅ |
repowise is the intersection: behavioral git intelligence + a defect-validated code-health score + auto-generated docs + agent-native MCP + architectural decisions + multi-repo workspace intelligence — self-hostable and open source. Detailed breakdown: docs/COMPETITIVE_ANALYSIS.md.
repowise.dev is the same engine, fully managed — at feature parity with self-hosted: every CLI command, every MCP tool, the full dashboard. We dogfood it on our own codebase: live snapshot → · explore public repos →.
On top of self-hosting:
What's GA / in development / planned, on-prem topology, SSO/SCIM/RBAC, and pricing: docs/COMMERCIAL.md · Get in touch →
repowise init [PATH] # index codebase (one-time; --index-only skips LLM)
repowise serve [PATH] # MCP server + local dashboard
repowise update [PATH] # incremental update (<30s; --workspace for all repos)
repowise query "<q>" # ask anything from the terminal
repowise health # code-health KPIs + lowest-scoring files
repowise risk main..HEAD # score a branch / PR range for defect risk
repowise dead-code # unreachable-code report
repowise distill pytest # compact errors-first output (reversible) — saves 60–90% tokens
repowise saved # tokens & dollars saved by distillation
repowise doctor # check setup, API keys, store drift
repowise init generates .repowise/config.yaml (provider, model, embedder,
reasoning mode, exclude patterns, git commit depth). Full command set:
docs/CLI_REFERENCE.md · config reference:
docs/CONFIG.md.
git clone https://github.com/repowise-dev/repowise
cd repowise
uv sync --all-packages
uv run repowise --version
uv run pytest tests/unit/
Full guide, including how to add languages and LLM providers: CONTRIBUTING.md.
AGPL-3.0. Free for individuals, teams, and companies using repowise internally.
For commercial licensing — the enterprise security & compliance layer, SSO/SCIM, RBAC, workflow integrations, priority support and SLA, or embedding repowise in a product without AGPL obligations — see docs/COMMERCIAL.md or contact hello@repowise.dev.
Built for engineers who got tired of watching their AI agent cat the same file for the fourth time.
repowise.dev · Explore → · Discord · X · hello@repowise.dev
cyanheads/git-mcp-server
io.github.b1ff/atlassian-dc-mcp-bitbucket
com.mcparmory/atlassian-jira
sirlordt/vscode-terminal-mcp
aashari/mcp-server-atlassian-bitbucket
sooperset/mcp-atlassian