Installation
Install the AFA Gate Check GitHub App on your repositories.
Installation
Install from GitHub Marketplace
- Go to github.com/apps/afa-gate-check
- Click Install
- Choose which repositories to enable (all or selected)
- Authorize the app
AFA starts analyzing PRs immediately after installation. No additional configuration is required.
Permissions
The app requests these GitHub permissions:
| Permission | Access | Reason |
|---|---|---|
| Pull requests | Read | Fetch PR diffs for analysis |
| Checks | Write | Post Check Run results |
| Contents | Read | Access file contents for context |
Repository configuration
Optionally add a .afa.yaml to your repository root:
version: "1.0"
model:
provider: gemini
model: gemini-3-flash-preview
analysis:
languages:
- python
- typescript
exclude:
- "tests/**"
- "vendor/**"
- "docs/**"
- "migrations/**"Without a config file, AFA uses defaults: Anthropic provider, Python + TypeScript, standard exclusion patterns.
Linking to your AFA account
If you have an AFA account (via the portal at portal.undercurrentholdings.com), the GitHub App installation is automatically linked to your customer record. This enables:
- Usage tracking against your tier quota
- Tier-appropriate rate limits
- Upgrade prompts when quota is exceeded
Without an account, the app operates under Community tier limits (200 analyses/month, 1 repo).
Self-hosted deployment
For teams running AFA on their own infrastructure:
# Set environment variables
export AFA_GITHUB_APP_ID=<your-app-id>
export AFA_GITHUB_PRIVATE_KEY_PATH=config/github-app.pem
export AFA_GITHUB_WEBHOOK_SECRET=<your-webhook-secret>
export AFA_GITHUB_INSTALLATION_ID=<your-installation-id>
# Start the webhook receiver
uvicorn afa.server.github:github_app --host 0.0.0.0 --port 3000For local development, use smee.io to forward webhooks:
npx smee-client -u https://smee.io/<channel-id> -t http://localhost:3000/webhookDocker Compose
The GitHub App runs as a separate service in Docker Compose:
services:
afa-github-app:
image: undercurrentai/afa:latest
command: uvicorn afa.server.github:github_app --host 0.0.0.0 --port 3000
ports:
- "3000:3000"
environment:
- AFA_GITHUB_APP_ID
- AFA_GITHUB_PRIVATE_KEY_PATH
- AFA_GITHUB_WEBHOOK_SECRET