workthin
workthin
PricingBlogChangelogOverviewQuick StartConcepts

InstallationAuthenticationCommands Reference

Docs for LLMs

llms.txtllms-full.txt
CLI

Login

The default authentication method uses device code flow:

wt login

A 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

  1. wt login initiates the device code flow and displays a URL with a one-time code
  2. Open the URL in your browser and approve the request
  3. An API key is generated and stored in ~/.workthin/config.json
  4. wt init validates 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_a1b2c3d4e5f6g7h8i9j0

Generate API keys in the web UI under Settings > API Keys.

Auth Status

Check your current authentication state:

wt auth-status

Logout

wt logout

Config

View or update CLI configuration:

wt config

Priority Order

The CLI resolves credentials in this order:

  1. WORKTHIN_API_KEY environment variable (highest priority)
  2. Stored credentials from wt login (~/.workthin/config.json)

Installation

Install the workthin CLI via npx or npm and verify the installation.

Commands Reference

Complete reference for all workthin CLI commands.

On this page

LoginDevice Code Flow DetailsAPI KeyAuth StatusLogoutConfigPriority Order