Authentication Commands
The CRE CLI supports two authentication methods:
- Browser-based login (
cre login) — Interactive login for local development - API key (
CRE_API_KEYenvironment variable) — Non-interactive authentication for CI/CD pipelines and headless environments
Browser-based authentication
cre login
Starts the interactive authentication flow. This command opens your browser for user login and saves your credentials locally.
Usage:
cre login
Authentication steps:
- The CLI opens your default web browser to the login page
- Enter your account email address
- Enter your account password
- Enter your one-time password (OTP) from your authenticator app
- The CLI automatically captures and saves your credentials locally
For a detailed walkthrough with screenshots, see Logging in with the CLI.
cre logout
Revokes authentication tokens and removes local credentials. This invalidates the current authentication tokens and deletes stored credentials from your machine.
Usage:
cre logout
cre whoami
Shows your current account details. This command fetches and displays your account information, including your email and organization ID. This works with both browser-based login and API key authentication.
Usage:
cre whoami
API key authentication
For CI/CD pipelines, automated scripts, or any environment where a browser is not available, you can authenticate using an API key. When the CRE_API_KEY environment variable is set, the CLI uses it automatically — no cre login required.
Creating an API key
- Log in to the CRE platform
- Navigate to the Organization page
- Select the APIs tab
- Click + Organization API
- Give your key a name and confirm
Using the API key
Set the CRE_API_KEY environment variable before running CLI commands:
export CRE_API_KEY="your-api-key"
cre whoami
When CRE_API_KEY is set, the CLI skips the browser-based login flow entirely. All commands that require authentication (deploying, managing workflows, etc.) will use the API key.
In a CI/CD pipeline, configure CRE_API_KEY as a secret environment variable in your platform and run CLI commands as usual.
Authentication methods summary
Method | Best for | How it works |
|---|---|---|
cre login | Local development | Opens a browser for interactive login with 2FA |
CRE_API_KEY | CI/CD, scripts, headless environments | Set the environment variable — no browser needed(*) |
(*) API key authentication requires your account to have Early Access approval.
Learn more
- Logging in with the CLI — Step-by-step browser login guide with screenshots
- Managing Authentication — Session management, expiration, and logout
- Account Management — Link keys after authentication
- Deploying Workflows — Requires authentication