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

# checkly switch

> Switch between multiple Checkly accounts.

The `checkly switch` command switches between multiple Checkly accounts that you have access to with your current credentials. Useful when you need to manage monitoring across different organizations or environments.

> **Prerequisites**
>
> Before using `checkly switch`, ensure you have:
>
> * Valid Checkly account authentication (run `npx checkly login` if needed)
> * Access to multiple Checkly accounts (team memberships, client projects, etc.)
>
> If you only have access to one account, this command will indicate no alternative accounts are available.

## Usage

The basic command displays available accounts and provides an interactive selection interface.

```bash Terminal theme={null}
npx checkly switch [options]
```

| Option | Required | Description |
| - | - | - |
| `--account-id, -a` | - | The id of the account you want to switch to. |

## Command Options

**--account-id, -a** `string`

The `switch` command asks you to select an account interactively by default. Use this option to switch accounts non-interactively by specifying the target account ID directly.

**Usage:**

```bash Terminal theme={null}
npx checkly switch --account-id="a43....."
npx checkly switch -a="a43....."
```

## Examples

**Standard Switch**

```bash Terminal theme={null}
# Standard account switching
npx checkly switch

# Output
? Which account do you want to use?
  Production
  Staging
  Demo
  ...
```

**Automatic Switch**

```bash Terminal theme={null}
# Verbose account switching with details
npx checkly switch --account-id="a43....."

# Output
Account switched to "a43....."
```

## Troubleshooting

### No Alternative Accounts

If you see "No alternative accounts available":

* You only have access to one Checkly account
* Contact account administrators to request access to additional accounts
* Consider using separate authentication for different accounts

### Account Not Listed

If an expected account doesn't appear:

* Verify you have active access to that account
* Check that your user hasn't been removed from the account
* Try logging out and back in to refresh account permissions

## Related Commands

* [`checkly login`](https://www.checklyhq.com/docs/cli/checkly-login) - Sign in to your Checkly account
* [`checkly whoami`](https://www.checklyhq.com/docs/cli/checkly-whoami) - Display current account information


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.