# Project commands

> Find your workspaces, projects and apps, and the environments where they run.

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

These commands find the workspaces, projects and apps your sign-in can reach. An environment is where an app runs, such as production or staging. You pass these identifiers to other commands as `--workspace`, `--project`, `--app` and `--environment`. [`init`](https://rehearsal.dev/docs/reference/cli-setup.md) saves the workspace, project and app for a repository. These commands only read.

## rehearsal workspaces list

List the workspaces this sign-in can reach.

Newest first, and only the workspaces this sign-in may do something in. Pass an ID from this list as `--workspace`.

```sh
rehearsal workspaces 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. |

Needs a sign-in with the `testing:read` scope.

```sh
# List workspaces
rehearsal workspaces list

# Read them in a script
rehearsal workspaces list --json
```

## rehearsal workspaces show

Show one workspace and what you may do in it.

```sh
rehearsal workspaces show [workspace-id] [flags]
```

| Argument | Description |
| --- | --- |
| `[workspace-id]` | The workspace to read. Defaults to the selected one. |

| Flag | Description |
| --- | --- |
| `--workspace <workspace-id>` | Workspace ID. Defaults to `REHEARSAL_WORKSPACE_ID` or `rehearsal.config.json`. |

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

```sh
# Show the selected workspace
rehearsal workspaces show

# Show one by identifier
rehearsal workspaces show <workspace-id> --json
```

## rehearsal projects list

List the projects in the selected workspace.

Newest first. Pass an ID from this list as `--project`.

```sh
rehearsal projects 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`. |

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

```sh
# List projects
rehearsal projects list --workspace <workspace-id>

# Read them in a script
rehearsal projects list --workspace <workspace-id> --json
```

## rehearsal projects show

Show one project with how much is in it.

```sh
rehearsal projects show [project-id] [flags]
```

| Argument | Description |
| --- | --- |
| `[project-id]` | The project to read. Defaults to the selected one. |

| 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 the selected project
rehearsal projects show

# Show one by identifier
rehearsal projects show <project-id> --json
```

## rehearsal apps list

List the apps in the selected project.

Oldest first, the order they were added in. Each app is a web app, a desktop app, an iPhone app or an Android app. Two apps of different platforms may share a name; add `--platform` where you name one by `--app`.

```sh
rehearsal apps 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 apps
rehearsal apps list

# List them in another project
rehearsal apps list --project <project-id> --json
```

## rehearsal apps show

Show one app, its platform and how many environments it has.

```sh
rehearsal apps show [app-id] [flags]
```

| Argument | Description |
| --- | --- |
| `[app-id]` | The app to read. Defaults to the selected one. |

| 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`. |
| `--app <app>` | App ID, name or the host of one of its environments. Defaults to `REHEARSAL_APP_ID` or `rehearsal.config.json`. |
| `--platform <platform>` | With `--app`, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |

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

```sh
# Show the selected app
rehearsal apps show

# Show one by identifier
rehearsal apps show <app-id> --json
```

## rehearsal environments list

List the environments tests can run on.

Oldest first. A local environment names the computer it is connected from. To see whether that connection is up now, run `rehearsal connect list` there.

```sh
rehearsal environments list [flags]
```

| Flag | Description |
| --- | --- |
| `--kind <kind>` | Only environments of this kind. One of `production`, `preview`, `staging` or `local`. |
| `--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`. |
| `--app <app>` | App ID, name or the host of one of its environments. Defaults to `REHEARSAL_APP_ID` or `rehearsal.config.json`. |
| `--platform <platform>` | With `--app`, which kind of app: web, electron, ios or android. Needed only when two apps share a name. |

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

```sh
# List every environment
rehearsal environments list

# List one app's local environments
rehearsal environments list --app <app-id> --kind local --json
```

## rehearsal environments show

Show one environment.

```sh
rehearsal environments show [environment] [flags]
```

| Argument | Description |
| --- | --- |
| `[environment]` | The environment to read: its ID, a kind such as staging, or a computer name. Left out, it asks which. |

| 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
# Pick an environment to show
rehearsal environments show

# Read one in a script
rehearsal environments show staging --json
```
