Back to Eliza

GitHub Plugin

packages/docs/plugin-registry/platform/github.md

2.0.12.4 KB
Original Source

The GitHub plugin connects Eliza agents to GitHub, enabling interactions with repositories, issues, pull requests, and other GitHub resources.

Package: @elizaos/plugin-github

Note: GitHub is categorized as a feature plugin in the registry, not a connector. It provides repository management, issue tracking, and PR workflows.

Installation

bash
eliza plugins install @elizaos/plugin-github

Setup

1. Create a GitHub Personal Access Token

  1. Go to github.com/settings/tokens
  2. Click Generate new token (classic) or Fine-grained token
  3. Select the scopes needed for your use case (e.g., repo, issues, pull_requests)
  4. Copy the generated token

2. Configure Eliza

json
{
  "connectors": {
    "github": {
      "apiToken": "YOUR_API_TOKEN",
      "owner": "YOUR_GITHUB_OWNER",
      "repo": "YOUR_GITHUB_REPO"
    }
  }
}

Or via environment variables:

bash
export GITHUB_API_TOKEN=YOUR_API_TOKEN
export GITHUB_OWNER=YOUR_GITHUB_OWNER
export GITHUB_REPO=YOUR_GITHUB_REPO

Configuration

FieldRequiredDescription
apiTokenYesGitHub personal access token
ownerNoDefault GitHub repository owner (username or organization)
repoNoDefault GitHub repository name
branchNoDefault branch name (defaults to main)
appIdNoGitHub App ID for app-based authentication
appPrivateKeyNoGitHub App private key for app-based authentication
installationIdNoGitHub App installation ID
webhookSecretNoSecret for validating GitHub webhook payloads
enabledNoSet false to disable (default: true)

Environment Variables

VariableRequiredDescription
GITHUB_API_TOKENYesGitHub personal access token (primary auto-enable trigger)
GITHUB_OWNERNoDefault repository owner (username or organization)
GITHUB_REPONoDefault repository name
GITHUB_BRANCHNoDefault branch name
GITHUB_APP_IDNoGitHub App ID (for GitHub App authentication)
GITHUB_APP_PRIVATE_KEYNoGitHub App private key
GITHUB_INSTALLATION_IDNoGitHub App installation ID
GITHUB_WEBHOOK_SECRETNoSecret for webhook signature verification