Assay PR Agentsingle-pass review
Pages

CLI reference

Abstractcursor-review runs one bounded review and writes a JSON report to stdout. Exactly one of --change, --base or --ci chooses what to review. This page lists every flag, the other commands the image provides, and what each exit status means.

The four commands

CommandRuns
cursor-reviewOne bounded review. Writes a JSON report to stdout.
cursor-review-pollThe poller loop, which waits for /review and reviews each request.
cursor-review-containerThe image's entry point. Its first word selects what to run.
cursor-review-setupThe setup wizard, in the terminal.
cursor-review --help

cursor-review-container takes one word:

WordRuns
manageThe setup manager, a console that opens the browser wizard
setupThe setup wizard
loginA sign-in with the configured provider CLI
syncThe checkout sync loop
anything elseThe poller

Compose's three services run manage, sync and the poller.

Choosing what to review

Exactly one of these is required, and they cannot be combined:

OptionReviews
--change 'org/repo#42'A GitHub pull request or GitLab merge request, through Assay's configured backend
--base mainA local branch, from the merge base to the committed HEAD
--ciA local branch, taking its base and head from the pipeline event

Every flag of cursor-review

FlagTakesMeaning
--changeAn address such as org/repo#42An Assay-configured GitHub PR or GitLab MR
--baseA revisionThe local base revision to compare against
--ciNothingUse the provider CI event's SHAs in the checkout
--expected-change-urlA URLRequire this exact open forge change before reviewing
--headA revisionThe local head revision. HEAD by default with --base.
--repoA pathThe checkout for local Git and scanners. The current directory by default.
--pathA changed path. Repeat it.Limit the review to an exact changed path
--go-analysis-producerA workflow or jobA trusted CI producer, for use with --expected-change-url
--go-reportA pathAssay go-analysis/v1 JSON for this head
--scanner-ciJSONPer-tool trusted CI report settings, for a forge change
--qualgen-storeA pathThe poller's mined Qualgen history for this project
--modelA model nameAn explicit provider model. Otherwise the CLI's default.
--max-input-tokensAn integerThe estimate limit. 6000 by default, or the saved REVIEW_MAX_INPUT_TOKENS setting.
--estimateNothingPrepare the inputs and report the cost estimate, without calling the model
--cache-dirA pathWhere results are cached: $XDG_CACHE_HOME/cursor-pr-review, else ~/.cache/cursor-pr-review
--postNothingPublish a head-bound summary, with --change

Which flags go together

  • --head needs --base.
  • --post needs --change, and cannot be combined with --estimate.
  • --expected-change-url needs --change.
  • --go-analysis-producer needs --expected-change-url, and excludes --go-report.
  • --path must name a file the change touches.
  • --max-input-tokens must be at least 1.

A request that breaks one of these rules ends with a message on stderr and exit status 2.

The poller

FlagDefaultMeaning
--state-dirREVIEW_STATE_DIR, else ~/.local/state/cursor-reviewThe state volume
--intervalREVIEW_POLL_SECONDS, else 120Seconds to wait after each cycle

The poller stops with exit status 2 if its configuration is invalid, before it polls anything.

Setup and sign-in

Command and flagMeaning
container setup --state-dir <path>Use this state directory
container setup --reauthRun a fresh provider sign-in
container setup --webOpen the local browser wizard
container login --state-dir <path>Use this state directory
container login --forceSign in again even if the current session is valid

Each is written in full as cursor-review-container setup or cursor-review-container login.

The manager console takes four keys: Enter opens the browser setup, r runs a fresh sign-in, t runs the terminal setup, and q quits.

Exit status

CommandStatusMeaning
cursor-review0The review or estimate completed in full
cursor-review2over-budget, model-unavailable or partial, a failed publication, or any error
cursor-review-poll2The configuration is invalid
setup0Saved, or quit
setup1Cancelled with Ctrl-C
setup2No terminal to ask on, or the setup failed
setup20Quit from the manager
login2The sign-in failed

Output and exit codes lists the six states behind the first two rows. Settings reference lists every environment variable.