Overview
- Interactive Sign in (Recommended): Sign in via a browser or by pasting a token in the terminal. Ideal for daily local use.
- Environment Variable: Authenticate using a Personal Access Token. Suitable for CI/CD pipelines and headless automation environments.
Interactive Sign in
/login at the interactive prompt:
- Login with Qoder Platform (Browser): Opens a browser window to authenticate using your Qoder account.
- Use Qoder Personal Access Token (QODER_PERSONAL_ACCESS_TOKEN): Sets the
QODER_PERSONAL_ACCESS_TOKENenvironment variable using a token generated in your Qoder settings.
/loginYou can also use the alias/signin.
When the Browser Cannot Be Opened Automatically
If your environment does not support automatically opening a browser (e.g., remote servers or containers), set theNO_BROWSER=true environment variable. Qoder CLI will then print the sign-in URL for you to manually copy and open in a browser:
Automatic Token Refresh
After signing in via the browser, Qoder CLI automatically refreshes the token in the background, so you don’t need to manually sign in again for daily use.Using a Personal Access Token
Obtaining a Token
Create and manage your Personal Access Token on the following page:https://qoder.com/account/integrations
Authenticating via Environment Variables
Set the token in theQODER_PERSONAL_ACCESS_TOKEN environment variable:
If valid tokens are set both via the/logincommand and this environment variable, the token provided by/logintakes precedence.
Authentication-Related Environment Variables
Checking Authentication Status
/status in an interactive session to open the status panel, which includes two tabs: Usage and Status. The Usage tab displays the API quota and token usage for the current session (plan type, quota usage, session duration, total code changes, etc.), while the Status tab shows the current CLI status information. This is the most direct entry point for troubleshooting if you suspect an authentication issue.
Sign out
/logout at the interactive prompt:
If you authenticated using the/logoutYou can also use the alias/signout, which will prompt for confirmation before signing out.
QODER_PERSONAL_ACCESS_TOKEN environment variable, you must clear this environment variable before running /logout. Otherwise, the next startup will automatically sign in using that token again.
Troubleshooting
- Browser did not open automatically: Set
NO_BROWSER=trueand manually visit the printed URL. - Sign-in callback failed or timed out: Ensure your local network can access Qoder services. Check your proxy settings if necessary. See Network and Proxy.
- PAT is invalid or expired: Go to the account integration page to regenerate the token and update
QODER_PERSONAL_ACCESS_TOKEN.