Skip to main content
The CLI authenticates using the WorkOS Device Authorization flow. Your session credentials are stored locally in ~/.config/lazylocales/.

login

Authenticate with your LazyLocales account:
npx lazylocales login
1

Initiate device authorization

The CLI connects to WorkOS and generates a device code.
2

Authorize in browser

A browser window opens with a verification URL. If it doesn’t open automatically, the CLI prints the URL and a one-time code to enter manually.
Open this URL in your browser to log in:
  https://auth.workos.com/device?user_code=ABCD-1234

Or go to https://auth.workos.com/device and enter code:
  ABCD-1234
3

Session stored

Once authorized, the CLI stores your access token, refresh token, and user info in ~/.config/lazylocales/.
✓ Logged in as you@example.com

logout

Clear stored credentials:
npx lazylocales logout
✓ Logged out from you@example.com
  Stored credentials have been cleared.

whoami

Display the currently logged-in user:
npx lazylocales whoami
Logged in as you@example.com (user_abc123)

Session expiry

Sessions expire automatically. If your session has expired, the CLI will prompt you to log in again when running any command. You can also re-authenticate at any time:
npx lazylocales login

CI/CD environments

In CI/CD pipelines, use an API token instead of interactive login. Set apiToken in your configuration file or use the LAZYLOCALES_API_TOKEN environment variable. See CI/CD Setup for a complete guide.