Authentication
Browser Login (recommended)
dw loginOpens your browser to the Doubleword SSO page. After authenticating, the CLI receives API keys for both the inference and admin APIs. Credentials are stored in ~/.dw/credentials.toml with 0600 permissions.
Logging into an Organization
dw login --org my-orgWhen you log in with --org, the CLI creates credentials scoped to that organization. Batches, files, and usage are billed to the org.
Custom Account Name
dw login --as workBy default the account is named after your email or org. Use --as to set a custom name.
API Key Login (headless)
For SSH sessions, containers, and CI:
dw login --api-key <YOUR_INFERENCE_KEY>API key login stores only the inference key. Commands that use the admin API will not be available, including dw whoami, dw usage, dw requests, dw keys, and dw webhooks. For full functionality, use browser login (with port forwarding for remote sessions).
Credentials Storage
Credentials are stored in ~/.dw/credentials.toml:
~/.dw/
├── config.toml # Active account, server URLs
└── credentials.toml # API keys (0600 permissions)Logging Out
# Log out of the active account
dw logout
# Log out of a specific account
dw logout work
# Log out of all accounts
dw logout --allChecking Your Identity
dw whoamiShows the authenticated user and active organization (if any).