## Switch context

Select the account or sandbox that the CLI uses for subsequent commands. Run the command without an account ID to choose from an interactive list of authorized contexts.

When you provide an account ID, the CLI selects a sandbox by default. Use `--live` to select live mode. You can only select contexts authorized during [stripe login](https://docs.stripe.com/cli/login.md) or [stripe reauth](https://docs.stripe.com/cli/reauth.md).

**Command:** `stripe switch context`

### Arguments

- `[account_id]`
  The ID of an authorized account or sandbox. Omit it to choose a context interactively.

### Flags

- `--live`
  Select live mode for the specified account. Without this flag, the command selects a sandbox.

### Examples

**Choose a context interactively**

```sh
stripe switch context
```

**Switch to an account in a sandbox**

```sh
stripe switch context acct_1234
```

**Switch to an account in live mode**

```sh
stripe switch context acct_1234 --live
```
