Introduction
Repowise is an open-source codebase intelligence tool that analyzes your repository to produce health scores, detect dead code, generate documentation, and surface architectural decisions. It works both as a standalone CLI and as an MCP server for AI coding agents.
What Repowise Does
- Computes code health scores across complexity, coupling, and test coverage
- Detects dead code, unused exports, and orphaned files
- Auto-generates documentation from code structure and patterns
- Provides git analytics including contributor patterns and churn hotspots
- Serves insights via MCP for integration with coding agents
Architecture Overview
Repowise is a Python application that combines static analysis with git history mining. The analyzer walks the AST of supported languages to build a dependency graph, then cross-references with git log data to identify churn hotspots and ownership patterns. Results are stored in a local SQLite database for fast querying. The MCP server exposes these insights to coding agents.
Self-Hosting & Configuration
- Install via pip:
pip install repowise - Run analysis with
repowise analyze <path> - Configure analysis rules in
.repowise.yml - Start the MCP server for agent integration
- Schedule periodic analysis via cron or CI
Key Features
- Code health scoring with actionable recommendations
- Dead code and unused dependency detection
- Git-based churn and ownership analytics
- Auto-generated documentation from code patterns
- MCP server for AI agent integration
Comparison with Similar Tools
- SonarQube — Enterprise code quality; Repowise is lighter with agent integration
- CodeClimate — Hosted analysis; Repowise is fully self-hosted and open source
- Semgrep — Pattern-based security scanning; Repowise focuses on health and architecture
- Fallow — TS/JS codebase intelligence; Repowise supports multiple languages
FAQ
Q: What languages are supported? A: Python, TypeScript, JavaScript, Go, and Rust. More languages are planned.
Q: How does MCP integration work?
A: Run repowise serve --mcp to expose codebase insights as MCP tools that any compatible agent can query.
Q: Does it require a database? A: Repowise uses an embedded SQLite database stored in your project directory. No external database needed.
Q: Can I run it in CI?
A: Yes, use repowise analyze --ci for non-interactive mode with exit codes based on health thresholds.