Skip to content

Environment Variables

The engine reads a small set of environment variables. They are useful for scripted runs and CI, where you would rather not write a config file. Most have a matching CLI flag.

VariableMaps toDescription
PROVIDER--providerProvider to use, for example anthropic.
API_KEY--api-keyAPI key for the active provider.
BASE_URL--base-urlBase URL for an OpenAI-compatible provider.
MODEL--modelModel id.
ANTHROPIC_API_KEYAnthropic key, read when the provider is Anthropic and no other key is set.
OPENAI_API_KEYOpenAI key, read when the provider is OpenAI and no other key is set.

For AWS Bedrock and Google Vertex AI, the engine also reads the standard cloud credentials (for example AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY). See Providers and Auth.

VariableDescription
OLLAMA_BASE_URLOverride the Ollama endpoint used by the ollama: model route.
VariableDescription
WAYLAND_HOMEBase directory for engine data. When set, it is used directly. When unset, configuration, sessions, and memory live under the platform config directory in a wayland-core subfolder (on macOS, ~/Library/Application Support/wayland-core; on Linux, $XDG_DATA_HOME/wayland-core or ~/.config/wayland-core; on Windows, %APPDATA%\wayland-core), while logs, cron jobs, evolved prompts, and user agents default to ~/.wayland.
XDG_DATA_HOMEOn Linux, used as the config base ($XDG_DATA_HOME/wayland-core) when WAYLAND_HOME is unset.
RUST_LOGLog filter, for example info or debug. Defaults to info.
TERMRead to decide whether a terminal can drive the full-screen TUI. A value of dumb falls back to the line REPL.

When the engine looks for an API key, it checks, in order:

  1. The --api-key flag.
  2. The config file providers.<name>.api_key.
  3. The API_KEY environment variable.
  4. ANTHROPIC_API_KEY or OPENAI_API_KEY, depending on the provider.
  5. Saved OAuth credentials from --login.

AWS Bedrock and Google Vertex AI use their own cloud credentials and do not need a traditional API key.