Skip to main content

AI-powered GitHub contribution forecasting and automation agent

Project description


# 📈 Contribcast

**AI-powered GitHub contribution forecasting, issue suggestion, and productivity assistant — straight from your terminal.**

---

## 🚀 What is Contribcast?

`contribcast` is a Python CLI tool that helps developers:

- Forecast and visualize their GitHub contributions 📊  
- Get weekly reflection and motivational insights from AI 🧠  
- Discover trending beginner-friendly issues tailored to your stack 🔍  
- Automatically draft and submit PRs to practice contributing 💻  
- Schedule Slack reminders and generate dynamic README.md files 📝  
- Empower both beginner and advanced developers to stay consistent

Whether you're new to open source or a seasoned contributor, Contribcast keeps your contribution game strong, organized, and automated.

---

## 📦 Features at a Glance

| Category | Features |
|----------|----------|
| 📊 Analytics | `--forecast`, `--heatmap`, `--streak`, `--weekly-summary`, `--compare` |
| 🧠 Smart AI Insights | `--reflect`, `--goal`, `--suggest`, `--domain ai/react`, `--generate-readme` |
| 🔍 Issue Discovery | `--suggest-issue`, `--auto-pr`, `--domain`, `--schedule-weekly` |
| 🛠️ Productivity | `--export-csv`, `--export-json`, `--save-heatmap`, `--notify-user` |
| 🤖 Automation | Draft PRs to GitHub issues, generate README.md using AI |
| 💬 Team Tools | Slack DM fallback, weekly drops to your team’s Slack channel |

---

## ✅ Requirements

- **Python 3.11+**
- A GitHub personal access token with `repo` scope
- An OpenAI API key
- A Slack bot token (if using Slack integration)

---

## 🔐 Environment Variables

Before using Contribcast, create a `.env` file or export these in your terminal:

```bash
export GITHUB_TOKEN=ghp_your_token_here
export GITHUB_USERNAME=your_github_username
export OPENAI_API_KEY=sk-proj-7p0_STw-Dp
export SLACK_BOT_TOKEN=xoxb-your-slack-token
export SLACK_CHANNEL=#your-slack-channel
export WHATSAPP_TO=whatsapp:+234xxxxxxxxxx  # Optional
export TWILIO_SID=your_twilio_sid
export TWILIO_AUTH=your_twilio_auth_token

🔧 Installation

git clone https://github.com/adesoji1/contribcast.git
cd contribcast
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

To run globally (optional):

pip install .

or

pip install contribcast

🧠 Examples

Forecast Contributions

contribcast githubusername--forecast

Visualize Your GitHub Heatmap

contribcast githubusername--heatmap

Get Weekly Reflection from AI

contribcast githubusername--reflect --notify-user @adesoji

Discover Trending Issues + Auto PR

contribcast githubusername--suggest-issue --auto-pr auto

Generate README for Your Local Project

contribcast githubusername--generate-readme

Compare Contributions between 2 different github ussers

contribcast adesoji1 --compare malcolmtomisin

👤 GitHub Username: adesoji1
📅 Contributions so far: 424


📊 Comparing adesoji1 vs malcolmtomisin

Total Contributions: adesoji1 = 424 | malcolmtomisin = 168
Forecasted Yearly:  adesoji1 = 1406 | malcolmtomisin = 557
Current Streak:     adesoji1 = 3 days | malcolmtomisin = 1 days
Longest Streak:     adesoji1 = 9 days | malcolmtomisin = 5 days  ,   

Replace adesoji1 and malcolmtomisin with your 2 different GitHub usernames.

Other CLI Commands

contribcast githubusername --forecast
contribcast githubusername --heatmap
contribcast githubusername --save-heatmap
contribcast githubusername --weekly-summary
contribcast githubusername --streak
contribcast githubusername --compare someoneelse
contribcast githubusername --suggest

🧠 Why Contribcast?

🔥 For New Developers:

  • Discover beginner-friendly issues in trending repos
  • Automatically generate your first PRs with guidance
  • Get motivational nudges to build consistency

💼 For Experienced Developers:

  • Monitor contribution trends across your team
  • Automate contribution goals with AI planning
  • Save time with weekly Slack drops and batch automation

🗓️ Optional: Schedule Weekly Suggestions

Run once (e.g. with cron or tmux):

python3 contribcast/scheduler.py

This sends weekly issue suggestions to your Slack every Monday at 09:00 AM.


📚 See All CLI Commands

contribcast githubusername--commands

🧪 Testing Your Setup

To validate that everything works:

contribcast githubusername--forecast
contribcast githubusername--suggest-issue --auto-pr auto
contribcast githubusername--generate-readme

If these commands succeed, you're all set, don't forget to replace githubusernamewith your github username, !


🧠 Powered By


💡 Future Roadmap

  • Auto-plan contributions weekly
  • Multi-user comparison dashboard
  • GitHub Action integration
  • Telegram notifications
  • VSCode extension for inline usage

✨ Author

Made with ❤️ by Adesoji Alu

Feel free to contribute or fork. Keep contributing and cast your commit spells 🧙🏽‍♂️✨


📜 License

MIT License

Copyright (c) 2025 Adesoji Alu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


ERRORS

You might be faced with openai.RateLimitError: Error code: 429 , slack or whatsapp token error if you pass in the wrong credentials

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contribcast-0.1.1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contribcast-0.1.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file contribcast-0.1.1.tar.gz.

File metadata

  • Download URL: contribcast-0.1.1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for contribcast-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0003ad90c11a6c6d98bfe5bd9909e053cc04e256e95dcb6facbb3158b24ed5de
MD5 c80c247866a0673aed9e7610d7c1775b
BLAKE2b-256 71a5bf882b4a8660ab0859855893342fb5f9830aaebd52e4d719b650c2a772fc

See more details on using hashes here.

File details

Details for the file contribcast-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: contribcast-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for contribcast-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c41c3f890e4731e975f6017a85a918f8eb5963b1c43c19972c4d89635e13a772
MD5 85fba8b622dc3d3137f181b9eeed520d
BLAKE2b-256 5741c10f78147f3722ed060aebee573acfb8ceab3778076f468d4e83480c1190

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page