DebtDrone CLI is a lightning-fast, highly configurable technical debt analyzer.
Built with a Hexagonal Architecture, DebtDrone ships as a single, statically-linked Go binary that serves two distinct purposes:
- Interactive TUI: A beautiful, responsive terminal interface for developers to explore code complexity locally.
- Headless CLI: A robust, pipeline-ready executable for CI/CD environments with strict quality gates and JSON outputs.
Built on Bubble Tea and Lipgloss.
- Master-Detail Explorer: Navigate hundreds of issues effortlessly without text truncation.
- Historical Tracking: View past scans and track whether your debt is shrinking or growing over time.
- Inline Configuration: Modify thresholds and rules directly within the terminalโno need to touch Vim.
- Seamless Updates: Built-in auto-updater with changelog modals (
/update).
Built on Cobra.
- CI/CD Quality Gates: Fail your build pipelines automatically if new Critical or High debt is introduced using
--fail-on. - Structured Output: Export results to standard Text tables or machine-readable JSON (
--format=json). - Deterministic Execution: Bypasses all interactive prompts to ensure pipelines never hang.
- Config as Code: Commit a
.debtdrone.yamlto your repo to ensure local and pipeline scans share the exact same ruleset.
Via Homebrew (Recommended):
brew install endrilickollari/tap/debtdroneVia Shell Script (Mac/Linux):
curl -sL https://raw.githubusercontent.com/endrilickollari/debtdrone-cli/main/installation_scripts/install.sh | bashVia PowerShell (Windows):
iwr -useb https://raw.githubusercontent.com/endrilickollari/debtdrone-cli/main/installation_scripts/install.ps1 | iexVia Go Install:
go install github.com/endrilickollari/debtdrone-cli/cmd/debtdrone@latestVia Pre-compiled Binaries: Check the Releases page for static binaries for macOS, Linux, and Windows.
To launch the interactive dashboard, simply run the tool with no arguments:
debtdroneOnce inside the TUI, you can use standard Vim bindings (j/k) to navigate. Use the command bar to jump between modules:
/scan- Start a new technical debt scan on the current directory./history- View a list of previous scans and their severity breakdowns./config- Open the Settings App to adjust global or repository-specific thresholds./update- Check for new releases and install them in-place.
The headless CLI is designed for automation, scripting, and CI/CD workflows.
Run a silent scan and output a clean text table:
debtdrone scan ./my-projectOutput results as JSON for pipeline parsing:
debtdrone scan ./my-project --format=jsonPrevent bad code from being merged by setting a severity threshold. If the scanner finds any issue matching or exceeding this level, it returns a non-zero exit code (os.Exit(1)).
# Fails the pipeline if Critical or High debt is found
debtdrone scan ./my-project --fail-on=highInitialize a default .debtdrone.yaml in your repository:
debtdrone initView or edit settings via the CLI:
debtdrone config list
debtdrone config set thresholds.max_complexity 15DebtDrone is built to live in your CI/CD pipeline. Here is a copy-paste example of how to implement a DebtDrone Quality Gate in your GitHub Actions:
name: Code Quality Gate
on: [push, pull_request]
jobs:
debtdrone-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install DebtDrone
run: |
curl -sL https://github.com/endrilickollari/debtdrone-cli/releases/latest/download/debtdrone_Linux_x86_64.tar.gz | tar xz
sudo mv debtdrone /usr/local/bin/
- name: Run DebtDrone Quality Gate
# Fails the PR if high or critical technical debt is introduced
run: debtdrone scan ./ --format=text --fail-on=highDebtDrone uses a strict Ports & Adapters (Hexagonal) architecture to ensure the core analysis engine remains decoupled from the presentation layer.
internal/analysis/: The core business logic. Pure Go, UI-blind, highly concurrent scanning engine.cmd/debtdrone/: The Cobra routing layer. Handles headless execution, flag parsing, and OS exit codes.internal/tui/: The presentation layer. Implements the Bubble Tea Nested Router Pattern. Every major screen (AppModel, ConfigModel, ScanModel) is fully encapsulated and communicates via event-driventea.Msgpassing.
We welcome contributions! To get started:
- Clone the repository.
- Run
go mod tidy. - Build the binary:
go build -o debtdrone ./cmd/debtdrone/main.go.
We maintain two distinct test suites:
- Headless Tests:
go test ./cmd/...tests the Cobra buffers, structured JSON output, and OS exit codes. - TUI Tests:
go test ./internal/tui/...tests the Bubble Tea state machines using pure functional state injection. (Note: Our test helpers forcefully apply TrueColor profiles to ensure Lipgloss strings render deterministically in headless CI environments).
DebtDrone CLI is distributed under the MIT License. Free to use, modify, and distribute.
See LICENSE for full details.
This repository serves as the public distribution channel for DebtDrone CLI. The source code is proprietary, but we welcome:
- ๐ Bug reports
- ๐ก Feature requests
- ๐ Documentation improvements
Read our Contributing Guide to get started.
- ๐ Contributing Guidelines - How to contribute
- ๐จ Build Guide - Build system and release process
- ๐ Issues - Report bugs or request features
Built with โค๏ธ.
If DebtDrone helped you fix a critical issue or saved you time, consider buying me a coffee!
