GitHub Action

Mention Nib on an issue or pull request, or run a prompt on a schedule, and it works on a branch, reports progress in a comment, and opens or updates a pull request.

The Nib GitHub Action runs the agent inside your GitHub Actions workflows. Mention @nib in an issue or pull request comment, or give the action a prompt to run on a schedule. Nib works on a branch, keeps a live progress comment, and opens or updates a pull request. It works with any provider whose API key you store as a repository secret.

Quick start

Add a workflow:

.github/workflows/nib.yml
name: Nib
on:
  issue_comment: { types: [created] }
  pull_request_review_comment: { types: [created] }
  pull_request_review: { types: [submitted] }
  issues: { types: [opened, assigned] }

permissions:
  contents: write
  pull-requests: write
  issues: write

jobs:
  nib:
    runs-on: ubuntu-latest
    timeout-minutes: 45
    steps:
      - uses: actions/checkout@v5
        with: { fetch-depth: 0 }
      - uses: nibapp/nib-action@v0
        with:
          # The commands the agent may run, such as your tests and linter (see below).
          allowed_tools: Bash(bun test:*), Bash(bun run lint:*)
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          # or OPENAI_API_KEY, GEMINI_API_KEY, OPENROUTER_API_KEY, DEEPSEEK_API_KEY, ZAI_API_KEY, …

Then comment on an issue or pull request:

@nib add a changelog entry for this fix

Nobody can approve anything during a workflow run. With the default permission_mode (acceptEdits), the agent edits files but runs only the commands allowed_tools allows, so list your project's checks there, in your own commands (rule syntax). Whatever it was refused is named in its final comment.

Scheduled and automated runs

With prompt set, the action runs on any event, without a mention:

on:
  schedule: [{ cron: "0 6 * * 1" }]
jobs:
  deps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: nibapp/nib-action@v0
        with:
          prompt: Update outdated dev dependencies, run the tests, and summarize what changed.
          allowed_tools: Bash(bun install:*), Bash(bun test:*)
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

What happens on a trigger

  1. Detect. The action runs on a new comment, inline review comment or review that mentions the trigger phrase as a whole word (@nib, not a longer handle that starts with it), on an issue or pull request opened with the mention (for pull requests, add pull_request: { types: [opened] } to on:), and on an issue assigned to assignee_trigger. Editing a comment never starts a run: put the mention in a new comment. The request is the comment with the mention removed.
  2. Authorize. Whoever started the run is checked: the comment's author for a mention, else the event's sender. A person needs write access to the repository (admin, maintain or write), as GitHub's collaborator permission reports it; a bot must be listed in allowed_bots. An event that names nobody doesn't run. With prompt set, the author of the issue or pull request the event carries is held to the same rule, since the agent reads its title and body. A run the workflow starts itself (schedule, workflow_dispatch) with prompt is the repository's own: whoever its event names isn't checked, person or bot, since only someone with write access can change the workflow or dispatch it. Nib never reacts to its own comments.
  3. Acknowledge. It adds an "eyes" reaction to the comment and posts a progress comment showing the agent's todo list and current step, edited as work goes on.
  4. Branch. On a pull request from the same repository, it works on the pull request's branch. On an issue, it creates the branch <branch_prefix>issue-<n>-<id>; on an automated run with no issue or pull request, <branch_prefix>task-<id>. Pull requests from forks run read-only: Nib can answer and review, but not push.
  5. Run. It starts a private Nib daemon for the job and registers every provider whose key is in the environment. Keys are passed by reference and never written to disk or logs.
  6. Deliver. It commits what the agent left uncommitted, pushes, and opens a pull request or updates the existing one, with Closes #n for issues. The progress comment becomes the final answer, with the pull request link, branch, model, duration and cost. A run that fails or reaches timeout_minutes still delivers the work it left: a new pull request starts by saying the run didn't finish and why, and the progress comment says it failed or timed out.

Inputs

InputDefaultMeaning
trigger_phrase@nibThe mention that starts Nib
promptRun with this instruction on any event
modelBest availableprovider:model, such as anthropic:claude-sonnet-5-5, or a model id
github_token${{ github.token }}Token for comments, pushes and pull requests
permission_modeacceptEditsdefault, acceptEdits, plan, auto, bypassPermissions or dontAsk. Choosing bypassPermissions here is your acceptance of what bypass does, for this run
allowed_tools, disallowed_toolsPermission rules, one per line or comma-separated
max_turns40Maximum model turns
effortThe model'sReasoning effort: none, minimal, low, medium, high, xhigh or max
max_budget_usdStop the run once it has spent this much
settingsSettings for this run, a file path or JSON, like --settings
mcp_configMCP servers for this run, a file path or JSON, like --mcp-config
branch_prefixnib/Prefix for new branches
base_branchThe pull request's base, or the default branchBase for new pull requests
append_system_promptExtra instructions for the agent
allowed_botsBots allowed to trigger Nib (* for all)
assignee_triggerRun when an issue is assigned to this user
timeout_minutes30Stop the agent after this long
languageEnglishLanguage of the progress comment, the agent's reply in it and the session title: a supported language's tag, such as ru

Outputs

OutputValue
conclusionsuccess, failure or skipped
session_idThe Nib session
branchThe branch Nib worked on
pr_urlThe pull request it opened or updated
comment_urlThe progress comment
reasonWhy the run was skipped or failed; empty on success

Notes

  • Permissions. contents: write and pull-requests: write let Nib push and open pull requests; issues: write lets it comment.
  • CI on Nib's pull requests. Pushes made with GITHUB_TOKEN don't trigger other workflows. To run CI on Nib's pull requests, pass a GitHub App token or a personal access token as github_token.
  • Commit author. Commits are authored as github-actions[bot] unless the workflow sets a git identity.
  • GitHub Enterprise Server works without extra configuration.
  • Runners. Linux and macOS, x64 or arm64. Each action version installs the nib release of the same version and checks its SHA-256 before running it. @v0 follows the latest 0.x release; pin an exact tag such as @v0.2.0 to stay on one version.

Next

On this page