Skip to main content
The login command authenticates you with Anyware using a device code flow.

Usage

anyware login

What Happens

  1. Device code request - CLI requests a device code from the server
  2. Browser opens - Verification URL opens in your default browser
  3. User confirmation - You confirm the device code in the browser
  4. OAuth flow - Complete authentication via WorkOS
  5. Token storage - Credentials saved locally

Example

$ anyware login
Opening browser for authentication...
Please confirm code: ABCD-1234

Waiting for confirmation...

Login successful!
Logged in as: [email protected]

Credentials Storage

After successful login, credentials are stored at:
~/.anyware/config.json
This file contains:
  • accessToken - JWT for API authentication
  • userId - Your user ID
  • deviceId - Unique identifier for this device
  • email - Your email address
  • apiUrl - API endpoint
  • llmUrl - LLM proxy endpoint

Re-authentication

If your token expires, you’ll be prompted to login again. Simply run:
anyware login

Troubleshooting

Browser doesn’t open

If the browser doesn’t open automatically:
  1. Copy the URL shown in the terminal
  2. Open it manually in your browser
  3. Complete the authentication flow

Login fails

If login fails:
# Clear any existing credentials
anyware logout

# Try logging in again
anyware login

Verification URL expired

Device codes expire after a few minutes. If you see an expiration error, run anyware login again to get a fresh code.

See Also