CLI
Login
The default authentication method uses device code flow:
wt loginA URL and code are displayed in the terminal. Open the URL in your browser, enter the code, and sign in. Credentials are stored in ~/.workthin/config.json.
Device Code Flow Details
wt logininitiates the device code flow and displays a URL with a one-time code- Open the URL in your browser and approve the request
- An API key is generated and stored in
~/.workthin/config.json wt initvalidates saved credentials before using them — if expired, it re-initiates the login flow
API Key
For CI/CD and automation, set an API key via environment variable:
export WORKTHIN_API_KEY=wt_a1b2c3d4e5f6g7h8i9j0Generate API keys in the web UI under Settings > API Keys.
Auth Status
Check your current authentication state:
wt auth-statusLogout
wt logoutConfig
View or update CLI configuration:
wt configPriority Order
The CLI resolves credentials in this order:
WORKTHIN_API_KEYenvironment variable (highest priority)- Stored credentials from
wt login(~/.workthin/config.json)