Skip to main content
Before you can run agents or manage resources, the oz CLI needs to know who you are. Warp supports two authentication methods: interactive browser-based login (best for local development) and API key authentication (best for CI/CD pipelines and automated scripts). Both methods provide full access to the same CLI commands.

Interactive login

Run oz login to open a browser window and authenticate with your Warp account. Your session is stored locally and reused for subsequent commands.
oz login
To confirm which account is active, use oz whoami:
oz whoami
To end the session:
oz logout

API key authentication

For non-interactive environments — such as GitHub Actions, CI pipelines, or scripts running on remote servers — use an API key instead of the browser flow. You can supply the key in two ways: As a flag (takes precedence over the environment variable):
oz run list --api-key sk_warp_...
As an environment variable (recommended for CI/CD):
export WARP_API_KEY=sk_warp_...
oz run list
In CI environments, store WARP_API_KEY as a secret in your pipeline configuration rather than hard-coding it in scripts.

When to use API keys vs interactive login

ScenarioRecommended method
Local developmentInteractive login (oz login)
GitHub Actions / CIWARP_API_KEY environment variable
Automated scripts on a serverWARP_API_KEY environment variable
Shared workstationInteractive login

Reference

oz login

Opens a browser window to authenticate with Warp. Stores the session token locally.
oz login

oz logout

Removes the locally stored session token.
oz logout

oz whoami

Prints information about the currently authenticated user, including your user ID and email.
oz whoami

Advanced: server URL overrides

In self-hosted or staging deployments, you can override the Warp server endpoints the CLI connects to using environment variables. These are advanced options not required for standard use.
Environment variableDescription
WARP_SERVER_ROOT_URLOverride the root HTTPS server URL
WARP_WS_SERVER_URLOverride the WebSocket server URL
export WARP_SERVER_ROOT_URL=https://warp.example.com
export WARP_WS_SERVER_URL=wss://warp.example.com
oz agent run-cloud --prompt "Run tests"
Setting these overrides points the CLI to a different backend. Only use them if you are running a self-hosted Warp deployment or have been instructed to by Warp support.

Build docs developers (and LLMs) love