AI-powered GitHub assistant that analyzes issues and proposes code fixes automatically.
AlphaPatch is an open-source developer tool that integrates directly with GitHub workflows to:
- 🧠 Understand issues using AI
- 💡 Suggest solutions
- 🛠️ Generate code patches
- 🔁 Open pull requests automatically
- 📌 Issue Analysis
- Classifies issues (bug, feature, question)
- Summarizes problem clearly
- 🤖 AI-Powered Suggestions
- Provides detailed explanations
- Suggests possible fixes
- 🔧 Patch Generation (WIP)
- Generates code diffs
- Prepares pull request drafts
- 🔄 GitHub Integration
- Runs via GitHub Actions
- Automatically comments on new issues
- A new issue is opened
- GitHub Action is triggered
- AlphaPatch:
- Reads the issue
- Analyzes the repository
- Generates a response
- Bot posts a comment or creates a PR
To add AlphaPatch to your repository, use the integration guide and workflow template:
- Copy AlphaPatch into your repo (or vendor it).
- Run
scripts/install.shto create.github/workflows/alphapatch.yml. - Add required secrets (
GEMINI_API_KEY,GEMINI_MODEL). - Open a new issue to trigger AlphaPatch.
See docs/integration.md for a step-by-step setup, required secrets, and permissions.
You can also customize workflow triggers there (issue comments, manual runs, schedules).
name: AlphaPatch
on:
issues:
types: [opened]
permissions:
issues: write
contents: write
pull-requests: write
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run AlphaPatch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LLM_PROVIDER: gemini
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_MODEL: ${{ secrets.GEMINI_MODEL }}
ENABLE_DRAFT_PR: "1"
ENABLE_LABELS: "1"
TEST_COMMAND: ""
TEST_TIMEOUT: "600"
GIT_AUTHOR_NAME: AlphaPatch Bot
GIT_AUTHOR_EMAIL: alphapatch-bot@users.noreply.github.com
GIT_COMMITTER_NAME: AlphaPatch Bot
GIT_COMMITTER_EMAIL: alphapatch-bot@users.noreply.github.com
run: python -m bot.main --repo ${{ github.repository }} --issue ${{ inputs.issue_number || github.event.issue.number || vars.ALPHAPATCH_ISSUE_NUMBER }}
- Issue analysis & response
- Context-aware repo understanding
- Code patch generation
- Auto pull request creation
- Test validation system
- Multi-language support
AlphaPatch does not automatically merge changes.
All generated fixes:
- Require human review
- May be incorrect or incomplete
We welcome contributions!
- Fork the repo
- Create a feature branch
- Submit a pull request
MIT License
AlphaPatch aims to become a lightweight, open-source AI assistant for developers — helping teams resolve issues faster without losing control.


