CLI

Depot CLI: Review Agents commands reference

Reference for all depot checks commands. To install the Depot CLI, see Installation. For repository connections and product concepts, see Review Agents.

Other Depot product CLI references:

Prerequisites

  • Install the Depot CLI and authenticate.
  • Connect the repository to your Depot organization. See the quickstart prerequisites for connection requirements.
  • Use an organization owner account to create or update agents, start reviews, or retry failed executions. Organization members can read reviews and resolve or reopen findings.

If your installed CLI doesn't recognize depot checks, update it using the installation instructions.

Common flags

These flags apply to every depot checks command:

FlagDescription
--org <org-id>Organization ID. Defaults to your current organization.
--token <token>Depot API token. You can also use DEPOT_TOKEN or your saved login.
--output <format>, -o <format>text by default, or json. Transcript output also accepts jsonl.

List commands return up to 50 results by default. Use -n <count> to change the limit. The CLI follows API pages until it reaches the limit or runs out of results.

depot checks agents create

Creates a review agent with instructions and repositories to watch. See Prompt for guidance and an example of review instructions. Write your instructions in review.md, then create the agent:

depot checks agents create \
  --name "Correctness review" \
  --instructions-file review.md \
  --repo depot:<owner>/<repository>

The command returns the agent's ID. Without explicit events, creation enables all supported automatic events except github:push. Use --clear-events to run reviews manually only.

Use depot, origin, or github as the repository prefix. The CLI also accepts code for Depot Code and cursor-origin for Origin. Use the repository's full name after the prefix. Depot Code names can omit the owner segment. See Repositories for guidance on watched repositories and mirrors.

Flags

These flags also apply to depot checks agents update:

FlagDescription
--name <name>Agent name, required on creation.
--instructions <text>Review instructions, required on creation unless you use --instructions-file.
--instructions-file <path>Read instructions from a file. Use - to read standard input. Cannot be combined with --instructions.
--model <model-id>Model ID from agents models, or default.
--repo <forge>:<repository>Watched repository. Repeat to select multiple repositories.
--event <event>Provider-qualified automatic event. Repeat to select multiple events.
--clear-reposRemove every watched repository. Cannot be combined with --repo.
--clear-eventsDisable automatic reviews. Cannot be combined with --event.

Automatic events

Use --event to select from these events:

ProviderEvent IDs
Depot Codecode:push
Origincursor-origin:pull_request.created, cursor-origin:pull_request.head_ref.pushed, cursor-origin:pull_request.base_ref.updated, cursor-origin:pull_request.published
GitHubgithub:opened, github:synchronize, github:reopened, github:ready_for_review, github:push

See Automatic events for event behavior and exclusions. Use the dashboard to change reasoning effort or delete an agent.


depot checks agents update

Updates a saved review agent. For example, enable automatic reviews on Depot Code pushes:

depot checks agents update <agent-id> --event code:push

For Origin pull request updates, use --event cursor-origin:pull_request.head_ref.pushed. For GitHub pull request updates, use --event github:synchronize. See Automatic events for all supported events.

Updates preserve omitted fields. Supplying --repo or --event replaces that entire selection. See the agent configuration flags for available settings.

See Edit or pause an agent for how changes affect future and running reviews.


depot checks agents list

Lists saved review agents.

depot checks agents list

Alias: depot checks agents ls.

Flags

FlagDescription
-n <count>Maximum number of results. Defaults to 50.

depot checks agents get

Shows a saved review agent's configuration.

depot checks agents get <agent-id>

Alias: depot checks agents show.


depot checks agents models

Lists model IDs, labels, and the current default.

depot checks agents models

Use a model ID with --model, or use --model default to follow Depot's default. See Model for default behavior and Models and pricing to compare token rates.


depot checks run

Queues a review for a repository and revision without changing the agent's watched repositories.

depot checks run <agent-id> --repo depot:<owner>/<repository> --ref main

The repository doesn't need to be watched by the agent. Use depot, origin, or github as the forge prefix. The CLI also accepts code for Depot Code and cursor-origin for Origin.

Flags

FlagDescription
--repo <forge>:<repository>Required repository to review.
--ref <ref>Branch or tag. Defaults to the default branch's latest commit.
--commit-sha <sha>Full commit SHA. Can be combined with --ref for branch context.
--base <ref-or-sha>Comparison start. Defaults to the head commit's first parent.
--head <ref-or-sha>Comparison end. Cannot be combined with --ref or --commit-sha.

Examples

Review a branch against main:

depot checks run <agent-id> \
  --repo depot:<owner>/<repository> \
  --base main \
  --head feature/api-change

Without an explicit base, a review covers one commit against its first parent. A first commit is compared with an empty tree.

See Choose a revision or range for guidance on selecting the comparison.

run queues the review and returns its check and attempt IDs immediately. It doesn't wait for the review to finish. Inspect the result with depot checks get <check-id>.


depot checks list

Lists reviews across review agents. Use filters to select a repository, branch, or outcome:

depot checks list --forge depot --repo <owner>/<repository> --branch main
depot checks list --outcome rejected -n 100 --output json

Alias: depot checks ls.

Flags

FlagDescription
--agent <agent-id>Review agent ID.
--repo <repository>Repository name across forges, or <forge>:<repository>.
--forge <forge>depot, origin, or github. Also accepts code and cursor-origin.
--branch <branch>Exact branch name. Requires --repo.
--sha <prefix>Head or base commit SHA prefix.
--outcome <outcome>running, done, passed, findings, rejected, resolved, failed, cancelled, or superseded.
--query <text>Search agent names, repositories, branches, and SHA prefixes.
-n <count>Maximum number of results. Defaults to 50.

rejected means the review needs changes. findings means it passed with advisory findings. failed means execution couldn't finish. See Interpret the outcome.

cancelled means the pull request was closed, merged, or converted to a draft before the review completed. superseded means a newer review replaced the queued or running review. Neither outcome indicates an execution failure. Reviews with either outcome cannot be retried.


depot checks get

Shows a review's latest attempt or an exact execution. Use a check ID for its latest attempt, or an attempt ID for that execution:

depot checks get <check-id>
depot checks get <attempt-id>

See Interpret the outcome for result states and Act on findings for next steps.


depot checks attempts

Lists a review's execution history. Accepts either a check ID or an attempt ID.

depot checks attempts <check-id>

Flags

FlagDescription
-n <count>Maximum number of results. Defaults to 50.

depot checks retry

Queues another attempt of a review whose current execution failed.

depot checks retry <check-id>

retry also accepts the current attempt ID. Only an execution failure is retryable. A completed review that needs changes isn't an execution failure.

The command queues another attempt of the same review and returns immediately. The attempt keeps the original revisions and captured configuration. Use run to review updated code or agent settings.

See Retry a review that couldn't finish for retry behavior and attempt history.


depot checks transcript

Reads or downloads a recorded transcript.

depot checks transcript <check-id>
depot checks transcript <attempt-id> --output jsonl --output-file review.jsonl

The default format is readable text. Both --output json and --output jsonl return the original JSONL archive. Use an attempt ID to select a specific execution.

Recorded transcripts are available after execution and expire after 30 days. The command reports an error if the transcript isn't available.

See Inspect the agent transcript for what transcripts contain and how to use them when reviewing findings.

Flags

FlagDescription
--output-file <path>Write the transcript to a file. Use - for standard output.
--output <format>, -oOutput format: text, json, or jsonl. Defaults to text.

depot checks resolve

Resolves findings on a review's current attempt.

Inspect the review with get to find each finding's original, zero-based index. Use that index with --finding:

depot checks resolve <check-id> --finding 0
depot checks resolve <check-id> --all

Flags

FlagDescription
--finding <index>Original zero-based finding index. Repeat or supply comma-separated indexes.
--allResolve all findings. Cannot be combined with --finding.

Supply either --finding or --all. The command also accepts the current attempt ID. Earlier attempts are read-only. Resolution is available for reviews that need changes; it records your decision without changing code or starting another review. See Act on findings.


depot checks unresolve

Reopens resolved findings on a review's current attempt.

depot checks unresolve <check-id> --finding 0
depot checks unresolve <check-id> --all

The command accepts the same IDs and flags as depot checks resolve. Use --all to reopen all findings, or --finding to select individual findings.


Exit codes

A successful command exits with 0, even if the inspected review needs changes or couldn't finish. Command errors exit with 1. Do not use the exit code of get as the review's pass/fail decision. Inspect its output instead.