PgBeam
PgBeam Docs
auth

auth login

Authenticate with PgBeam

Authenticate with PgBeam to access your projects and databases. Login uses an API key, which you generate from the PgBeam dashboard under Settings > API Keys; running the command prompts you to paste it. The key is verified against the API before it is stored (an invalid key fails the login), and your organization is resolved automatically: a single visible organization is selected for you, multiple organizations prompt a pick. Credentials are stored in a local profile on disk (~/.config/pgbeam/). You can maintain multiple profiles for different environments using the --profile flag.

Usage

pgbeam auth login [flags]

Options

OptionDescriptionRequiredDefault
--api-keyAuthenticate with an API key (the default and only method)Nofalse

Global options

All global options (--token, --profile, --project, --org, --json, --no-color, --no-trunc, --debug) are also available on this command.

Examples

# Login with an API key (prompts for the key)
pgbeam auth login

# Login with an API key and save to a named profile
pgbeam auth login --profile production

Output

On success, prints a confirmation with the authenticated profile name and the selected organization, ready for pgbeam projects list. The token is stored locally and used for all subsequent commands. A key the API rejects (401) is not stored and the command exits non-zero.

On this page