autopr-slack
v0.1.2
Published
Zero-clone autonomous AI Developer setup for Slack & GitHub Actions
Maintainers
Readme
AutoPR Slack AI — Autonomous AI Developer
AutoPR Slack AI is a zero-clone, serverless autonomous AI developer pipeline. It turns natural language task requests from Slack or Telegram into tested, production-grade GitHub Pull Requests in seconds.
No manual cloning, no local Python environment setup, and zero runner compute costs on your central repository. Everything executes directly inside your target repository's GitHub Actions runner using the Google Antigravity Engine (agy) and Graphify AST indexing.
⚡ 1-Command Quickstart (Zero-Clone Setup)
You do not need to clone this repository. Run the setup wizard from any directory:
npx autopr-slack(or npx autopr-slack init)
The interactive wizard configures your autonomous developer pipeline in 5 guided steps:
╔═══════════════════════════════════════════════════════════════╗
║ ║
║ ⚡ AutoPR Slack AI — Autonomous AI Developer ║
║ Zero-Clone Edge & GitHub Actions Setup Wizard ║
║ ║
╚═══════════════════════════════════════════════════════════════╝
[1/5] Diagnostics & Target Repository Resolution
✔ Node.js Runtime: v22.x
✔ Git CLI & GitHub CLI (gh) authenticated
✔ Target Repository: your-org/your-repo
[2/5] Workflow Selection & Installation
✔ Installs .github/workflows/autopr.yml (PyPI uvx, reusable, or standalone)
✔ Pushes workflow directly to your remote repository via GitHub API
[3/5] Cloudflare Worker Fast-Path Deployment
✔ Deploys serverless edge webhook via Wrangler (zero idle server costs)
✔ Output endpoint: https://autopr-your-repo.subdomain.workers.dev
[4/5] 1-Click Slack App Manifest Generation
✔ Generates slack-app-manifest.json with pre-configured /code slash commands,
event subscriptions, and bot scopes
[5/5] Secrets Provisioning
✔ Automatically provisions PAT_TOKEN, SLACK_BOT_TOKEN, and AGY_AUTH_CONFIG
directly to GitHub and Cloudflare📖 End-to-End Setup Instructions (Start to Finish)
Step 1: Run the Setup Wizard
Inside your terminal, execute:
npx autopr-slackThe wizard will prompt you for:
- GitHub Workflow Target Repository:
owner/repo(auto-detected if inside a git repository). - Workflow Installation Mode: PyPI
uvx(recommended), Reusable caller, or Standalone. When authenticated withgh, the wizard automatically pushes the workflow to your remote repository. - Cloudflare Worker Name: Custom name or default
autopr-<repo>. - GitHub Personal Access Token (PAT): Classic token with
repoandworkflowscopes. - Gemini API Key / Antigravity Config: For intent classification and engine reasoning.
Step 2: Create the Slack App (1-Click Manifest)
The wizard creates slack-app-manifest.json in your current working directory.
- Go to api.slack.com/apps and click Create New App.
- Select From an app manifest.
- Choose your Slack workspace.
- Open
slack-app-manifest.json, copy its entire content, and paste it into Slack. - Click Create, then click Install to Workspace.
- Copy both your Bot User OAuth Token (
xoxb-...) and Signing Secret back into the terminal wizard (or configure vianpx autopr-slack secrets).
Step 3: Invite Bot to Your Slack Channel
In your Slack workspace:
- Open the channel where you want the bot to operate (e.g.
#dev-teamor#eng-prs). - Type
/invite @AutoPR AI(or mention@AutoPR AIand click Add to Channel).
Step 4: Issue Commands & Watch PRs Open Automatically
Type a slash command directly in Slack:
/code Add Redis caching to the get_user_profile endpointOr target any repository dynamically:
/code org/api-gateway Fix race condition in authentication token refreshWhat happens next:
- Sub-second Edge Acknowledgement: Cloudflare Worker validates the request in
<50msand replies in your Slack thread with a progress indicator. - Intent & Repository Resolution: Gemini extracts repository targets, branches, and task constraints.
- Graphify AST Indexing: Actions runner constructs an AST knowledge graph of the target repository, reducing token overhead by up to 50%.
- Antigravity AI Engine (
agy): Generates precision code diffs, runs test suites, and verifies fixes with zero regressions. - Verified PR Created: Pushes a new feature branch, opens a GitHub Pull Request, and posts the PR link and AI summary directly back into your Slack thread.
🛠️ CLI Subcommands & Tooling
In addition to the master wizard, you can run individual modules on demand:
| Command | Description |
| :--- | :--- |
| npx autopr-slack init | Runs the full 5-step interactive setup wizard. |
| npx autopr-slack workflow | Injects the GitHub Actions workflow into the target repository. |
| npx autopr-slack deploy-worker | Builds and deploys the Cloudflare Worker serverless edge webhook. |
| npx autopr-slack manifest | Generates a 1-click Slack App Manifest JSON file. |
| npx autopr-slack secrets | Configures GitHub repository secrets via gh CLI. |
| npx autopr-slack check | Runs system diagnostics and preflight credential checks. |
🐍 Python Engine via PyPI (uvx)
The core execution engine is also published on PyPI as github-automation-ai:
# Run the automation engine on-demand anywhere without installing:
uvx --from github-automation-ai autopr
# Or test preflight target resolution locally:
uvx --from github-automation-ai python -m automation.preflight --prompt "org/repo Fix auth token refresh"🏛️ System Architecture
+---------------------+
| Slack / Telegram |
| (Slash Command) |
+----------+----------+
| Webhook HTTP POST
v
+---------------------+
| Cloudflare Worker | <-- Sub-50ms Fast-Path & Gemini Intent Parsing
+----------+----------+
| Repository Dispatch API Event
v
+---------------------+
| GitHub Actions VM | <-- Executes on YOUR Repository Runner
| (Autonomous Engine) |
| |
| ├── 1. Restore Antigravity Session (AGY_AUTH_CONFIG)
| ├── 2. Preflight Target Resolution (automation/preflight.py)
| ├── 3. Graphify AST Knowledge Graph Indexing (Cuts tokens by 50%)
| ├── 4. Google Antigravity Execution (agy run -y "$PROMPT")
| ├── 5. Automated Unit Testing & Lint Validation
| └── 6. GitHub Pull Request Creation (gh pr create)
+----------+----------+
| Execution Result Callback
v
+---------------------+
| Slack Thread Reply | <-- Posts PR URL & AI Summary back to thread
+---------------------+🔐 Environment & Security Configuration
All sensitive keys remain strictly inside your private GitHub Repository Secrets and Cloudflare Worker environment:
| Secret Name | Purpose |
| :--- | :--- |
| PAT_TOKEN | GitHub Personal Access Token (Classic) with repo and workflow scopes. |
| SLACK_BOT_TOKEN | Slack Bot User OAuth Token (xoxb-...) for posting threaded replies. |
| SLACK_SIGNING_SECRET | Slack Signing Secret for cryptographic webhook signature verification. |
| AGY_AUTH_CONFIG | Base64-encoded session configuration file (~/.gemini/config) for Google Antigravity CLI. |
| GEMINI_API_KEY | Optional Gemini API Key used for fast edge intent classification and repository resolution. |
🤝 Contributing
- Fork the repository and create a feature branch (
git checkout -b feat/your-feature). - Follow Clean Architecture and PEP 8 conventions.
- Run tests with
uv run pytest. - Open a Pull Request detailing the changes and verification steps.
📄 License
This project is licensed under the MIT License.
