login command authenticates your device, while logout removes your credentials.
convex login
Login to Convex to authenticate your device for using the CLI.Usage
Options
Provide a name for the device being authorized. This helps identify different machines in your account settings.
Proceed with login even if a valid access token already exists for this device. Use this to switch accounts or refresh authentication.
Don’t automatically open the login link in the default browser. The URL will be printed to the console instead.
How to log in. Options:
paste, auto, poll. Defaults to auto (guesses based on the environment).auto: Automatically choose the best methodpaste: Manual token paste flowpoll: Poll for authentication completion
Examples
First-time login
Authenticate your device for the first time:- Open your browser to the Convex authentication page
- Ask you to authorize the device
- Save the authentication token locally
Login on a remote server
When SSH’d into a server where you can’t open a browser:Name your device
Identify different machines in your account:Switch accounts
Log in with a different account:Login in CI/CD
Use the manual paste flow for automation:convex login status
Check your login status and list accessible teams.Usage
Examples
Check login status
See if you’re logged in and which teams you have access to:convex logout
Log out of Convex on this machine by removing your stored credentials.Usage
Examples
Log out
Remove authentication from your device:Switch to a different account
Log out and then log back in with different credentials:Authentication details
Where credentials are stored
Authentication tokens are stored in your global Convex configuration file:- macOS/Linux:
~/.convex/config.json - Windows:
%USERPROFILE%\.convex\config.json
Device authorization
Each device you use the CLI on needs to be authorized. You can:- View all authorized devices in your Convex dashboard account settings
- Revoke device access at any time
- Name devices for easy identification
Team access
After logging in, you can:- Access all teams you’re a member of
- Create new projects in any team
- Deploy to any deployment you have permissions for
npx convex login status to see which teams you have access to.