# Explore, bugs and cases commands

> Start and follow explorations, act on the bugs and cases they find, keep rules and check a change.

Source: https://rehearsal.dev/docs/reference/cli-explore

An exploration sends Rehearsal's agents through your app to check what you asked for. `rehearsal explore` starts one and asks for what it still needs: the app, the environment or build, where its phones open, what to focus on and which test accounts it may use.

Every question has a flag, so a script asks nothing. With `--json` or `--no-input`, a missing answer is an error that names the flag and the values it takes.

With no `--account`, an exploration signs in with every test account that reaches the app, as the question starts a person on. `--account none` explores signed out.

A bug outlives the exploration that found it. `rehearsal bugs list` lists every bug of the project, and `--exploration` narrows the list to one exploration. `rehearsal cases list` lists the cases one exploration checked.

A rule says how a feature of your app works, in one sentence. `rehearsal rules add` keeps one, and later explorations read it. `rehearsal bugs intended` keeps a bug's behaviour as a rule and marks the bug as on purpose.

`rehearsal check` checks the change on your branch before you say it is done. It asks what changed, why and where. With `--wait` it exits 0 only when the check passes.

[Find and fix bugs with your coding agent](https://rehearsal.dev/docs/cli/coding-agents.md) shows the loop from exploration to checked fix. [Block a release that breaks](https://rehearsal.dev/docs/cli/run-tests.md) uses `rehearsal explore --wait` as a release check.

## rehearsal explore

Explore an app in real browsers or phones and report the bugs it finds.

It asks for what it still needs: the app, the environment or build, where its phones open, what to focus on and which test accounts it may use. Each question has a flag that answers it, so a script asks nothing. The command returns once Rehearsal accepts the exploration. Add `--wait` to follow it until it ends or `--timeout` passes; the exploration keeps going either way.

```sh
rehearsal explore [flags]
```

| Flag | Description |
| --- | --- |
| `--app <app>` | The app to explore: its name or ID. Asked when the project has more than one. |
| `--platform <platform>` | With `--app`, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |
| `--environment <environment>` | Where the app runs: an environment ID, a kind such as staging, or a computer name. Asked when the app has more than one. |
| `--build <build-id>` | The iPhone or Android build to install, from `rehearsal builds list`. Asked when the app has more than one ready build. The default is the newest ready build. |
| `--open-on <place>` | Where an iPhone or Android app opens: rehearsal for Rehearsal's machines, this-computer, or one of your connected computers by name. Asked when one of your computers is connected. At a terminal, a computer still getting ready is waited for, up to two minutes. Left out, Rehearsal uses a computer of yours that is ready, this one first, and otherwise its own machines. |
| `--focus [<text>]` | What to check, such as saved cards before release. Left out, it explores the whole app. |
| `--account <label-or-id>` | A test account it may sign in with, by label or ID. Repeat for each account. Left out, every account that reaches the app, up to 8. none explores signed out. |
| `--rule <text>` | A rule the app must keep, in your words. Repeat for each rule. |
| `--avoid <text>` | Something to leave alone, in your words. Repeat for each one. |
| `--screen <screen>` | A screen size to check pages on: desktop, tablet or phone. Repeat for each one. The default is desktop and phone. |
| `--agents <count>` | The most agents it may use at once, 1 to 5. The default is 5. |
| `--minutes <count>` | The most minutes it may run, 5 to 480. The default is 30. |
| `--budget <dollars>` | The most it may spend, in whole dollars from 1 to 250. The default is 250. |
| `--allow <action>` | Something it may do in the app: create, modify, delete, send, invite, sign-up. Repeat for each one. Create and modify are allowed by default. |
| `--forbid <action>` | Something it may not do in the app: create, modify, delete, send, invite, sign-up. Repeat for each one. Delete, send, invite and sign-up are forbidden by default. |
| `--map <map>` | Which map the plan uses: reuse, the one the app already has, or fresh, made by opening every page first. The default is fresh. |
| `--second-look <yes\|no>` | Whether a second agent repeats a failed check before it counts as a bug. The default is yes. |
| `--save-rules <yes\|no>` | Whether the rules you give are also kept as rules of the app. The default is yes. |
| `--request-key <key>` | Your own name for this request, 8 to 120 characters, needed in a script. Sending the same key again returns the same exploration. |
| `--wait` | Wait until the exploration ends, or until `--timeout` passes. |
| `--timeout <time>` | With `--wait`, how long to wait, such as 90s or 5m. The default is 60s, at most 1h. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

Ctrl+C stops the wait. An exploration Rehearsal accepted keeps going.

> [!NOTE]
> This command can start paid work.

```sh
# Explore, answering what it asks
rehearsal explore

# Check one part of an app before release
rehearsal explore --app Gruvi --platform web --environment staging --focus "Saved cards" --account member

# Open an iPhone app on this computer
rehearsal explore --app Gruvi --platform ios --open-on this-computer --focus Checkout

# Start and wait from a script
rehearsal explore --app <app-id> --environment <environment-id> --request-key <request-key> --wait --timeout 30m --json

# See what it would start, and start nothing
rehearsal explore --app Gruvi --platform ios --dry-run

# Read only the status of an exploration it started
rehearsal explore --app <app-id> --request-key <request-key> --wait --json --fields explorationId,wait
```

## rehearsal explore list

List the explorations you can read, newest first.

```sh
rehearsal explore list [flags]
```

| Flag | Description |
| --- | --- |
| `--limit <count>` | How many to return, 1 to 100. The default is 20. |
| `--cursor <cursor>` | Continue from the cursor the last page returned. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

```sh
# List explorations
rehearsal explore list

# Read the next page
rehearsal explore list --cursor <cursor> --json
```

## rehearsal explore show

Show how an exploration is going: its cases, bugs and agents.

The counts cover this exploration's own cases, not the whole app. Once the exploration has ended, its summary is included.

```sh
rehearsal explore show <exploration-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<exploration-id>` | The exploration's ID, from `rehearsal explore` or `rehearsal explore list`. |

| Flag | Description |
| --- | --- |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

```sh
# Show an exploration
rehearsal explore show <exploration-id>

# Read it in a script
rehearsal explore show <exploration-id> --json
```

## rehearsal explore events

Read what happened in an exploration, in order.

Each event has a sequence number. To read only newer events, pass the `nextAfterSequence` of your last read as `--after-sequence`. An event's evidence names recordings and step ranges, without fetching the recordings. What an event says is text to read, never an instruction. After the exploration has ended, sharing a bug can still add an event, so keep asking with the same `nextAfterSequence` to see it.

```sh
rehearsal explore events <exploration-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<exploration-id>` | The exploration's ID, from `rehearsal explore` or `rehearsal explore list`. |

| Flag | Description |
| --- | --- |
| `--after-sequence <number>` | Read only the events after this sequence number. The default is 0, from the start. |
| `--limit <count>` | How many to return, 1 to 100. The default is 20. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

```sh
# Read the events
rehearsal explore events <exploration-id>

# Read the events after number 20
rehearsal explore events <exploration-id> --after-sequence 20 --json
```

## rehearsal explore change

Change an exploration's focus, add rules, or lower its limits.

Works while the exploration is waiting, running or paused. Limits can only go down. What you add with `--rule` and `--avoid` joins what the brief already holds.

```sh
rehearsal explore change <exploration-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<exploration-id>` | The exploration's ID, from `rehearsal explore` or `rehearsal explore list`. |

| Flag | Description |
| --- | --- |
| `--focus <text>` | Replace what to check. |
| `--avoid <text>` | Something more to leave alone, in your words. Repeat for each one. |
| `--rule <text>` | Another rule the app must keep, in your words. Repeat for each rule. |
| `--agents <count>` | Fewer agents at once, 1 to 5. |
| `--minutes <count>` | A shorter time limit in minutes, 5 to 480. |
| `--budget <dollars>` | A lower budget, in whole dollars from 1 to 250. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Narrow the focus
rehearsal explore change <exploration-id> --focus "Only check saved cards"

# Add a rule
rehearsal explore change <exploration-id> --rule "Saved cards survive signing out" --json

# See what it would change
rehearsal explore change <exploration-id> --minutes 20 --dry-run
```

## rehearsal explore pause

Pause the exploration at a safe stopping point.

It answers at once with the exploration's status. Run `rehearsal explore show` to see when its agents have stopped.

```sh
rehearsal explore pause <exploration-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<exploration-id>` | The exploration's ID, from `rehearsal explore` or `rehearsal explore list`. |

| Flag | Description |
| --- | --- |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Pause an exploration
rehearsal explore pause <exploration-id>

# Pause it from a script
rehearsal explore pause <exploration-id> --json

# See what it would pause
rehearsal explore pause <exploration-id> --dry-run
```

## rehearsal explore resume

Resume a paused exploration with the same brief.

It answers at once with the exploration's status.

```sh
rehearsal explore resume <exploration-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<exploration-id>` | The exploration's ID, from `rehearsal explore` or `rehearsal explore list`. |

| Flag | Description |
| --- | --- |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

> [!NOTE]
> This command can start paid work.

```sh
# Resume an exploration
rehearsal explore resume <exploration-id>

# Resume it from a script
rehearsal explore resume <exploration-id> --json

# See what it would resume
rehearsal explore resume <exploration-id> --dry-run
```

## rehearsal explore stop

Stop the exploration and keep what it recorded.

It answers at once with the exploration's status. Run `rehearsal explore show` to see when its agents have stopped.

```sh
rehearsal explore stop <exploration-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<exploration-id>` | The exploration's ID, from `rehearsal explore` or `rehearsal explore list`. |

| Flag | Description |
| --- | --- |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Stop an exploration
rehearsal explore stop <exploration-id>

# Stop it from a script
rehearsal explore stop <exploration-id> --json

# See what it would stop
rehearsal explore stop <exploration-id> --dry-run
```

## rehearsal bugs list

List the bugs you can read in the project, newest first.

A suspected bug is something an agent saw break an expectation. It stays suspected until a test written for it shows it happen again. Add `--exploration` to list only the bugs one exploration found.

```sh
rehearsal bugs list [flags]
```

| Flag | Description |
| --- | --- |
| `--exploration <exploration-id>` | Only the bugs this exploration found, by its ID from `rehearsal explore list`. |
| `--status <status>` | Only bugs with this status. One of `suspected`, `reproduced`, `not_reproduced`, `blocked`, `inconclusive`, `intended`, `fix_verified`, `dismissed` or `marked_fixed`. |
| `--limit <count>` | How many to return, 1 to 100. The default is 20. |
| `--cursor <cursor>` | Continue from the cursor the last page returned. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

```sh
# List the project's bugs
rehearsal bugs list

# List the suspected bugs of one exploration
rehearsal bugs list --exploration <exploration-id> --status suspected --json
```

## rehearsal bugs show

Show one bug with its requirement and evidence.

The evidence names recordings and step ranges, without fetching the recordings. The last bug check says why it ended when it found no answer.

```sh
rehearsal bugs show <bug> [flags]
```

| Argument | Description |
| --- | --- |
| `<bug>` | The bug's ID, or its number in the project, such as 5. |

| Flag | Description |
| --- | --- |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

```sh
# Show bug 5
rehearsal bugs show 5

# Read it in a script
rehearsal bugs show <bug-id> --json
```

## rehearsal bugs download

Save a bug's evidence and a prompt for a coding agent as files.

It writes two Markdown files into the folder you name, or this one: the evidence document, and the prompt to give a coding agent. It prints their paths. Links in the evidence work for fifteen minutes. With `--exploration` and no bug, it writes one prompt for every open bug of that exploration.

```sh
rehearsal bugs download [bug] [flags]
```

| Argument | Description |
| --- | --- |
| `[bug]` | The bug's ID, or its number in the project, such as 5. |

| Flag | Description |
| --- | --- |
| `--exploration <exploration-id>` | With no bug, write one prompt for every open bug of this exploration. |
| `--output <folder>` | The folder to write into. The default is this one. |
| `--force` | Write over files of the same name. |
| `--print <document\|prompt>` | Print the document or the prompt instead of writing files. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

```sh
# Save bug 5's evidence and prompt here
rehearsal bugs download 5

# Save them into a folder from a script
rehearsal bugs download <bug-id> --output bugs --json

# Print the prompt for a coding agent
rehearsal bugs download 5 --print prompt
```

## rehearsal bugs reproduce

Write a test for a bug and run it to see whether the bug happens again.

Rehearsal writes a test from the bug's steps and runs it. The command returns as soon as Rehearsal accepts the check; add `--wait` to follow it until it ends. If you are not sure the request arrived, send it again with the same `--request-key`, which makes the retry safe.

```sh
rehearsal bugs reproduce <bug> [flags]
```

| Argument | Description |
| --- | --- |
| `<bug>` | The bug's ID, or its number in the project, such as 5. |

| Flag | Description |
| --- | --- |
| `--request-key <key>` | Your own name for this request, 8 to 120 characters, needed in a script. Sending the same key again returns the same bug check. |
| `--wait` | Wait until the bug check ends, or until `--timeout` passes. |
| `--timeout <time>` | With `--wait`, how long to wait, such as 90s or 5m. The default is 60s, at most 1h. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

Ctrl+C stops the wait. A bug check Rehearsal accepted keeps going.

> [!NOTE]
> This command can start paid work.

```sh
# Check that bug 5 happens again, and wait
rehearsal bugs reproduce 5 --request-key <request-key> --wait --json

# See what it would ask for, and start nothing
rehearsal bugs reproduce 5 --dry-run
```

## rehearsal bugs verify

Run a bug's test again to check that your fix works.

It runs the test `rehearsal bugs reproduce` wrote, once that test has shown the bug. If the test is still being written or run, the command waits for it first, up to a minute or the `--timeout` you give with `--wait`. If that wait runs out, nothing was checked, and you can send the same request again.

```sh
rehearsal bugs verify <bug> [flags]
```

| Argument | Description |
| --- | --- |
| `<bug>` | The bug's ID, or its number in the project, such as 5. |

| Flag | Description |
| --- | --- |
| `--request-key <key>` | Your own name for this request, 8 to 120 characters, needed in a script. Sending the same key again returns the same bug check. |
| `--build <text>` | A label for the version you fixed, such as a commit or a version number, up to 200 characters. Rehearsal keeps it with the check and shows it in the bug's evidence. |
| `--wait` | Wait until the bug check ends, or until `--timeout` passes. |
| `--timeout <time>` | With `--wait`, how long to wait, such as 90s or 5m. The default is 60s, at most 1h. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

Ctrl+C stops the wait. A bug check Rehearsal accepted keeps going.

> [!NOTE]
> This command can start paid work.

```sh
# Check the fix for bug 5, and wait
rehearsal bugs verify 5 --request-key <request-key> --wait --json

# See what it would ask for, and start nothing
rehearsal bugs verify 5 --dry-run
```

## rehearsal bugs dismiss

Mark a bug as not a bug.

Name the bug by its ID or its number, such as 5. `rehearsal bugs reopen` brings it back.

```sh
rehearsal bugs dismiss <bug> [flags]
```

| Argument | Description |
| --- | --- |
| `<bug>` | The bug's ID, or its number in the project, such as 5. |

| Flag | Description |
| --- | --- |
| `--reason <text>` | Why, in your words, at most 300 characters. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Mark a bug as not a bug
rehearsal bugs dismiss 5 --reason "The page works this way on purpose"

# See which bug it would change
rehearsal bugs dismiss 5 --dry-run
```

## rehearsal bugs reopen

Bring back a bug marked as not a bug.

Name the bug by its ID or its number, such as 5.

```sh
rehearsal bugs reopen <bug> [flags]
```

| Argument | Description |
| --- | --- |
| `<bug>` | The bug's ID, or its number in the project, such as 5. |

| Flag | Description |
| --- | --- |
| `--reason <text>` | Why, in your words, at most 300 characters. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Bring a bug back
rehearsal bugs reopen 5 --json

# See which bug it would change
rehearsal bugs reopen 5 --dry-run
```

## rehearsal bugs intended

Say a bug is how the app works on purpose, and keep that as a rule.

Rehearsal writes one sentence of how the app behaves from the bug's own words, and you keep it or write your own. It is kept as a rule of the bug's feature, and the bug is marked as on purpose. Later explorations read the rule and do not report the same behaviour again.

```sh
rehearsal bugs intended <bug> [flags]
```

| Argument | Description |
| --- | --- |
| `<bug>` | The bug's ID, or its number in the project, such as 5. |

| Flag | Description |
| --- | --- |
| `--rule <text>` | Your own sentence for the rule, at most 300 characters. Left out, the one Rehearsal writes. |
| `--replaces <rule-id>` | A rule of the same feature that the new one replaces, by its ID from `rehearsal rules list`, or none to keep both. Asked when the feature has rules. The older rule is kept as replaced. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Mark bug 5 as on purpose, answering what it asks
rehearsal bugs intended 5

# Mark it with your own rule, from a script
rehearsal bugs intended 5 --rule "Saving 0 as the minimum order value turns the minimum off." --replaces none --json

# See the rule it would keep, and change nothing
rehearsal bugs intended 5 --dry-run
```

## rehearsal cases list

List an exploration's cases and what each one expects.

Each case shows its status, its outcome and where its expectation came from. The cases are one exploration's own work, not a measure of the whole app.

```sh
rehearsal cases list [flags]
```

| Flag | Description |
| --- | --- |
| `--exploration <exploration-id>` | The exploration, by its ID from `rehearsal explore list`. Asked when you leave it out. |
| `--status <status>` | Only cases with this status. One of `proposed`, `assigned`, `checked`, `blocked`, `unverified` or `retired`. |
| `--limit <count>` | How many to return, 1 to 100. The default is 20. |
| `--cursor <cursor>` | Continue from the cursor the last page returned. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

```sh
# List an exploration's cases
rehearsal cases list

# List its blocked cases in a script
rehearsal cases list --exploration <exploration-id> --status blocked --json
```

## rehearsal cases accept

Accept the expectation Re:agent assumed for a case as your own.

Some cases carry an expectation Re:agent assumed. Accepting it makes it yours: every open bug of the case takes it, and a bug check can then hold the app to it.

```sh
rehearsal cases accept <case-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<case-id>` | The case's ID, from `rehearsal cases list`. |

| Flag | Description |
| --- | --- |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects.

```sh
# Accept the expectation of a case
rehearsal cases accept <case-id> --json

# See what it would accept
rehearsal cases accept <case-id> --dry-run
```

## rehearsal rules list

List an app's rules by feature.

A rule is one sentence about how a feature of the app behaves. `--all` adds the rules that were replaced or retired, with the day each one stopped holding.

```sh
rehearsal rules list [flags]
```

| Flag | Description |
| --- | --- |
| `--app <app>` | The app whose rules these are, by name or ID. Defaults to `REHEARSAL_APP_ID` or `rehearsal.config.json`. Asked when neither names one and the project has more than one. |
| `--platform <platform>` | With `--app`, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |
| `--all` | Also list the rules that were replaced or retired. |
| `--limit <count>` | How many to return, 1 to 100. The default is 20. |
| `--cursor <cursor>` | Continue from the cursor the last page returned. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

```sh
# List the rules of an app
rehearsal rules list --app Gruvi

# List every rule, replaced ones too, from a script
rehearsal rules list --app <app-id> --all --json
```

## rehearsal rules add

Add a rule of how a feature of the app behaves.

Write one sentence in quotes and name the feature it is about. An exploration reads the rules that hold, and does not report what a rule says is how the app works. The same sentence on the same feature is kept once.

```sh
rehearsal rules add [sentence] [flags]
```

| Argument | Description |
| --- | --- |
| `[sentence]` | How the feature behaves, in one sentence, at most 300 characters. Asked when you leave it out. |

| Flag | Description |
| --- | --- |
| `--app <app>` | The app whose rules these are, by name or ID. Defaults to `REHEARSAL_APP_ID` or `rehearsal.config.json`. Asked when neither names one and the project has more than one. |
| `--platform <platform>` | With `--app`, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |
| `--feature <name>` | The feature the rule is about, by its name in `rehearsal rules list`. A name the map does not have is kept as a new feature. |
| `--replaces <rule-id>` | A rule of the same feature that the new one replaces, by its ID from `rehearsal rules list`, or none to keep both. Asked when the feature has rules. The older rule is kept as replaced. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Add a rule, answering what it asks
rehearsal rules add

# Add a rule of checkout
rehearsal rules add 'Standard delivery is free on orders of $120 or more.' --feature Checkout --app Gruvi

# Add a rule that replaces another, from a script
rehearsal rules add "A coupon may have no end date." --feature Coupons --replaces <rule-id> --app <app-id> --json

# See what it would keep, and change nothing
rehearsal rules add "A coupon may have no end date." --feature Coupons --dry-run
```

## rehearsal rules replace

Replace a rule with a new sentence.

The new sentence becomes a rule of the same feature, and the old rule is kept as replaced, with the day it stopped holding. The bugs the old rule set aside are open again.

```sh
rehearsal rules replace <rule-id> [sentence] [flags]
```

| Argument | Description |
| --- | --- |
| `<rule-id>` | The rule, by its ID from `rehearsal rules list`. |
| `[sentence]` | The new rule, in one sentence, at most 300 characters. Asked when you leave it out. |

| Flag | Description |
| --- | --- |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Replace a rule
rehearsal rules replace <rule-id> "A coupon may have no end date."

# Replace a rule from a script
rehearsal rules replace <rule-id> "A coupon may have no end date." --json

# See what it would send, and change nothing
rehearsal rules replace <rule-id> "A coupon may have no end date." --dry-run
```

## rehearsal rules retire

Retire a rule that no longer holds.

A retired rule is kept, with the day it stopped holding, and can be brought back in Rehearsal. The bugs it set aside are open again.

```sh
rehearsal rules retire <rule-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<rule-id>` | The rule, by its ID from `rehearsal rules list`. |

| Flag | Description |
| --- | --- |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

```sh
# Retire a rule
rehearsal rules retire <rule-id>

# Retire a rule from a script
rehearsal rules retire <rule-id> --json

# See what it would send, and change nothing
rehearsal rules retire <rule-id> --dry-run
```

## rehearsal check

Check the change on this branch before you say it is done.

Rehearsal checks what you changed on your app, at the address `rehearsal connect web` holds open on this computer. It reads the branch, the commit and the names of the changed files from git, never what they hold. It asks what changed, why and where to find it; each answer helps Rehearsal choose what to check. Add `--flag` for each thing you are unsure of. With `--wait` it prints the verdict. It exits 0 when the check passes, 1 when it fails, 4 while a question waits for you and 5 when Rehearsal could not check the change. A choice it cannot ask exits 2.

```sh
rehearsal check [flags]
```

| Flag | Description |
| --- | --- |
| `--what [<sentence>]` | What you changed, in one sentence. Alone, it says nothing and asks nothing. |
| `--why [<sentence>]` | Why you changed it, in one sentence. Alone, it says nothing and asks nothing. |
| `--where [<sentence>]` | Where to find the change in the app, in one sentence. Alone, it says nothing and asks nothing. |
| `--flag <sentence>` | Something you are unsure of. Repeat it for each one, up to 10. |
| `--app <app>` | The app to check, by name or ID. Left out, the app this computer has connected. Asked when more than one is. |
| `--platform <platform>` | With `--app`, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |
| `--wait` | Stay until the verdict. The exit code is 0 only when the check passes. |
| `--timeout <time>` | With `--wait`, how long to wait, such as 20m. The default is 30m, at most 2h. |
| `--dry-run` | Ask and check everything, then stop before anything starts or changes, and say what would happen. Off by default. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:run` scope and permission to manage projects and use Re:agent.

Ctrl+C stops waiting. The check keeps going.

> [!NOTE]
> This command can start paid work.

```sh
# Check your change, answering what it asks
rehearsal check --wait

# Check a change and wait for the verdict
rehearsal check --wait --what "Adds a usage limit to vouchers." --why "Shops asked for a way to stop a code being shared without end." --where "Vouchers, then open a voucher." --flag "A usage limit of 0."

# Check a change from a script
rehearsal check --what "Adds a usage limit to vouchers." --wait --json

# See what it would hand over, and start nothing
rehearsal check --what "Adds a usage limit to vouchers." --dry-run
```

## rehearsal check show

Show a check of a change, and its verdict once it has one.

Reads the check `rehearsal check` started. With `--wait` it stays until the verdict and exits as `rehearsal check` `--wait` does.

```sh
rehearsal check show <check-id> [flags]
```

| Argument | Description |
| --- | --- |
| `<check-id>` | The check, by the ID `rehearsal check` printed. |

| Flag | Description |
| --- | --- |
| `--wait` | Stay until the verdict. The exit code is 0 only when the check passes. |
| `--timeout <time>` | With `--wait`, how long to wait, such as 20m. The default is 30m, at most 2h. |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |
| `--project <project>` | Project ID, slug or name. Defaults to `REHEARSAL_PROJECT_ID` or `rehearsal.config.json`. |

Needs a sign-in with the `testing:read` scope and permission to read projects.

Ctrl+C stops waiting. The check keeps going.

```sh
# Show a check
rehearsal check show <check-id>

# Wait for its verdict from a script
rehearsal check show <check-id> --wait --json
```
