git-repo-analyzer-test
v1.0.28
Published
A comprehensive Node.js tool for analyzing GitHub repositories across four critical dimensions: **Code Quality**, **Vulnerabilities**, **Code Review Practices**, and **Performance**.
Downloads
2,235
Readme
Git Repository Analyzer
A comprehensive Node.js tool for analyzing GitHub repositories across four critical dimensions: Code Quality, Vulnerabilities, Code Review Practices, and Performance.
Features
- 📈 Code Quality Analysis: Evaluate repository health through stars, forks, issues, documentation, and activity metrics
- 🔒 Security & Vulnerability Assessment: Identify potential security risks and recommend safeguards
- 👥 Code Review & Collaboration Metrics: Analyze pull request patterns, review velocity, and team collaboration
- ⚡ Performance & Release Analysis: Track release frequency, development velocity, and code frequency patterns
- 📊 Comprehensive Reports: Generate detailed reports with actionable recommendations
- 🔄 Batch Analysis: Analyze multiple repositories in one operation
Installation
- Clone or download the repository
- Install dependencies:
npm install- (Optional) Configure GitHub token for authenticated requests:
npm run analyze -- configCreate a .env file in the root directory:
GITHUB_TOKEN=your_github_personal_access_tokenUsage
Analyze a Single Repository
npm run analyze -- analyze owner/repo-nameExample:
npm run analyze -- analyze facebook/reactSave Report to File
npm run analyze -- analyze owner/repo-name --output ./reports/report.jsonAnalyze Multiple Repositories
Create a file repos.txt with one repository per line:
facebook/react
torvalds/linux
kubernetes/kubernetes
nodejs/nodeThen run:
npm run analyze -- batch repos.txt --output-dir ./reportsView Configuration
npm run analyze -- configReport Sections
1. Code Quality
- Stars, forks, watchers
- Open issues count
- Primary language and languages used
- Days since last update
- Documentation presence
- Topics and tags
2. Security & Vulnerability
- Risk level assessment (Critical, High, Medium, Low)
- Risk factors identification
- Security feature status
- Maintenance status
- Actionable recommendations
3. Code Review & Collaboration
- Pull request metrics (total, open, merged, closure rate)
- Average review time
- Contributor count
- Commit patterns and unique authors
- Review velocity analysis
4. Performance & Release
- Release frequency and patterns
- Development velocity trends
- Code activity analysis
- Weekly additions and deletions
- Release cadence recommendations
Environment Variables
GITHUB_TOKEN: Personal access token for authenticated API requests (increases rate limit from 60 to 5000 requests/hour)
API Rate Limits
- Without token: 60 requests per hour (IP-based)
- With token: 5000 requests per hour (user-based)
Project Structure
src/
├── index.js # Main entry point
├── cli.js # Command-line interface
├── github/
│ └── client.js # GitHub API client
├── analyzers/
│ ├── quality.js # Code quality analyzer
│ ├── vulnerability.js # Security analyzer
│ ├── codeReview.js # Code review analyzer
│ └── performance.js # Performance analyzer
└── report/
└── generator.js # Report generationExample Output
📊 GitHub Repository Analysis Report
Repository: facebook/react
Generated: 2/10/2026, 10:30:45 AM
🎯 Overall Score: 92/100
[████████████████████░░░░░░]
📈 Code Quality Analysis
Quality Score: 95/100
┌────────────────────┬─────────┐
│ Metric │ Value │
├────────────────────┼─────────┤
│ Stars │ 215000 │
│ Forks │ 44000 │
│ Open Issues │ 1200 │
└────────────────────┴─────────┘
[Additional sections for security, code review, and performance...]Technologies Used
- axios: HTTP client for API requests
- commander: CLI framework
- chalk: Terminal colors
- table: Formatted table output
- dotenv: Environment variable management
Error Handling
The analyzer handles various error scenarios:
- Invalid repository format
- Network errors
- API rate limit exceeded
- Repository not found
- Insufficient permissions
Contributing
Feel free to submit issues and enhancement requests!
License
MIT License - See LICENSE file for details
Support
For issues, questions, or suggestions, please open an issue in the repository.
