D
DreamLake

CLI Reference

login

Authenticate with a DreamLake Server instance via OAuth 2.0 device auth flow.

dreamlake login [--url <server-url>] [--no-browser]

Flags

FlagTypeDefaultDescription
--urlstring$DREAMLAKE_REMOTEDreamLake Server URL
--no-browserflagDisplay QR code + URL instead of opening browser

What Happens

  1. CLI requests a device code from vuer-auth (https://auth.vuer.ai)
  2. Opens your browser to the approval page (or shows a QR code + URL if --no-browser)
  3. Polls vuer-auth every 5 seconds until you approve (up to 10 minutes)
  4. Exchanges the vuer-auth token for a long-lived dreamlake JWT via POST /auth/exchange
  5. Stores the token locally (macOS Keychain, encrypted file, or plaintext fallback)

If you're already logged in, running login again overwrites the stored token.

Token Storage

The dreamlake token is saved using the best available backend:

BackendLocation
System keyringmacOS Keychain / Windows Credential Manager
Encrypted file~/.dreamlake/tokens.encrypted
Plaintext (fallback)~/.dreamlake/tokens.json

Use dreamlake logout to remove the stored token.

Examples

# Login to local dev server
dreamlake login --url http://localhost:10334
 
# Headless machine (SSH) — shows QR code + URL to scan with phone
dreamlake login --url http://localhost:10334 --no-browser

See Device Auth Flow for the full technical design.