VoiceThere

CLI login

The @voicethere/cli package authenticates against the VoiceThere API. Interactive machines should use browser login; CI and automation should pass an API key explicitly.

Browser login (default)

npm install -g @voicethere/cli
voicethere login
  1. The CLI starts a short-lived device authorization and prints a verification URL plus a user code.
  2. Your default browser opens /cli/authorize on the dashboard (or open the URL yourself with --no-open).
  3. Sign in if needed, complete Terms of Service / onboarding when prompted, then Confirm or Decline.
  4. On approval, the CLI stores a personal API key (vthu_…) and your active organization in ~/.config/voicethere/credentials.json (mode 0600), and clears any previously stored org/project API key from that file so interactive commands use the new personal key.
  5. If a project is linked in .voicethere/config.json, the CLI verifies access with the new personal key before reporting success. A mismatch leaves the project config unchanged and exits with an error — secrets never go in the project config.

Unset VOICETHERE_API_KEY / VOICETHERE_USER_API_KEY before browser login — environment credentials override the file, so the CLI will not mint a key while those variables are set.

Skip when already logged in

Running voicethere login again validates existing credentials and skips a new authorization when they still work:

  • Linked project → successful project fetch is required before skip.
  • No linked project → successful project list is enough.
  • Use --force to mint a new personal key for this machine without revoking keys on other devices.

Manual API key login

For CI and scripts, pass keys on the command line (or via environment variables):

# Org / project key (common in CI)
voicethere login --api-key "$VOICETHERE_API_KEY"

# Personal key for org and account commands
voicethere login --user-api-key "$VOICETHERE_USER_API_KEY"

# Both (optional)
voicethere login --api-key "$VOICETHERE_API_KEY" --user-api-key "$VOICETHERE_USER_API_KEY"

Create org and personal keys in the dashboard (Settings). Prefer personal keys for interactive org/account commands; keep org/project keys for deploy automation.

Environment overrides

These environment variables override values in the credentials file (useful for isolated test runs):

  • VOICETHERE_API_KEY
  • VOICETHERE_USER_API_KEY
  • VOICETHERE_API_BASE
  • VOICETHERE_ORG_ID
  • VOICETHERE_CREDENTIALS_PATH — credentials file location
  • VOICETHERE_PROJECT_CONFIG — project config path

Security

  • Confirm or decline only via the dashboard form (POST). The approval page never shows your API key.
  • Device codes are short-lived; declined or expired logins fail clearly in the CLI.
  • Do not commit credentials.json or paste keys into chat logs.

See also

← All documentation