A powerful Node.js application for fetching and managing GitHub repositories with a focus on AI projects. Built with GitHub Apps integration for secure, high-performance repository access and multiple export formats.
- π GitHub App Integration: Secure authentication using GitHub Apps with private key
- π€ AI Project Filtering: Smart filtering for repositories containing 'ai' in the name
- π Repository Analytics: Comprehensive insights on languages, popularity, age, and activity
- π Rich Metadata: Complete repository information (stars, forks, language, timestamps)
- πΎ JSON Export: Auto-save repository data to timestamped JSON files
- π― Flexible Queries: Fetch all repositories or filter for AI-only projects
- β‘ High Performance: Optimized with GitHub Apps for higher API rate limits
- π οΈ CLI Ready: Perfect for automation, scripts, and CI/CD pipelines
New to RepoFetch? Get started in under 5 minutes!
π Start with docs/QUICKSTART.md - For immediate setup and basic usage
Looking for detailed information? Check out these guides:
- π docs/SETUP.md - Comprehensive setup and configuration guide
- π docs/USAGE.md - Complete usage reference with examples
- π οΈ This README - Project overview and quick reference
Repofetch/
βββ config/ # Configuration files
β βββ fetchreposapp.2025-12-23.private-key.pem
βββ docs/ # Documentation
β βββ QUICKSTART.md # 5-minute setup guide
β βββ SETUP.md # Detailed setup instructions
β βββ USAGE.md # Complete usage reference
β βββ PROJECT_ONBOARDING.md # New contributor guide
β βββ CONTRIBUTING.md # Contribution guidelines
β βββ TODO.md # Development roadmap
βββ scripts/ # Main application scripts
β βββ fetchRepos.js # AI-focused repository fetcher
β βββ get_all_repos.js # Complete repository inventory
β βββ repos_to_json.js # Advanced JSON export tool
β βββ repository_analytics.js # Comprehensive analytics engine
βββ output/ # Generated JSON data
β βββ all_repositories_*.json
β βββ all_repositories_quick_analytics_*.json
β βββ repositories_all_*.json
β βββ repositories_ai-only_*.json
β βββ repositories_both_*.json
β βββ repository_analytics_*.json
βββ package.json # Project configuration
βββ README.md # This file (project overview)
Fetches repositories containing 'ai' in the name with optional JSON export and analytics.
# Standard output
node scripts/fetchRepos.js
# Output: π€ ai-chatbot
# π€ machine-learning-tools
# JSON output
node scripts/fetchRepos.js --json
# or
node scripts/fetchRepos.js -j
# AI Repository Analytics
node scripts/fetchRepos.js --analytics
# or
node scripts/fetchRepos.js -a
# Analytics with JSON export
node scripts/fetchRepos.js --analytics --jsonFetches all accessible repositories with privacy indicators and optional analytics.
# Standard output
node scripts/get_all_repos.js
# Output: π username/repo1
# π username/private-repo
# JSON output
node scripts/get_all_repos.js --json
# or
node scripts/get_all_repos.js -j
# Quick Analytics Report
node scripts/get_all_repos.js --analytics
# or
node scripts/get_all_repos.js -a
# Analytics with JSON export
node scripts/get_all_repos.js --analytics --jsonAdvanced export with multiple format options.
# Export all repositories
node scripts/repos_to_json.js all
# Export only AI repositories
node scripts/repos_to_json.js ai-only
# Export summary + detailed data
node scripts/repos_to_json.js bothComprehensive analytics and insights about your repositories.
# Display formatted analytics report
node scripts/repository_analytics.js
# Export analytics as JSON
node scripts/repository_analytics.js --json
# or
node scripts/repository_analytics.js -j--- Your AI Projects ---
π€ ai-chatbot
π€ machine-learning-tools
π€ ai-image-processor
π€ ai-data-analyzer
{
"total_ai_repositories": 4,
"repositories": [
{
"id": 123456789,
"name": "ai-chatbot",
"full_name": "username/ai-chatbot",
"description": "An intelligent chatbot implementation",
"private": false,
"html_url": "https://github.com/username/ai-chatbot",
"clone_url": "https://github.com/username/ai-chatbot.git",
"ssh_url": "git@github.com:username/ai-chatbot.git",
"language": "Python",
"stargazers_count": 42,
"forks_count": 7,
"open_issues_count": 3,
"size": 1024,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-12-10T14:22:33Z",
"pushed_at": "2024-12-09T16:45:12Z",
"default_branch": "main",
"is_ai_project": true
}
]
}The analytics engine provides comprehensive insights across multiple dimensions:
- Total repositories, AI projects, and regular projects
- Aggregate stars, forks, and open issues
- Average metrics per repository
- Top repositories by popularity metrics
- Repository count by programming language
- Total and average stars per language
- Size distribution across languages
- Most popular and most starred languages
- Top 10 repositories by stars and forks
- Popularity distribution buckets (0, 1-10, 11-50, 51-100, 101-500, 500+ stars)
- Comparative analysis across all repositories
- Repository age distribution
- Recent activity tracking (updates within 30 days, pushes within 7 days)
- Activity percentage and inactive repository identification
- Timeline-based insights
- Storage size analysis and distribution
- Public vs private repository breakdown
- Largest repositories by size
- Privacy distribution statistics
node scripts/repository_analytics.js================================================================================
π REPOSITORY ANALYTICS REPORT
================================================================================
π SUMMARY
Total Repositories: 171
AI Projects: 12
Regular Projects: 159
Total Stars: 1,247
Total Forks: 89
Average Stars per Repo: 7
π» TOP LANGUAGES
JavaScript: 45 repos (26%) - 567 β
Python: 23 repos (13%) - 234 β
TypeScript: 18 repos (11%) - 123 β
HTML: 15 repos (9%) - 89 β
CSS: 12 repos (7%) - 67 β
β TOP STARRED REPOSITORIES
portfolio: 156 β (JavaScript)
ai-chatbot: 89 β (Python)
machine-learning: 67 β (Python)
π
AGE ANALYSIS
Average Age: 18 months
Recently Updated (30 days): 45
Recently Active (7 days): 23
π PRIVACY DISTRIBUTION
Public: 91 (53%)
Private: 80 (47%)
================================================================================
- Node.js (version 14 or higher)
- GitHub App with repository access permissions
- Private key file for GitHub App authentication (located in
config/) - npm (usually comes with Node.js)
octokit(^5.0.5) - GitHub API client for JavaScript
Install dependencies:
npm installThe project comes pre-configured with sample GitHub App credentials:
- App ID:
2501453 - Installation ID:
100314666 - Private Key:
config/fetchreposapp.2025-12-23.private-key.pem
For setting up your own GitHub App, see the detailed guide in docs/SETUP.md.
# Generate portfolio overview
node scripts/repos_to_json.js both > portfolio-report.json# Find all AI projects
node scripts/fetchRepos.js
# Export detailed AI project data
node scripts/repos_to_json.js ai-only > ai-projects.json# Comprehensive repository audit
node scripts/get_all_repos.js --json > full-inventory.json# Generate comprehensive analytics report
node scripts/repository_analytics.js
# Export analytics data for further analysis
node scripts/repository_analytics.js --json > analytics-report.json
# Analyze specific metrics
node scripts/repository_analytics.js --json | jq '.summary.total_stars'# Check repository status in build scripts
if node scripts/fetchRepos.js --json | jq -e '.repositories[] | select(.open_issues_count > 50)' > /dev/null; then
echo "Warning: Some AI projects have >50 open issues"
fiAll JSON outputs are automatically saved to timestamped files in the output/ directory:
ai_repositories_YYYY-MM-DDTHH-MM-SS-sssZ.json(from scripts/fetchRepos.js --json)ai_repositories_analytics_YYYY-MM-DDTHH-MM-SS-sssZ.json(from scripts/fetchRepos.js --analytics)all_repositories_YYYY-MM-DDTHH-MM-SS-sssZ.json(from scripts/get_all_repos.js --json)all_repositories_quick_analytics_YYYY-MM-DDTHH-MM-SS-sssZ.json(from scripts/get_all_repos.js --analytics)repositories_all_YYYY-MM-DDTHH-MM-SS-sssZ.json(from scripts/repos_to_json.js all)repositories_ai-only_YYYY-MM-DDTHH-MM-SS-sssZ.json(from scripts/repos_to_json.js ai-only)repositories_both_YYYY-MM-DDTHH-MM-SS-sssZ.json(from scripts/repos_to_json.js both)repository_analytics_YYYY-MM-DDTHH-MM-SS-sssZ.json(from scripts/repository_analytics.js)
# Fetch and process AI repositories
node scripts/fetchRepos.js --json | jq '.repositories[] | select(.stargazers_count > 10) | .name'
# Count repositories by language
node scripts/repos_to_json.js all | jq '.repositories | group_by(.language) | map({language: .[0].language, count: length})'#!/bin/bash
echo "=== Daily Repository Report ==="
echo "Date: $(date)"
echo
echo "AI Projects:"
node scripts/fetchRepos.js
echo
echo "Repository Statistics:"
node scripts/repos_to_json.js both | jq '.summary'For more advanced examples and integrations, see USAGE.md.
- Check that your private key file exists in the
config/directory and is readable - Verify your GitHub App ID and installation ID
- Ensure your GitHub App has repository access permissions
- Verify you have repositories with 'ai' in the name
- Check that the repositories are accessible to your GitHub App
- Consider case sensitivity in filtering
- GitHub Apps provide higher rate limits than unauthenticated requests
- Consider implementing request throttling for large datasets
For detailed troubleshooting, see SETUP.md.
Want to improve RepoFetch? Here's how to contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly:
node fetchRepos.js - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the project files for details.
- Built with Octokit - GitHub API client
- Inspired by the need for better AI project management
- Thanks to the GitHub Apps documentation and community
Need help? Here's where to find assistance:
- π Documentation: Check docs/SETUP.md and docs/USAGE.md
- π Issues: Report bugs or request features in the project repository
- π¬ Community: Join discussions in the project issues
- π§ Contact: Reach out through the project's contact information
Made with β€οΈ for developers who love AI projects and efficient tooling.
Ready to get started? Jump to docs/QUICKSTART.md for the fastest path to productivity!