Skip to main content

CLI reference

agent-review exposes eleven commands: a guided setup command (init), six that drive the review flow (request, list, claim, complete, enrich, and labels bootstrap), and four small utilities (config, whoami, skills list, and serve). Every command and flag on this page is read straight from cli/index.ts.

Global options

OptionApplies toMeaning
-c, --config <path>every commandAn explicit config file path. Takes priority over every other tier in the resolution order described in Quick start.
--repo <owner/name>request, list, claim, complete, enrich, labels bootstrapThe repository to act on. Optional if defaultRepo is set in your config; the command exits with an error if neither is provided.

config

Prints the fully resolved config as JSON, after applying the file-resolution order and defaults.

agent-review config
{ "githubLogin": null, "defaultRepo": "input-output-hk/some-repo", "skillsDir": null, "runChecks": false }

whoami

Prints the GitHub login the CLI will act as: config.githubLogin if you set one, otherwise the login auto-detected from your token.

agent-review whoami

skills list

Prints the built-in specialty names, SKILL_NAMES from core/labels.ts, as a JSON array.

agent-review skills list
["security","architecture","performance","testing","api","react-native","did","oid4vc","cryptography","documentation","second-opinion"]

labels bootstrap

Idempotently creates or updates the ai-review trigger label plus one label per skill name on the target repository. See Labels and routing for exactly how created/updated/unchanged is decided.

  • --repo <owner/name>
agent-review labels bootstrap --repo input-output-hk/some-repo

init

Guided setup: authenticates against GitHub, writes ~/.agent-peer-review/config.json (only the keys you passed), bootstraps the ai-review trigger label plus the skill labels on every --repo, and prints the config path, the labels created or left unchanged per repo, a ready-to-paste MCP config snippet, and the orchestration skill's location. See Quick start for the full walkthrough and AGENTS.md for the install contract this command backs.

  • --repo <owner/name...> (repeatable): one or more repositories to bootstrap.
  • --capture-metadata (optional): opt in to durable review metadata capture; see Review metadata capture.
  • --model <m>, --agent <a>, --tool-version <v> (optional): only meaningful alongside --capture-metadata.
  • --yes (optional): non-interactive. Without it, and without --repo, init prompts for input when run from a terminal; with neither --repo nor a terminal, it exits with guidance instead of hanging.
agent-review init --repo input-output-hk/some-repo --yes

On a token or authentication failure, init prints a friendly message ("Could not authenticate to GitHub. Set GITHUB_TOKEN or run gh auth login.") and exits with a non-zero status instead of a raw stack trace.

request

Adds the ai-review label (plus any skill labels you pass) and requests the review from one or more GitHub logins via the native Reviewers field.

  • --repo <owner/name>
  • --pr <n> (required)
  • --reviewers <csv> (required): comma-separated GitHub logins.
  • --skills <csv> (optional): comma-separated skill names; unrecognized names are silently dropped.
  • --note <text> (optional): posted as a plain issue comment alongside the request.
agent-review request --repo input-output-hk/some-repo --pr 42 \
--reviewers yshyn-iohk --skills security,cryptography --note "focus on the crypto changes"

list

Lists open, ai-review-labeled pull requests requested from a login, with each row's current claim state if one exists.

  • --repo <owner/name>
  • --reviewer <login> (optional): defaults to your own resolved login.
agent-review list --repo input-output-hk/some-repo

claim

Pins the pull request's current head SHA, posts a claim-marker comment, and returns the composed review task (PR metadata, pinned SHA, and the full text of the matched skills).

  • --repo <owner/name>
  • --pr <n> (required)
agent-review claim --repo input-output-hk/some-repo --pr 42

complete

Submits a native GitHub PR review at the pinned SHA and deletes the claim marker.

  • --repo <owner/name>
  • --pr <n> (required)
  • --event <approve|request-changes|comment> (required)
  • --summary <text|@file> (required): literal text, or a path prefixed with @ to read the summary from a file.
  • --comments <@file> (optional): a JSON array of {path, line, body} objects, typically read from a file the same way.
agent-review complete --repo input-output-hk/some-repo --pr 42 \
--event request-changes --summary @summary.md --comments @comments.json

enrich

Used by an enricher in a panel review. Waits for the panel's primary review to exist, then submits one consolidated COMMENT review at the primary's commit and deletes the claim marker; if the anchor's claim has gone stale past --timeout, promotes to primary by calling complete instead. See Panel review (multiple reviewers) for the full flow.

  • --repo <owner/name>
  • --pr <n> (required)
  • --verdict <agree|disagree|mixed> (required)
  • --summary <text|@file> (required): literal text, or a path prefixed with @ to read the summary from a file.
  • --comments <@file> (optional): a JSON array of {path, line, body} new findings, typically read from a file the same way.
  • --poll <seconds> (optional): seconds between polls. Defaults to 5.
  • --timeout <seconds> (optional): seconds before giving up. Defaults to 1800.
agent-review enrich --repo input-output-hk/some-repo --pr 42 --verdict mixed --summary @summary.md --comments @comments.json

serve

Runs the MCP server over stdio. Equivalent to invoking the agent-review-mcp binary directly; see MCP reference.

agent-review serve