Skip to main content

DebtPilot

Track technical debt before it blows up in production.

Every IDE catches syntax errors. DebtPilot does something no IDE can — it knows that payments/stripe.js has been edited 30 times by 4 different developers, has a TODO from 8 months ago, and a complexity score of 24. That combination is your next production incident.


Install

pip install debtpilot

Full install (file watcher + live notifications):

pip install "debtpilot[full]"


Quickstart — 4 commands, done

  1. Scan your project debtpilot scan .

  2. See the report debtpilot report

  3. Block bad commits automatically debtpilot hook --install

  4. Start live background watching debtpilot start --dir .


What it does

Command What happens
debtpilot scan . Scores every file 0-100 for technical debt
debtpilot report Shows top debt files in a ranked table
debtpilot file <path> Deep breakdown of one file
debtpilot ai <path> AI explains exactly what to fix (needs Gemini key)
debtpilot predict Predicts which file will cause your next bug
debtpilot dashboard Generates an HTML dashboard — open in browser
debtpilot report-pdf Generates a print-ready PDF report
debtpilot alerts Shows active danger alerts
debtpilot todos Lists stale TODOs by age
debtpilot hook --install Blocks commits above the debt threshold
debtpilot start Starts live file watcher + WebSocket server
debtpilot status Full health check of your DebtPilot setup
debtpilot digest --send Sends weekly email summary to your team

Debt Score (0-100)

Grade Score Meaning
A 0-25 Healthy
B 26-45 Watch
C 46-65 Concerning
D 66-80 Dangerous
F 81-100 Critical — fix before next deploy

Score = weighted combination of: git churn (30%) + complexity (25%) + lint issues (20%) + stale TODOs (15%) + staleness (10%).

Complexity is measured exactly for Python (AST) and estimated for other code languages (JS/TS, Java, Go, Ruby, Rust, PHP, C/C++, C#, Kotlin, Swift…). A language DebtPilot can't analyse is marked unmeasured and its weight is redistributed — a file is never scored as "zero complexity = healthy" just because we couldn't read it.


Configuration & CI policy (debtpilot.toml)

Scaffold a per-repo policy and commit it:

debtpilot init-config
ignore = ["**/generated/**", "**/vendor/**"]   # top-level keys come first

[weights]                 # renormalised automatically
churn = 0.30
complexity = 0.25
lint = 0.20
todo = 0.15
staleness = 0.10

[thresholds]
alert = 65                # daemon alert level
fail  = 80                # `debtpilot cicd run` fails a file at/above this

[grades]                  # score <= value -> grade
A = 25
B = 45
C = 65
D = 80

[[waiver]]                # approved, time-boxed exceptions
path    = "legacy/importer.py"
reason  = "scheduled rewrite in Q3"
expires = "2026-12-31"    # after this, the gate fails again automatically

CI gate — fail on absolute debt, or ratchet so debt can't grow:

debtpilot cicd run --write-baseline          # record current scores
debtpilot cicd run --ratchet                 # fail if a file rose above baseline
debtpilot cicd run --fail-threshold 70       # or fail any file >= 70
debtpilot cicd run --sarif debt.sarif        # SARIF 2.1.0 for code scanning

Waived files stay in the report (marked, and suppressed in SARIF) but never fail the gate.


Where your data lives

Scan results are stored per project, in a .debtpilot/ folder at your project root (found the same way git finds its root). Two different projects scanned on the same machine never share data. The folder self-ignores via its own .gitignore, so you'll never accidentally commit your scan database.

Your global settings (Gemini API key, email digest config) live separately in ~/.debtpilot/config.json — those are per-user, not per-project.


AI Fix Suggestions (optional)

0-BYOK — no API keys. The AI advisor runs on OnePort's managed models, metered against your account. Get a token at https://www.oneport.co.in/console, then:

onp account login <op_live_...> debtpilot ai src/payments.py

DebtPilot sends only the file context through the OnePort backend (metered to your account) and gets back exact fix suggestions with code examples and effort estimates. Static debt scoring works fully offline with no account.


Weekly Email Digest

debtpilot config --gmail you@gmail.com --gmail-password YOUR_APP_PASS --recipients team@company.com debtpilot digest --send

Use a Gmail App Password from: myaccount.google.com/apppasswords


Auto-start on Windows login

debtpilot autostart --install --dir .

DebtPilot will start silently in the background every time Windows starts. No manual debtpilot start needed.


Requirements

  • Python 3.10 or higher
  • git in PATH
  • pylint / mypy / eslint — optional, for richer lint scores

License

MIT

Metadata

Release files for debtpilot 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for debtpilot 0.5.0
File Size Uploaded Provenance Actions
debtpilot-0.5.0.tar.gz 80.1 kB Without provenance Details for debtpilot-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for debtpilot 0.5.0
File Interpreter ABI Platform Actions
debtpilot-0.5.0-py3-none-any.whl Python 3 none any Details for debtpilot-0.5.0-py3-none-any.whl

Total release size: 160.7 kB

Release files / debtpilot-0.5.0.tar.gz

Download URL debtpilot-0.5.0.tar.gz
Size 80.1 kB
Tags Source
SHA-256 checksum
How to use checksums
89c7581d3e64701a76b202e3f0f4e76ec801c938e256b351d1f7942268f0d784
BLAKE2b-256 checksum
How to use checksums
4ff0d80af87ff1d78a4d1585ea1884cc334ddda575d0d5a537c6204ac8a26aea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / debtpilot-0.5.0-py3-none-any.whl

Download URL debtpilot-0.5.0-py3-none-any.whl
Size 80.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac5a8a8fb30468dc194dc7255fbb2f475e0f64169cf58a3e8f543726543a77c6
BLAKE2b-256 checksum
How to use checksums
65643976db7a87b4bf4e5fe9add91b7c122356f062eb2649a268f2b178680909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Security for debtpilot 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page