Environment variables let you configure Bolt without touching any config files — useful in CI pipelines, Docker containers, and shared environments where you cannot commit credentials. They are read once at startup and cannot be changed while Bolt is running.
Reference
Provider API keys
Bolt discovers provider credentials from environment variables automatically — no bolt providers login step required. Each provider looks for a specific environment variable, and Bolt will use it if the variable is set, regardless of what is stored in auth.json.
Set provider API keys in your shell profile (e.g. ~/.zshrc, ~/.bashrc) or in a .env file loaded by your shell. You can also reference them from the config file using the ${VAR_NAME} syntax in a provider.*.apiKey field so that keys are never stored in plaintext.
Common provider variables:
Run bolt models --verbose to see which environment variable each configured provider expects.
Usage examples