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
- The CLI starts a short-lived device authorization and prints a verification URL plus a user code.
- Your default browser opens
/cli/authorizeon the dashboard (or open the URL yourself with--no-open). - Sign in if needed, complete Terms of Service / onboarding when prompted, then Confirm or Decline.
- On approval, the CLI stores a personal API key (
vthu_…) and your active organization in~/.config/voicethere/credentials.json(mode0600), and clears any previously stored org/project API key from that file so interactive commands use the new personal key. - 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
--forceto 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_KEYVOICETHERE_USER_API_KEYVOICETHERE_API_BASEVOICETHERE_ORG_IDVOICETHERE_CREDENTIALS_PATH— credentials file locationVOICETHERE_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.jsonor paste keys into chat logs.
See also
- Control plane API — REST contract used by the CLI
- Terms of Service acceptance — CLI/API TOS gate
- @voicethere/cli on npm