
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@techdebtgpt/maintsight
Advanced tools
AI-powered maintenance risk predictor for git repositories using XGBoost
AI-powered maintenance degradation predictor for git repositories using XGBoost machine learning
MaintSight analyzes your git repository's commit history and code patterns to predict maintenance degradation at the file level. Using a trained XGBoost model, it identifies code quality trends and helps prioritize refactoring efforts by detecting files that are degrading over time.
# Install globally
npm install -g @techdebtgpt/maintsight
# Run predictions on current directory (generates interactive HTML report)
maintsight predict
# Show only degraded files
maintsight predict -t 0.1
# Generate markdown report
maintsight predict -f markdown -o report.md
# Generate standalone HTML report
maintsight predict -f html -o report.html
npm install -g @techdebtgpt/maintsight
npm install @techdebtgpt/maintsight
git clone https://github.com/techdebtgpt/maintsight.git
cd maintsight-cli
npm install
npm run build
npm link
# Analyze current directory
maintsight predict
# Analyze specific repository
maintsight predict /path/to/repo
# Save results to file
maintsight predict -o results.json
# Analyze specific branch
maintsight predict -b develop
# Limit commit analysis window
maintsight predict -w 90 # Analyze last 90 days
# Limit number of commits
maintsight predict -n 5000
# Filter by degradation threshold
maintsight predict -t 0.1 # Show only degraded files
# Generate CSV for Excel
maintsight predict -f csv -o analysis.csv
# Generate standalone HTML report
maintsight predict -f html -o report.html
# Verbose output for debugging
maintsight predict -v
[
{
"module": "src/legacy/parser.ts",
"degradation_score": 0.3456,
"raw_prediction": 0.3456,
"risk_category": "severely_degraded"
},
{
"module": "src/utils/helpers.ts",
"degradation_score": -0.1234,
"raw_prediction": -0.1234,
"risk_category": "improved"
}
]
module,degradation_score,raw_prediction,risk_category
"src/legacy/parser.ts","0.3456","0.3456","severely_degraded"
"src/utils/helpers.ts","-0.1234","-0.1234","improved"
Generates a comprehensive report with:
Always generated automatically in .maintsight/ folder with:
| Score Range | Category | Description | Action |
|---|---|---|---|
| < 0.0 | 🟢 Improved | Code quality improving over time | Continue good practices |
| 0.0-0.1 | 🔵 Stable | Code quality stable | Regular maintenance |
| 0.1-0.2 | 🟡 Degraded | Code quality declining | Schedule for refactoring |
| > 0.2 | 🔴 Severely Degraded | Rapid quality decline | Immediate attention needed |
maintsight predictAnalyze repository and predict maintenance degradation.
maintsight predict [path] [options]
Options:
-b, --branch <branch> - Git branch to analyze (default: "main")-n, --max-commits <n> - Maximum commits to analyze (default: 10000)-w, --window-size-days <n> - Time window in days for analysis (default: 150)-o, --output <path> - Output file path-f, --format <fmt> - Output format: json|csv|markdown|html (default: "json")-t, --threshold <n> - Degradation threshold filter (show files above this score)-v, --verbose - Verbose outputmaintsight helpShow help information.
maintsight help
MaintSight uses an XGBoost model trained on software maintenance degradation patterns. The model predicts how code quality changes over time by analyzing git commit patterns and code evolution metrics.
The model considers multiple dimensions of code evolution:
# Clone repository
git clone https://github.com/techdebtgpt/maintsight.git
cd maintsight-cli
# Install dependencies
npm install
# Build project
npm run build
# Run in development mode
npm run cli:dev predict ./test-repo
maintsight-cli/
├── src/
│ ├── services/ # Core services
│ │ ├── git-commit-collector.ts
│ │ ├── feature-engineer.ts
│ │ └── xgboost-predictor.ts
│ ├── interfaces/ # TypeScript interfaces
│ │ ├── risk-prediction.interface.ts
│ │ ├── risk-category.enum.ts
│ │ └── ...
│ ├── utils/ # Utilities
│ │ └── simple-logger.ts
│ └── index.ts # Main exports
├── cli/
│ ├── commands/ # CLI commands
│ │ └── predict.command.ts
│ ├── utils/ # CLI utilities
│ │ └── html-generator.ts
│ └── maintsight-cli.ts # CLI entry point
├── cli/models/
│ └── xgboost-model.json # XGBoost model
└── tests/ # Test files
# Run all tests
npm test
# Run with coverage
npm run test:cov
# Run specific test
npm test -- git-commit-collector.spec.ts
# Watch mode
npm run test:watch
We welcome contributions! Please see our Contributing Guide for details.
git checkout -b feature/amazing-feature)npm test)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)Found a bug? Please open an issue with:
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Made with ❤️ by the TechDebtGPT Team
FAQs
AI-powered maintenance risk predictor for git repositories using XGBoost
We found that @techdebtgpt/maintsight demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.