Skip to navigation

Authentication

Manage API keys and profiles for the Atlas CLI

Getting an API Key

  1. Log in to the Atlas Portal
  2. Navigate to Settings > API Keys
  3. Click Create New Key
  4. Copy the key — it will only be shown once

Login

atlas login --api-key YOUR_API_KEY

The CLI validates your key by calling the Atlas API. On success, credentials are saved to ~/.atlas/config.

Verify Login

atlas whoami

Output:

Profile: default
Email: you@company.com
Name: Your Name
Base URL: https://api.youratlas.com/v1/api

Multi-Profile Support

Manage multiple accounts or environments with named profiles:

# Login with named profiles
atlas login --api-key PROD_KEY --profile production
atlas login --api-key STAGING_KEY --profile staging --base-url https://api-staging.youratlas.com/v1/api

List Profiles

atlas profile list

Output:

production (active) — https://api.youratlas.com/v1/api
staging — https://api-staging.youratlas.com/v1/api

Switch Profile

atlas profile use staging

Logout

# Logout current active profile
atlas logout
# Logout a specific profile
atlas logout --profile staging

Config File

Credentials are stored in ~/.atlas/config with restricted file permissions (0600):

active_profile: production
profiles:
production:
api_key: ak_...
base_url: https://api.youratlas.com/v1/api
staging:
api_key: ak_...
base_url: https://api-staging.youratlas.com/v1/api
spec_url: https://cdn.youratlas.com/atlas-cli/openapi.yaml
output_format: table

Never share your API key or commit the config file to version control.