---
title: "auth switch"
description: "Switch active authentication profile"
canonical: "https://pgbeam.com/docs/cli/auth/switch"
last-updated: "2026-10-29T19:01:20.000Z"
---

# auth switch

> Switch active authentication profile

URL: https://pgbeam.com/docs/cli/auth/switch

{/* Auto-generated from CLI commands. Do not edit. Run `pnpm generate:cli-docs` to regenerate. */}

Switch the active authentication profile. If no profile name is provided, an interactive selector is shown listing all available profiles. The active profile determines which API token and organization are used for subsequent commands.

## Usage

```bash
pgbeam auth switch [name]
```

## Options

| Option   | Description                                                                     | Required | Default |
| -------- | ------------------------------------------------------------------------------- | -------- | ------- |
| `<name>` | Name of the profile to switch to. If omitted, an interactive selector is shown. | No       | -       |

> **Global options**
>
> All [global options](/docs/cli/global-options) (`--token`, `--profile`,
> `--project`, `--org`, `--json`, `--no-color`, `--no-trunc`, `--debug`) are
> also available on this command.

## Examples

```bash
# Interactive profile selection
pgbeam auth switch

# Switch to a specific profile by name
pgbeam auth switch production
```

## Output

Prints a confirmation message (e.g. `Switched to profile "production".`). If the profile is not found, exits with an error.