A comprehensive tool that scans top GitHub repositories based on keywords, analyzes their contribution status, and generates detailed technical reports for each repository.
- π Repository Discovery: Search top repositories by keywords using GitHub API
- π Contribution Analysis: Automatically classify repositories by contribution acceptance
- π Technical Reporting: Generate detailed reports for technical professionals
- π§ Email Delivery: Automated report distribution via email
- β‘ Rate Limiting: Smart API usage with caching and rate limiting
- π― Contribution Scoring: Advanced algorithm to score contribution opportunities
- π± Rich CLI Interface: Beautiful command-line interface with progress tracking
Beautiful command-line interface with real-time progress tracking
Smart categorization of repositories by contribution readiness
Comprehensive HTML reports delivered directly to your inbox
Watch the demo video to see the agent in action!
# Clone the repository
git clone <your-repo-url>
cd "Github Agent"
# Install dependencies
pip install -r requirements.txt
-
Get a GitHub Personal Access Token:
- Go to GitHub Settings β Developer settings β Personal access tokens
- Generate a new token with
public_repo
scope - Copy the token
-
Set up Email Credentials:
- For Gmail, enable 2FA and create an App Password
- For other providers, get SMTP credentials
-
Create Environment File:
cp .env.example .env
Edit
.env
with your credentials:GITHUB_TOKEN=ghp_your_github_token_here EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 [email protected] EMAIL_PASSWORD=your_app_password_here
# Analyze machine learning repositories
python main.py --keyword "machine learning" --email "[email protected]"
# Customize search parameters
python main.py -k "web development" -e "[email protected]" --max-repos 30 --min-stars 500
import asyncio
from src.github_agent import GitHubAnalysisAgent
async def main():
agent = GitHubAnalysisAgent()
analyses = await agent.analyze_repositories(
keyword="python",
recipient_email="[email protected]"
)
# Print results
for analysis in analyses[:5]:
print(f"{analysis.full_name} - Score: {analysis.contribution_score}/100")
asyncio.run(main())
- Summary Dashboard: Overview of all analyzed repositories
- Contribution Status Distribution: Visual breakdown of repository categories
- Top Opportunities: Highest-scoring repositories for contributions
- Individual Reports: Detailed analysis for each repository
- β Contribution Readiness Score (0-100)
- π― Specific Recommendations based on repository status
- π Getting Started Guide with step-by-step instructions
- π§ Technical Requirements and setup complexity
- π Maintainer Activity and response time estimates
- π·οΈ Issue Labels for beginners (good-first-issue, help-wanted)
- π Contributing Guidelines analysis
Github Agent/
βββ src/
β βββ github_agent/
β β βββ __init__.py # Main agent class
β β βββ api_client.py # GitHub API wrapper
β β βββ analyzer.py # Repository analysis logic
β β βββ report_generator.py # HTML report generation
β β βββ email_sender.py # Email functionality
β βββ config/
β βββ settings.py # Configuration management
βββ main.py # CLI interface
βββ example.py # Usage examples
βββ requirements.txt # Python dependencies
βββ .env.example # Environment template
βββ README.md # This file
The agent classifies repositories into four categories:
-
π’ Actively Accepting (Score: 70-100)
- Has contributing guidelines
- Good first issues available
- Recent commit activity
- Active maintainer responses
-
π‘ Limited Scope (Score: 40-69)
- Some contribution opportunities
- Moderate activity
- May have specific requirements
-
π΄ Not Accepting (Score: 0-39)
- No clear contribution process
- Low activity
- Minimal documentation
-
βͺ Archived/Inactive (Score: N/A)
- Archived repositories
- No recent activity
Environment variables you can set in .env
:
# Required
GITHUB_TOKEN=your_token
EMAIL_HOST=smtp.gmail.com
[email protected]
EMAIL_PASSWORD=your_password
# Optional
EMAIL_PORT=587 # SMTP port (default: 587)
MAX_REPOSITORIES=50 # Max repos to analyze (default: 50)
MIN_STARS=100 # Minimum stars filter (default: 100)
from src.github_agent.analyzer import RepositoryAnalyzer
from src.github_agent.api_client import GitHubAPIClient
# Analyze specific repositories
analyzer = RepositoryAnalyzer()
api_client = GitHubAPIClient()
# Custom search parameters
repositories = await api_client.search_repositories(
keyword="rust programming",
sort="updated"
)
keywords = ["machine learning", "web development", "data science"]
email = "[email protected]"
for keyword in keywords:
await agent.analyze_repositories(keyword, email)
π GitHub Repository Analysis Agent
Keyword: machine learning
Email: [email protected]
Max Repositories: 20
Min Stars: 100
π Found 20 repositories to analyze
β
Analysis complete! Reports sent to [email protected]
β
Analysis Complete!
βββββββββββββββββββ¬ββββββββ¬βββββββββββββ
β Status β Count β Percentage β
βββββββββββββββββββΌββββββββΌβββββββββββββ€
β Actively Accept β 12 β 60.0% β
β Limited Scope β 5 β 25.0% β
β Not Accepting β 2 β 10.0% β
β Archived Inact β 1 β 5.0% β
βββββββββββββββββββ΄ββββββββ΄βββββββββββββ
β Top Repositories by Contribution Score:
1. β
scikit-learn/scikit-learn - Score: 95/100
β 52,847 stars β’ π΄ 23,495 forks β’ π― 45 good first issues
2. β
tensorflow/tensorflow - Score: 88/100
β 176,543 stars β’ π΄ 88,432 forks β’ π― 23 good first issues
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
-
GitHub API Rate Limiting:
- The tool automatically handles rate limits
- Use a personal access token for higher limits
-
Email Authentication Errors:
- For Gmail, use an App Password, not your regular password
- Enable 2FA first, then generate an App Password
-
Missing Dependencies:
pip install --upgrade pip pip install -r requirements.txt
-
Environment Variables Not Loading:
- Ensure
.env
file is in the project root - Check for typos in variable names
- Ensure
For issues and questions:
- Create an issue on GitHub
- Check existing issues for solutions
- Review the example.py file for usage patterns