CLI
auth

auth

Manage CLI authentication.

Usage

onvera auth login [--browser] [--key] [--token <token>]
onvera auth logout

Subcommands

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 login

Interactive API key entry:

onvera auth login --key

Direct API key:

onvera auth login --token onv_sk_live_...

Logout:

onvera auth logout

Description

Browser Login

Browser login is the default and recommended method:

  1. CLI creates a login session
  2. Opens your browser to the Onvera login page
  3. You authenticate and approve CLI access
  4. CLI receives an API key and stores it locally

API Key Authentication

You can authenticate using an API key directly:

  • Interactive: onvera auth login --key prompts 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:

  1. Check the terminal output for the login URL
  2. Copy and paste the URL into your browser manually
  3. Complete authentication in the browser

Invalid API key

Error:

API error: Invalid API key

Solution: 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 expired

Solution: Create a new API key in the dashboard (opens in a new tab) and authenticate again.

Related Commands