Cue
Setup

Auth

Manage accounts and API keys in Cue CLI

Cue CLI stores two types of credentials to connect you to AI services.

Credential Types

Accounts

Your Cue backend login. Cue supports multiple accounts — useful for separating work and personal use. Used for:

  • WebSocket connection to Cue servers
  • Syncing with your phone
  • Remote agent control
  • Activity feed, posts, and notifications

AI Keys

Direct API credentials for AI providers:

  • Anthropic — Claude models
  • OpenAI — GPT models
  • Gemini — Google AI models

Each account selects which AI key to use via the provider field.

Storage

Credentials are stored in ~/.cue/auth-profiles.json:

{
  "version": 1,
  "accounts": {
    "cue:work": {
      "email": "me@company.com",
      "endpoint": "https://api.cueos.ai",
      "token": "eyJhbGci...",
      "provider": "anthropic:api"
    },
    "cue:personal": {
      "email": "me@gmail.com",
      "endpoint": "https://api.cueos.ai",
      "token": "eyJhbGci..."
    }
  },
  "ai_keys": {
    "anthropic:api": {
      "type": "api_key",
      "api_key": "sk-ant-..."
    }
  },
  "defaults": {
    "account": "cue:work"
  }
}

Account names follow the pattern cue:<email_prefix> (e.g., cue:john for john@example.com).

Commands

Check Status

cue auth

Shows your current account, selected AI key, and available keys.

List All

cue auth list

Shows all accounts and AI keys with details.

Switch Account

# Switch to a different account
cue auth use cue:personal

# Switch account for specific environment
cue auth use cue:work --env production

Switch AI Key

# Persist to config
cue auth use anthropic:api

# Session only (not saved)
cue auth use anthropic:api --session

# Set for specific environment
cue auth use openai:api --env production

Add Account

Log in with a different email to add another account:

cue
/login
# Follow prompts — new account will be added without removing existing ones

Remove Account

cue auth remove cue:old-account

Add New Key

cue auth new
# Interactive setup for Anthropic, OpenAI, or Gemini

Reset All

cue auth reset
# Clears all accounts and API keys

Environment Variables

Environment variables take priority over stored credentials:

# Cue backend
export CUE_ACCESS_TOKEN=eyJhbGci...

# Direct providers
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
export GEMINI_API_KEY=...

Providers

Use --provider to choose how requests are routed:

ProviderFlagDescription
cue--provider cueThrough Cue backend (default)
anthropic--provider anthropicDirect to Anthropic
openai--provider openaiDirect to OpenAI
gemini--provider geminiDirect to Gemini
# Use Anthropic directly with your local API key
cue --provider anthropic -p "hello"

# Use Cue backend (uses your account's selected key or backend's key)
cue --provider cue -p "hello"

Resolution Order

For Accounts

  1. Environment variable CUE_ACCESS_TOKEN
  2. Environment default (envDefaults[env].account)
  3. Global default (defaults.account)

For AI Keys

  1. Environment variables (ANTHROPIC_API_KEY, etc.)
  2. Account's selected provider (account.provider)
  3. First matching key in ai_keys

One-Command Usage

Use --profile to select an account or AI key for a single command without changing your default:

With Accounts

# Post activity as work account
cue --profile cue:work activity "Checked deploy logs"

# Check personal feed
cue --profile cue:personal feed

# Send notification via work account
cue --profile cue:work notify "Build Done" "Completed successfully"

With AI Keys

cue --profile anthropic:api -p "hello"
cue --profile openai:api -p "hello"

This is useful for scripting and automation where you want to use a specific account without affecting interactive sessions.

On this page