CLI Login

Authenticate the CLI via browser with a magic link.

Login

bash
cueapi login

This starts the device code authentication flow:

  1. CLI generates a code (e.g., ABCD-1234)
  2. Opens your browser to the verification page
  3. You enter your email in the browser
  4. CueAPI sends a magic link to your email
  5. You click the link to verify
  6. CLI automatically receives your API key
$ cueapi login

Your device code: ABCD-1234
Opening browser for verification...
Waiting for verification...
Logged in as you@example.com
API key saved to ~/.config/cueapi/credentials.json

Check current user

bash
cueapi whoami
Email: you@example.com
Plan: Free
Active cues: 3 / 10
Executions: 42 / 300

Logout

bash
cueapi logout          # Remove default profile
cueapi logout --all    # Remove all profiles

Multiple profiles

Use --profile to manage multiple accounts:

bash
cueapi --profile work login
cueapi --profile work list
cueapi --profile personal login

API key precedence

The CLI resolves API keys in this order:

  1. --api-key flag
  2. CUEAPI_API_KEY environment variable
  3. Profile from ~/.config/cueapi/credentials.json