Watch a run until it completes

## Usage

`circleci run watch [<run-id>] [flags]`

## Arguments

`<run-id>` is optional: a run UUID (as shown by `circleci run list --json`)
or a run number (as shown by `circleci run list`).

When omitted, the latest run for the current branch is watched.

## Flags

| Flag                  | Description                                                            |
| --------------------- | ---------------------------------------------------------------------- |
| `-b, --branch string` | Branch to watch (defaults to current branch)                           |
| `--failfast`          | Exit as soon as any job fails, without waiting for the rest of the run |
| `--project string`    | Project slug (e.g. gh/org/repo); defaults to git remote                |
| `--sha string`        | Watch run for this commit SHA; polls up to 2m if not yet created       |
| `--timeout duration`  | Maximum time to wait for run completion (default 30m0s)                |

Global flags: `-c, --config`, `--debug`, `--no-color`, `-q, --quiet` — see `circleci --help`.

## Examples

- Watch the latest run on the current branch: 
  `circleci run watch`
- Push and watch in one step: 
  `git push && circleci run watch --sha $(git rev-parse HEAD)`
- Watch by UUID (e.g. from 'run list --json'): 
  `circleci run watch 5034460f-c7c4-4c43-9457-de07e2029e7b`
- Watch with a longer timeout: 
  `circleci run watch --timeout 30m`
- Exit as soon as any job fails: 
  `circleci run watch --failfast`

## Details

Monitor a CircleCI run and block until it reaches a terminal state. Without
arguments, watches the latest run for the current branch.

Exit code reflects the result: 0 all workflows succeeded, 1 one or more
failed, 6 cancelled, 8 timed out.

With --sha, polls for up to 2 minutes for a run matching that commit to
appear — useful immediately after git push.

