> ## Documentation Index
> Fetch the complete documentation index at: https://trigger.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI runs commands

> Use these commands to list, inspect, replay and cancel runs from your terminal.

## runs list

Lists runs, newest first, in a table of ID, task, status, version, created time and duration.

<CodeGroup>
  ```bash npm theme={"theme":"css-variables"}
  npx trigger.dev@latest runs list
  ```

  ```bash pnpm theme={"theme":"css-variables"}
  pnpm dlx trigger.dev@latest runs list
  ```

  ```bash yarn theme={"theme":"css-variables"}
  yarn dlx trigger.dev@latest runs list
  ```
</CodeGroup>

<ParamField body="Limit" type="--limit">
  The number of runs to list, up to 100. Defaults to 20.
</ParamField>

<ParamField body="Status" type="--status">
  Only show runs with this status, e.g. `FAILED`.
</ParamField>

<ParamField body="Task" type="--task">
  Only show runs for this task identifier.
</ParamField>

<ParamField body="Tag" type="--tag">
  Only show runs with this tag.
</ParamField>

<ParamField body="Cursor" type="--cursor">
  The pagination cursor printed at the end of the previous page.
</ParamField>

## runs get

Prints the status, version, tags, timings, duration, cost and error of a single run.

```bash theme={"theme":"css-variables"}
npx trigger.dev@latest runs get run_abc123
```

## runs replay

Triggers a new run with the same payload as an existing one, using the latest version of the task.

```bash theme={"theme":"css-variables"}
npx trigger.dev@latest runs replay run_abc123
```

## runs cancel

Cancels a run that has not finished yet. You are asked to confirm first.

```bash theme={"theme":"css-variables"}
npx trigger.dev@latest runs cancel run_abc123
```

<ParamField body="Skip confirmation" type="--yes | -y">
  Cancel without the confirmation prompt. Required in non-interactive environments such as CI.
</ParamField>

## Options

<ParamField body="Environment" type="--env | -e">
  The environment to use: `dev`, `prod`, `staging` or `preview`. Defaults to `prod`.
</ParamField>

<ParamField body="Config file" type="--config | -c">
  The name of the config file found at the project path. Defaults to `trigger.config.ts`
</ParamField>

<ParamField body="Project ref" type="--project-ref | -p">
  The project ref. Required if there is no config file.
</ParamField>

<ParamField body="Preview branch" type="--branch | -b">
  When using `--env preview` the branch is automatically detected from git. But you can manually
  specify it by using this option, e.g. `--branch my-branch` or `-b my-branch`.
</ParamField>

### Common options

These options are available on most commands.

<ParamField body="Login profile" type="--profile">
  The login profile to use. Defaults to "default".
</ParamField>

<ParamField body="API URL" type="--api-url | -a">
  Override the default API URL. If not specified, it uses `https://api.trigger.dev`. This can also be set via the `TRIGGER_API_URL` environment variable.
</ParamField>

<ParamField body="Log level" type="--log-level | -l">
  The CLI log level to use. Options are `debug`, `info`, `log`, `warn`, `error`, and `none`. This does not affect the log level of your trigger.dev tasks. Defaults to `log`.
</ParamField>

<ParamField body="Skip telemetry" type="--skip-telemetry">
  Opt-out of sending telemetry data. This can also be done via the `TRIGGER_TELEMETRY_DISABLED` environment variable. Just set it to anything other than an empty string.
</ParamField>

<ParamField body="Help" type="--help | -h">
  Shows the help information for the command.
</ParamField>

<ParamField body="Version" type="--version | -v">
  Displays the version number of the CLI.
</ParamField>
