AFAdocs
GitHub App

Installation

Install the AFA Gate Check GitHub App on your repositories.

Installation

Install from GitHub Marketplace

  1. Go to github.com/apps/afa-gate-check
  2. Click Install
  3. Choose which repositories to enable (all or selected)
  4. Authorize the app

AFA starts analyzing PRs immediately after installation. No additional configuration is required.

Permissions

The app requests these GitHub permissions:

PermissionAccessReason
Pull requestsReadFetch PR diffs for analysis
ChecksWritePost Check Run results
ContentsReadAccess 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 3000

For local development, use smee.io to forward webhooks:

npx smee-client -u https://smee.io/<channel-id> -t http://localhost:3000/webhook

Docker 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

On this page