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:
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 fixNobody 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
- 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, addpull_request: { types: [opened] }toon:), and on an issue assigned toassignee_trigger. Editing a comment never starts a run: put the mention in a new comment. The request is the comment with the mention removed. - 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,maintainorwrite), as GitHub's collaborator permission reports it; a bot must be listed inallowed_bots. An event that names nobody doesn't run. Withpromptset, 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) withpromptis 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. - 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.
- 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. - 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.
- Deliver. It commits what the agent left uncommitted, pushes, and opens a pull request or updates the existing one, with
Closes #nfor issues. The progress comment becomes the final answer, with the pull request link, branch, model, duration and cost. A run that fails or reachestimeout_minutesstill 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
| Input | Default | Meaning |
|---|---|---|
trigger_phrase | @nib | The mention that starts Nib |
prompt | Run with this instruction on any event | |
model | Best available | provider:model, such as anthropic:claude-sonnet-5-5, or a model id |
github_token | ${{ github.token }} | Token for comments, pushes and pull requests |
permission_mode | acceptEdits | default, acceptEdits, plan, auto, bypassPermissions or dontAsk. Choosing bypassPermissions here is your acceptance of what bypass does, for this run |
allowed_tools, disallowed_tools | Permission rules, one per line or comma-separated | |
max_turns | 40 | Maximum model turns |
effort | The model's | Reasoning effort: none, minimal, low, medium, high, xhigh or max |
max_budget_usd | Stop the run once it has spent this much | |
settings | Settings for this run, a file path or JSON, like --settings | |
mcp_config | MCP servers for this run, a file path or JSON, like --mcp-config | |
branch_prefix | nib/ | Prefix for new branches |
base_branch | The pull request's base, or the default branch | Base for new pull requests |
append_system_prompt | Extra instructions for the agent | |
allowed_bots | Bots allowed to trigger Nib (* for all) | |
assignee_trigger | Run when an issue is assigned to this user | |
timeout_minutes | 30 | Stop the agent after this long |
language | English | Language of the progress comment, the agent's reply in it and the session title: a supported language's tag, such as ru |
Outputs
| Output | Value |
|---|---|
conclusion | success, failure or skipped |
session_id | The Nib session |
branch | The branch Nib worked on |
pr_url | The pull request it opened or updated |
comment_url | The progress comment |
reason | Why the run was skipped or failed; empty on success |
Notes
- Permissions.
contents: writeandpull-requests: writelet Nib push and open pull requests;issues: writelets it comment. - CI on Nib's pull requests. Pushes made with
GITHUB_TOKENdon't trigger other workflows. To run CI on Nib's pull requests, pass a GitHub App token or a personal access token asgithub_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
nibrelease of the same version and checks its SHA-256 before running it.@v0follows the latest 0.x release; pin an exact tag such as@v0.2.0to stay on one version.
Next
- Permissions: rules for
allowed_tools. - Agent SDK: run Nib from your own scripts.