Configuration
RETELL_API_KEY has the highest precedence:
export RETELL_API_KEY=your_api_keyvac retell agents list --limit 1For saved credentials, run:
vac retell login # global XDG pathvac retell login --local # ./.voice-agent.jsonvac retell login requires an interactive TTY and masks the API key while it is entered. Non-interactive automation should set RETELL_API_KEY instead.
New writes use mode 0600 and this provider-scoped schema:
{ "providers": { "retell": { "apiKey": "your_api_key", "defaultFormat": "json" } }}Resolution order
Section titled “Resolution order”src/providers/retell/services/config.ts reads:
RETELL_API_KEY./.voice-agent.json$XDG_CONFIG_HOME/voice-agent/config.json, or~/.config/voice-agent/config.jsonwhen XDG is unset./.retellrc.json~/.retellrc.json$XDG_CONFIG_HOME/retell/config.json, with the same home fallback
The last three are read-only legacy fallbacks. The legacy flat { "apiKey": "...", "defaultFormat": "json" } schema is also read but never written back.
The CLI does not automatically load .env. Export the variable into the command process or use vac retell login.
Twilio
Section titled “Twilio”TWILIO_ACCOUNT_SID plus TWILIO_AUTH_TOKEN, or TWILIO_ACCOUNT_SID plus TWILIO_API_KEY and TWILIO_API_SECRET, overrides the saved file. If any of those variables is set, the file is not used to fill in the rest. Setting both an auth token and an API key is rejected.
vac twilio loginvac twilio login --localLogin is interactive and TTY-only. It writes providers.twilio into the same file Retell uses, without removing providers.retell. Local ./.voice-agent.json overrides the global file. Search order is the environment, then the local file, then $XDG_CONFIG_HOME/voice-agent/config.json.