WriftAI Logo

WriftAI CLI Gets Browser-Based Login

Jul 14, 2026

·

2 minute read

author image

Muhammad Hassaan Farooq

Developers

Share

One thing the WriftAI CLI was always missing was an automatic login flow. You had to go to the dashboard, create an access token and paste it manually into the login command. It wasn't as seamless as it should've been. Well wriftai auth login just got a major upgrade, it now supports the complete OAuth 2.0 device authorization flow specified in RFC 8628.

What's new

Starting with version 0.54, when you type in wriftai auth login the CLI will redirect you to the browser where you can log in to WriftAI and approve the sign in request and then you're done.

The CLI will automatically grab an access token and store it. It's that simple.

Managing access tokens

Under the hood, the WriftAI CLI still uses access tokens for authentication. Every successful login generates a new one, named using the format Device Authorization <timestamp>, where the timestamp is an ISO 8601 UTC timestamp of when the token was created — for example, Device Authorization 2026-07-11T19:23:28.161Z. The access tokens created by the CLI have no expiry so you will never be logged out automatically. All created access tokens can be found on the Access Tokens page on the WriftAI dashboard.

Revoking access tokens

Since the access tokens created have no expiry, they have to be manually revoked. If you feel like your access token is compromised or you want to revoke access to the CLI on a certain device, you can visit the Access Tokens page on the WriftAI dashboard and delete the corresponding access token. Any device still using that token will immediately lose access.

Access token Limit

WriftAI limits the maximum number of access tokens you can have on your account. Because of this, CLI login can fail if your account has already hit the limit.

You should delete any unused access tokens from the dashboard and then reattempt to log in with the WriftAI CLI. The login flow should now complete successfully.

Non-interactive login

The WriftAI CLI still supports non interactive login for environments where user input or the browser is unavailable. You can set the WRIFTAI_ACCESS_TOKEN environment variable with a token generated manually from the dashboard, and authenticate without needing to run the login command.

Alternatively you can call the login command with the --token-stdin flag and pipe in your access token.


1$ echo "$WRIFTAI_ACCESS_TOKEN" | wriftai auth login --token-stdin

More options are available by running wriftai auth login --help.

Try it out

Upgrade the WriftAI CLI to 0.54 and try out the new login flow. For full documentation of the WriftAI CLI check out the docs.

Scale Your Projects.
Build With Confidence.

Scale your projects effortlessly with WriftAI. Seamlessly integrate and optimize performance as you expand and innovate.

© 2026 Sych Inc.