CLI

Depot CLI: Overview and platform commands

The Depot CLI gives you command line access to Depot CI, container builds, and agent sandboxes. To install the Depot CLI, see Installation.

You can submit an issue or contribute to the Depot CLI in our public GitHub repository.

The following reference is for platform-wide Depot CLI commands. Other Depot product CLI references:

depot login

Authenticates with your Depot account, automatically creating and storing a user token on your local machine.

Examples

# Login and select organization interactively
$ depot login

# Login and specify organization ID
$ depot login --org-id 1234567890

# Clear existing token before logging in
$ depot login --clear

depot logout

Logout out of your Depot account, removing your user token from your local machine.

Example

depot logout

depot org

Manage organizations you have access to in Depot. The org command group provides tools to list, switch, and show your current organization context.

depot org list

List organizations that you can access. By default, this command opens an interactive table. You can also output the list in json or csv format for scripting.

Usage

depot org list

depot org switch

Set the current organization in your global Depot settings. This affects which organization is used by default for commands that support organization context.

Usage

depot org switch [org-id]

If you do not provide an org-id, you will be prompted to select one interactively.

Examples

# Switch to a specific organization by ID
$ depot org switch 1234567890

# Select organization interactively
$ depot org switch

depot org show

Show the current organization set in your global Depot settings.

Usage

depot org show

Example

$ depot org show
1234567890

depot tests

List parsed test results for a Depot CI or GitHub Actions job. Results come from the JUnit XML your jobs report with the depot/test-report-action, the same data shown in the dashboard. To set up reporting, see Depot CI test results and GitHub Actions test results.

By default, Depot uses the given ID to retrieve Depot CI results, then falls back to GitHub Actions. Pass --ci or --gha to restrict the lookup to one source.

For Depot CI, the ID may be a run, job, or attempt ID. A job ID resolves to its latest attempt, and an attempt ID points at one specific attempt. A run ID resolves to the latest attempt when the run has a single job: if the run has more than one job, narrow it with --job (and --workflow when the same job name appears in multiple workflows). For GitHub Actions, pass the GitHub Actions job ID with --gha. The command prints a table in a terminal and JSON when piped, so it drops straight into scripts.

Usage

depot tests <id>

Examples

# List Depot CI results for one attempt
$ depot tests <attempt-id>

# List Depot CI results for one job in a run
$ depot tests <run-id> --job test

# List failed GitHub Actions results for one job
$ depot tests <github-job-id> --gha --status failed

# Emit JSON for automation
$ depot tests <attempt-id> --output json

Flags

FlagDescription
--ciRestrict the lookup to Depot CI test results (mutually exclusive with --gha)
--ghaRestrict the lookup to GitHub Actions test results (mutually exclusive with --ci)
--job <key>Depot CI job key to select when the ID is a run
--workflow <path>Depot CI workflow path to filter jobs (for example ci.yml)
--status <status>Test status to include (unknown, passed, failed, errored, skipped); repeatable
--suite <name>Test suite name to include
--test <name>Test case name to include
--class <name>Test class name to include
--file <name>Source filename to include
--page-size <n>Number of results to return per page (max 500, default 100)
--page-token <token>Token to fetch the next page
--output <format>Output format: auto, table, or json (default auto)
--org <id>Specify a Depot organization ID (required if you belong to more than one organization)
--token <token>Depot API token