{"id":33898262,"url":"https://github.com/endrilickollari/debtdrone-cli","last_synced_at":"2026-04-16T21:07:37.157Z","repository":{"id":327805510,"uuid":"1110761156","full_name":"endrilickollari/debtdrone-cli","owner":"endrilickollari","description":"Advanced technical debt analysis tool using AST parsing for accurate complexity metrics (Cyclomatic, Cognitive) across 11+ languages. Features strict quality gates, security scanning integration, and CI/CD compatibility.","archived":false,"fork":false,"pushed_at":"2025-12-16T13:48:12.000Z","size":381,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-20T04:25:14.821Z","etag":null,"topics":["ci-cd","clean-code","cli","code-analysis","code-quality","complexity-metrics","cyclomatic-complexity","devops","static-analysis","technical-debt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/endrilickollari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-05T17:18:49.000Z","updated_at":"2025-12-20T03:32:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/endrilickollari/debtdrone-cli","commit_stats":null,"previous_names":["endrilickollari/debtdrone-cli"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/endrilickollari/debtdrone-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endrilickollari%2Fdebtdrone-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endrilickollari%2Fdebtdrone-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endrilickollari%2Fdebtdrone-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endrilickollari%2Fdebtdrone-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endrilickollari","download_url":"https://codeload.github.com/endrilickollari/debtdrone-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endrilickollari%2Fdebtdrone-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30287427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","clean-code","cli","code-analysis","code-quality","complexity-metrics","cyclomatic-complexity","devops","static-analysis","technical-debt"],"created_at":"2025-12-11T20:45:12.595Z","updated_at":"2026-04-16T21:07:37.140Z","avatar_url":"https://github.com/endrilickollari.png","language":"Go","readme":"# 🚁 DebtDrone CLI\n\n![Go Version](https://img.shields.io/github/go-mod/go-version/endrilickollari/debtdrone-cli)\n![Build Status](https://img.shields.io/github/actions/workflow/status/endrilickollari/debtdrone-cli/ci.yml?branch=main)\n![License](https://img.shields.io/github/license/endrilickollari/debtdrone-cli)\n![Release](https://img.shields.io/github/v/release/endrilickollari/debtdrone-cli)\n\n**DebtDrone CLI** is a lightning-fast, highly configurable technical debt analyzer. \n\nBuilt with a **Hexagonal Architecture**, DebtDrone ships as a single, statically-linked Go binary that serves two distinct purposes:\n1. **Interactive TUI:** A beautiful, responsive terminal interface for developers to explore code complexity locally.\n2. **Headless CLI:** A robust, pipeline-ready executable for CI/CD environments with strict quality gates and JSON outputs.\n\n---\n\n## ✨ Features\n\n### 🎨 The Interactive TUI (For Humans)\nBuilt on [Bubble Tea](https://github.com/charmbracelet/bubbletea) and [Lipgloss](https://github.com/charmbracelet/lipgloss).\n* **Master-Detail Explorer:** Navigate hundreds of issues effortlessly without text truncation.\n* **Historical Tracking:** View past scans and track whether your debt is shrinking or growing over time.\n* **Inline Configuration:** Modify thresholds and rules directly within the terminal—no need to touch Vim.\n* **Seamless Updates:** Built-in auto-updater with changelog modals (`/update`).\n\n### 🤖 The Headless CLI (For Machines)\nBuilt on [Cobra](https://github.com/spf13/cobra).\n* **CI/CD Quality Gates:** Fail your build pipelines automatically if new Critical or High debt is introduced using `--fail-on`.\n* **Structured Output:** Export results to standard Text tables or machine-readable JSON (`--format=json`).\n* **Deterministic Execution:** Bypasses all interactive prompts to ensure pipelines never hang.\n* **Config as Code:** Commit a `.debtdrone.yaml` to your repo to ensure local and pipeline scans share the exact same ruleset.\n\n---\n\n## 🚀 Installation\n\n**Via Homebrew (Recommended):**\n```bash\nbrew install endrilickollari/tap/debtdrone\n```\n\n**Via Shell Script (Mac/Linux):**\n```bash\ncurl -sL https://raw.githubusercontent.com/endrilickollari/debtdrone-cli/main/installation_scripts/install.sh | bash\n```\n\n**Via PowerShell (Windows):**\n```powershell\niwr -useb https://raw.githubusercontent.com/endrilickollari/debtdrone-cli/main/installation_scripts/install.ps1 | iex\n```\n\n**Via Go Install:**\n```bash\ngo install github.com/endrilickollari/debtdrone-cli/cmd/debtdrone@latest\n```\n\n**Via Pre-compiled Binaries:**\nCheck the [Releases](https://github.com/endrilickollari/debtdrone-cli/releases) page for static binaries for macOS, Linux, and Windows.\n\n---\n\n## 🎮 Usage: Interactive TUI\nTo launch the interactive dashboard, simply run the tool with no arguments:\n\n```bash\ndebtdrone\n```\n\n### TUI Commands \u0026 Navigation\nOnce inside the TUI, you can use standard Vim bindings (`j`/`k`) to navigate. Use the command bar to jump between modules:\n\n* `/scan` - Start a new technical debt scan on the current directory.\n* `/history` - View a list of previous scans and their severity breakdowns.\n* `/config` - Open the Settings App to adjust global or repository-specific thresholds.\n* `/update` - Check for new releases and install them in-place.\n\n---\n\n## ⚙️ Usage: Headless CLI (CI/CD)\nThe headless CLI is designed for automation, scripting, and CI/CD workflows.\n\n### Running a Scan\nRun a silent scan and output a clean text table:\n```bash\ndebtdrone scan ./my-project\n```\n\nOutput results as JSON for pipeline parsing:\n```bash\ndebtdrone scan ./my-project --format=json\n```\n\n### The Quality Gate (Failing Builds)\nPrevent 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)`).\n\n```bash\n# Fails the pipeline if Critical or High debt is found\ndebtdrone scan ./my-project --fail-on=high\n```\n\n### Configuration Management\nInitialize a default `.debtdrone.yaml` in your repository:\n```bash\ndebtdrone init\n```\n\nView or edit settings via the CLI:\n```bash\ndebtdrone config list\ndebtdrone config set thresholds.max_complexity 15\n```\n\n---\n\n## 🛠 GitHub Actions Integration\nDebtDrone 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:\n\n```yaml\nname: Code Quality Gate\n\non: [push, pull_request]\n\njobs:\n  debtdrone-scan:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Code\n        uses: actions/checkout@v4\n        \n      - name: Install DebtDrone\n        run: |\n          curl -sL https://github.com/endrilickollari/debtdrone-cli/releases/latest/download/debtdrone_Linux_x86_64.tar.gz | tar xz\n          sudo mv debtdrone /usr/local/bin/\n\n      - name: Run DebtDrone Quality Gate\n        # Fails the PR if high or critical technical debt is introduced\n        run: debtdrone scan ./ --format=text --fail-on=high\n```\n\n---\n\n## 🏗 Architecture\nDebtDrone uses a strict **Ports \u0026 Adapters (Hexagonal)** architecture to ensure the core analysis engine remains decoupled from the presentation layer.\n\n* **`internal/analysis/`**: The core business logic. Pure Go, UI-blind, highly concurrent scanning engine.\n* **`cmd/debtdrone/`**: The Cobra routing layer. Handles headless execution, flag parsing, and OS exit codes.\n* **`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-driven `tea.Msg` passing.\n\n---\n\n## 💻 Development \u0026 Contributing\nWe welcome contributions! To get started:\n\n1. Clone the repository.\n2. Run `go mod tidy`.\n3. Build the binary: `go build -o debtdrone ./cmd/debtdrone/main.go`.\n\n### Testing\nWe maintain two distinct test suites:\n* **Headless Tests**: `go test ./cmd/...` tests the Cobra buffers, structured JSON output, and OS exit codes.\n* **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).*\n\n---\n\n## 📄 License\nDebtDrone CLI is distributed under the **MIT License**. Free to use, modify, and distribute.\n\nSee [LICENSE](LICENSE) for full details.\n\n---\n\n## 🤝 Contributing\nThis repository serves as the **public distribution channel** for DebtDrone CLI. The source code is proprietary, but we welcome:\n\n* 🐛 Bug reports\n* 💡 Feature requests\n* 📖 Documentation improvements\n\nRead our [Contributing Guide](CONTRIBUTING.md) to get started.\n\n### Quick Links\n* 📖 [Contributing Guidelines](CONTRIBUTING.md) - How to contribute\n* 🔨 [Build Guide](BUILD.md) - Build system and release process\n* 📋 [Issues](https://github.com/endrilickollari/debtdrone-cli/issues) - Report bugs or request features\n\n\u003cdiv align=\"center\"\u003e\n\n**Built with ❤️.**\n\n\u003c/div\u003e\n\n---\n\n## ☕ Support the Project\nIf DebtDrone helped you fix a critical issue or saved you time, consider buying me a coffee!\n\n\u003ca href=\"https://www.buymeacoffee.com/endri.lickollari\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n","funding_links":["https://www.buymeacoffee.com/endri.lickollari"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendrilickollari%2Fdebtdrone-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendrilickollari%2Fdebtdrone-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendrilickollari%2Fdebtdrone-cli/lists"}