Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
# ---------------------------------------------------------------------------
# repowise — unified PyPI package
# ---------------------------------------------------------------------------
[build-system]
requires = ["setuptools>=75"]
build-backend = "setuptools.build_meta"
[project]
name = "repowise"
version = "0.59.0"
description = "The codebase intelligence layer for your AI coding agent — dependency graph, git history, dead code, decisions, and code health, exposed over MCP"
readme = "README.md"
requires-python = ">=3.11"
license = "AGPL-3.0-or-later"
keywords = ["documentation", "codebase", "wiki", "llm", "ai", "mcp"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Environment :: Console",
"Framework :: FastAPI",
"Topic :: Software Development :: Documentation",
"Typing :: Typed",
]
# ---------------------------------------------------------------------------
# Core dependencies — everything needed for analysis + generation + CLI + server,
# including all LLM provider SDKs (anthropic, openai, google-genai, litellm).
# ---------------------------------------------------------------------------
dependencies = [
# HTTP client
"httpx>=0.27,<1",
# AST parsing
"tree-sitter>=0.25,<1",
"tree-sitter-python>=0.23,<1",
"tree-sitter-typescript>=0.23,<1",
"tree-sitter-javascript>=0.23,<1",
"tree-sitter-go>=0.23,<1",
"tree-sitter-rust>=0.23,<1",
"tree-sitter-java>=0.23,<1",
"tree-sitter-cpp>=0.23,<1",
"tree-sitter-dart>=0.1,<1",
"tree-sitter-kotlin>=1,<2",
"tree-sitter-ruby>=0.23,<1",
"tree-sitter-c-sharp>=0.23,<1",
"tree-sitter-swift>=0.7.4,<0.8",
"tree-sitter-scala>=0.23,<1",
"tree-sitter-php>=0.23,<1",
"tree-sitter-pascal>=0.11,<1",
# No standalone Python wheel exists for COBOL. This pack supplies the
# maintained ABI-14 grammar and caches it on first use.
"tree-sitter-language-pack>=1.14,<2",
"tree-sitter-luau>=1.2,<2",
"tree-sitter-bash>=0.23,<1",
"tree-sitter-gdscript>=6.1,<7",
"tree-sitter-vb-dotnet>=0.3,<1",
"tree-sitter-elixir>=0.3.5,<1",
"tree-sitter-fsharp>=0.3.11,<1",
"tree-sitter-objc>=3.0.2,<4",
# Markup grammars for single-file components: these locate <script> blocks
# and markup expressions only; the JS inside them is parsed with the
# TypeScript grammar (see sfc_source.py). There is no tree-sitter-vue on
# PyPI — the HTML grammar parses a .vue SFC cleanly, since <template>,
# <script> and <style> are just elements to it.
"tree-sitter-svelte>=1,<2",
"tree-sitter-html>=0.23,<1",
# SQL parsing (multi-dialect, error-tolerant, pure Python)
"sqlglot>=26,<28",
# Dependency graph
"networkx>=3.3,<4",
"scipy>=1.11,<2",
# Template rendering
"jinja2>=3.1,<4",
# File filtering
"pathspec>=0.12,<1",
# Structured logging
"structlog>=24,<25",
# Database (async)
"sqlalchemy[asyncio]>=2.0,<3",
"aiosqlite>=0.20,<1",
"alembic>=1.13,<2",
# Data validation
"pydantic>=2.8,<3",
# Retry logic
"tenacity>=9,<10",
# Git operations
"gitpython>=3.2.1,<4",
# YAML parsing
"pyyaml>=6.0,<7",
# Vector search (LanceDB — pure Python wheel)
"lancedb>=0.12,<1",
# CLI
"click>=8.1,<9",
"rich>=13,<14",
"watchdog>=4,<5",
# Server
"fastapi>=0.115,<1",
"uvicorn[standard]>=0.32,<1",
"mcp>=1.30.0,<2",
"apscheduler>=3.10,<4",
"cryptography>=50.0.0,<51",
# LLM providers (bundled — no extras needed)
"anthropic>=0.40,<1",
"openai>=1.50,<3",
"google-genai>=1.0,<2",
"litellm>=1.90.7,<2",
]
[project.optional-dependencies]
postgres = [
"pgvector>=0.3,<1",
"asyncpg>=0.29,<1",
]
graph-extra = [
"graspologic>=3.4,<4",
]
dev = [
"pytest>=8,<9",
"pytest-asyncio>=0.23,<1",
"pytest-snapshot>=0.9,<1",
"pytest-xdist>=3.5,<4",
"respx>=0.21,<1",
"time-machine>=2.14,<3",
"ruff>=0.6,<1",
"mypy>=1.11,<2",
"types-networkx>=3.3,<4",
"build>=1.0",
]
[project.scripts]
repowise = "repowise.cli.main:cli"
repowise-augment = "repowise.cli.augment_hook:main"
repowise-rewrite = "repowise.cli.rewrite_hook:main"
[project.urls]
Homepage = "https://github.com/repowise-dev/repowise"
Repository = "https://github.com/repowise-dev/repowise"
Issues = "https://github.com/repowise-dev/repowise/issues"
Documentation = "https://github.com/repowise-dev/repowise/blob/main/docs/start/USER_GUIDE.md"
# ---------------------------------------------------------------------------
# setuptools — auto-discover packages across three src/ roots
# ---------------------------------------------------------------------------
[tool.setuptools.package-dir]
"repowise.core" = "packages/core/src/repowise/core"
"repowise.cli" = "packages/cli/src/repowise/cli"
"repowise.server" = "packages/server/src/repowise/server"
[tool.setuptools.packages.find]
where = ["packages/core/src", "packages/cli/src", "packages/server/src"]
include = ["repowise*"]
namespaces = true
[tool.setuptools.package-data]
"repowise.core.ingestion" = ["queries/*.scm"]
"repowise.core.generation" = ["templates/*.j2"]
# Bundled copy of docs/CHANGELOG.md so the CLI `whats-new` / post-upgrade panel
# and the web what's-new view work offline from the installed wheel. Lives in
# core (the neutral home shared by cli + server). Kept in sync with the
# canonical docs/CHANGELOG.md by a drift-guard test (see tests/unit/upgrade).
"repowise.core.upgrade" = ["_data/CHANGELOG.md", "_data/release_stats.json"]
# Codex slash commands. A Codex plugin manifest has no slot for commands, so
# ~/.codex/prompts is the only surface that yields one and the CLI is the only
# thing that can write it, which means the content has to be in the wheel.
# Generated from plugins/shared/commands/ by scripts/gen_plugin_content.py and
# pinned by tests/unit/cli/test_plugin_content.py.
"repowise.cli.agent_targets" = ["_data/codex_prompts/*.md"]
# ---------------------------------------------------------------------------
# uv workspace (kept for local development)
# ---------------------------------------------------------------------------
[tool.uv.workspace]
members = [
"packages/core",
"packages/cli",
"packages/server",
]
[dependency-groups]
dev = [
"pytest>=8,<9",
"pytest-asyncio>=0.23,<1",
"pytest-snapshot>=0.9,<1",
"pytest-xdist>=3.5,<4",
"respx>=0.21,<1",
"time-machine>=2.14,<3",
"ruff>=0.6,<1",
"mypy>=1.11,<2",
"types-networkx>=3.3,<4",
"httpx>=0.27,<1",
]
# ---------------------------------------------------------------------------
# Ruff — linter + formatter
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 100
# Language sample fixtures are analyzer *inputs*, not code we run. Several are
# deliberately malformed (undefined names, unclosed file handles) because that is
# exactly the finding the test asserts on. Linting them would fail forever.
extend-exclude = ["tests/fixtures/lang_samples", "tests/fixtures/refactoring_corpus"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
"RUF001", # ambiguous unicode in strings — we ship prose with – — → in it
"RUF002", # ambiguous unicode in docstrings
"RUF003", # ambiguous unicode in comments
]
[tool.ruff.lint.isort]
known-first-party = ["repowise"]
[tool.ruff.lint.flake8-bugbear]
# FastAPI's dependency markers are evaluated once at import and are immutable by
# design, so B008 (function call in default argument) does not apply to them.
# Listed explicitly rather than ignoring B008 outright, which would also hide the
# genuine mutable-default bugs the rule exists to catch.
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"fastapi.Path",
"fastapi.Header",
"fastapi.Body",
"fastapi.Form",
"fastapi.File",
"fastapi.Cookie",
"fastapi.Security",
]
[tool.ruff.lint.per-file-ignores]
# Tests favour readability over naming purity: fixtures shadow builtins, helper
# classes mirror the CamelCase names of the things they stand in for.
"tests/**/*.py" = ["N802", "N806", "N818"]
# ---------------------------------------------------------------------------
# mypy — strict type checking
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.11"
warn_unused_configs = true
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
ignore_missing_imports = true
disallow_untyped_defs = false
check_untyped_defs = true
# ---------------------------------------------------------------------------
# pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "-v --tb=short"
pythonpath = ["."]