Getting an API Key
- In the Revyl dashboard, go to Settings → API Keys
- Click Create API Key (or New API key)
- Name your key (e.g.
local-dev,github-actions) and pick an expiration - Click Create and copy the key — it’s only shown once
API keys are only shown once. Store it securely - you’ll need it for the next step.
Interactive Login
The simplest way to authenticate:Check Authentication Status
Verify your current authentication:Logout
Remove stored credentials:Environment Variable (CI/CD)
For CI/CD pipelines, use theREVYL_API_KEY environment variable instead of interactive login:
Overriding with Browser Login
IfREVYL_API_KEY is set in your shell but you need to use a different account locally, run revyl auth login. The browser login will become the active credential for all subsequent interactive CLI commands, even while the env var remains set.
This override persists across commands (revyl dev, revyl build, etc.) until you explicitly log out or log in with a different method. CI/non-interactive environments that only set REVYL_API_KEY without a prior browser login are unaffected.
GitHub Actions Example
GitLab CI Example
Credential Storage
When you runrevyl auth login, credentials are stored in:
.gitignore template.
Never commit API keys to version control. Use environment variables or secrets management for CI/CD.
Troubleshooting
”Invalid API key” Error
- Verify the key hasn’t expired in the Revyl dashboard
- Check for extra whitespace when copying the key
- Ensure you’re using the correct organization’s key
”Network error” During Login
- Check your internet connection
- Verify
api.revyl.aiis accessible from your network - Try
revyl pingto test connectivity
Credentials Not Persisting
- Check write permissions for
~/.revyl/ - Ensure the directory exists:
mkdir -p ~/.revyl
”Org mismatch” After Switching Accounts
If you see an org mismatch error afterrevyl init or revyl dev:
- Run
revyl auth loginto perform a browser login with the correct account - The browser login will override
REVYL_API_KEYfor local commands - Re-run
revyl init --forceto rebind the project to the new account