stella auth
Store, list, and remove BYOK provider keys in credentials.toml — the persistent home for your API keys.
stella auth manages the BYOK provider keys stored in ~/.config/stella/credentials.toml. It is the command that writes the credentials file the credential chain reads from — a small, deliberate surface for a handful of keys, not a config language. It never prints a secret value and needs no model API key of its own.
Synopsis
stella auth set <provider> [--key <key> | --stdin]
stella auth remove <provider>
stella auth listWhat it does
A key stored here persists across sessions and shells, so you don't re-export an environment variable every time. It sits near the end of the credential chain: a key resolved from --api-key, an environment variable, or settings.json still takes precedence. Run stella config or stella models to see which source actually wins for a given provider.
<provider> is a provider id — a built-in such as zai, anthropic, or openai, or a custom provider id you defined in settings.json.
stella auth set <provider>
Store (or replace) a provider's key. With no flag, Stella shows an interactive masked prompt — the recommended path, since nothing lands in your shell history.
| Flag | Meaning |
|---|---|
--key <key> | Pass the key inline. Visible in shell history and ps output — prefer --stdin or the interactive prompt. Conflicts with --stdin. |
--stdin | Read the key from stdin (one trimmed line) — for scripts and secret managers. |
# Interactive, masked (recommended)
stella auth set anthropic
# From a secret manager, nothing in shell history
printf '%s' "$MY_KEY" | stella auth set zai --stdinstella auth remove <provider>
Forget a provider's stored key.
stella auth remove openaistella auth list
List every provider with a key in credentials.toml, each with a redacted preview and its resolution source.
stella auth listPrefer the interactive prompt or --stdin over --key. A key passed with --key is visible in your shell history and in ps output. See Credentials for the full resolution chain and precedence.