Authentication
The CLI uses the OAuth device authorization flow (RFC 8628) — the same pattern used by the GitHub CLI. No passwords are entered in the terminal.How the Device Flow Works
Direct API Key Login
If you already have an API key (e.g., for CI/CD or scripts), skip the browser flow:Logout
~/.dealmachine/config.json.
Check Auth Status
--verify to test your key against the server:
Credential Storage
Credentials are stored at:0600 permissions (owner-only read/write) and contains:
Revoking Access
To revoke a CLI key:- Go to Developer Settings
- Find the key (named “CLI” or the device name)
- Click Revoke
dm logout to clean up local credentials, then dm login to re-authenticate.
Troubleshooting
Browser doesn't open automatically
Browser doesn't open automatically
Use the
--no-browser flag and manually visit the URL:Code expired
Code expired
Device codes expire after 30 days. Run
dm login again to get a fresh code.Wrong organization
Wrong organization
Run
dm logout first, then dm login again. Make sure you select the correct organization in the browser.Invalid credentials
Invalid credentials
Your key may have been revoked. Run:If it fails, run
dm logout && dm login to re-authenticate.