Skip to main content

shift-cli login

Authenticate with the Shift platform.

Usage

shift-cli login

Description

Opens your default browser for Google OAuth authentication. After successful login, the token is stored in ~/.shift/auth.json.

Headless / CI Environments

For environments without a browser (CI pipelines, remote servers), authenticate using an API key instead:

export SHIFT_API_KEY=your-api-key-here
shift-cli status # Authenticated via API key

When SHIFT_API_KEY is set, the CLI uses it for all requests and does not require shift-cli login.

Token Storage

Tokens are persisted in ~/.shift/auth.json with restrictive file permissions (0o600). The CLI automatically includes the token in subsequent gateway requests.

Examples

# Interactive login (opens browser)
shift-cli login

# Verify authentication
shift-cli status