auth
Manage CLI authentication.
Usage
onvera auth login [--browser] [--key] [--token <token>]
onvera auth logoutSubcommands
auth login
Authenticate with Onvera.
Flags:
--browser- Use browser login (default)--key- Paste API key interactively--token <token>- Provide API key directly
auth logout
Clear stored credentials.
Examples
Browser login (default):
onvera auth loginInteractive API key entry:
onvera auth login --keyDirect API key:
onvera auth login --token onv_sk_live_...Logout:
onvera auth logoutDescription
Browser Login
Browser login is the default and recommended method:
- CLI creates a login session
- Opens your browser to the Onvera login page
- You authenticate and approve CLI access
- CLI receives an API key and stores it locally
API Key Authentication
You can authenticate using an API key directly:
- Interactive:
onvera auth login --keyprompts you to paste the key - Direct:
onvera auth login --token <key>provides the key as an argument
API keys start with onv_sk_live_. Create API keys in the Onvera dashboard (opens in a new tab).
Logout
The logout command removes stored credentials from local storage. It does not revoke the API key on the server.
Configuration Location
Credentials are stored in:
- Linux/macOS:
~/.config/onvera/config.json - Windows:
%APPDATA%\onvera\config.json
Common Failure Modes
Browser doesn't open
If the browser doesn't open automatically:
- Check the terminal output for the login URL
- Copy and paste the URL into your browser manually
- Complete authentication in the browser
Invalid API key
Error:
API error: Invalid API keySolution: Verify the API key is correct and not revoked. Create a new key in the dashboard (opens in a new tab) if needed.
API key expired
Error:
API error: API key has expiredSolution: Create a new API key in the dashboard (opens in a new tab) and authenticate again.
Related Commands
config- Manage CLI configuration- Authentication Guide - Detailed authentication documentation