ai-tech-debt
v1.0.0
Published
Scan your codebase for technical debt and get an AI-powered debt score with prioritized fixes
Downloads
85
Maintainers
Readme
ai-tech-debt
Scan your codebase for technical debt and get an AI-powered debt score with prioritized fixes.
Install
npx ai-tech-debtWhat it does
Scans your code for common technical debt indicators:
- TODO, FIXME, HACK, XXX, BUG comments
- eslint-disable and @ts-ignore suppressions
- Large files and deep nesting
- Console.log statements
- TypeScript
anytypes
Gives you a score from 0-100 and grades A-F.
Usage
# Scan current directory
npx ai-tech-debt
# Scan specific directory
npx ai-tech-debt -d ./src
# Scan specific extensions
npx ai-tech-debt -e ts,tsx
# Skip AI analysis
npx ai-tech-debt --no-ai
# Output JSON report
npx ai-tech-debt -o debt-report.jsonExample Output
🔍 AI Tech Debt Scanner
✔ Scanned 47 files (8,234 lines)
📊 Technical Debt Report
Score: 72/100 (C) ⚠️
Total debt points: 89
Findings by Type:
🟡 TODO 23 occurrences
🟡 FIXME 8 occurrences
🔴 HACK 3 occurrences
⚪ CONSOLE_LOG 34 occurrences
⚪ ANY_TYPE 12 occurrences
🎯 Top Files to Address:
1. src/api/legacy.ts - 18 points (7 issues)
2. src/utils/helpers.js - 12 points (5 issues)
3. src/components/Dashboard.tsx - 9 points (4 issues)AI Analysis
Set OPENAI_API_KEY to get AI-powered recommendations:
export OPENAI_API_KEY=your-key
npx ai-tech-debtThe AI will analyze your debt patterns and suggest what to fix first.
Options
| Flag | Description | Default |
|------|-------------|---------|
| -d, --dir <path> | Directory to scan | . |
| -e, --extensions <ext> | File extensions | js,ts,jsx,tsx |
| --no-ai | Skip AI analysis | false |
| -o, --output <file> | Save JSON report | - |
License
MIT
Built by LXGIC Studios 🔗 GitHub · Twitter 💡 Want more free tools like this? We have 100+ on our GitHub: github.com/lxgicstudios
