You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every variable Cortex reads, by name. Values are never documented here — put
secrets in your OS keyring or your CI secret store, not in a shell profile that
gets committed or shared.
Environment variables sit between config files and command-line flags in
precedence: a flag beats a variable, a variable beats a
config file.
Locations
Variable
Effect
CORTEX_HOME
Root for config and data. Default ~/.cortex. Checked for writability at startup.
CORTEX_CONFIG_DIR
Config directory, taking priority over CORTEX_HOME
Base URL of the Cortex API. Defaults to https://api.cortex.foundation.
Interactive use should prefer cortex login, which stores the session in the OS
keyring. See Signing in.
Code runtime
The TUI and cortex exec create a Cloud Code session unless you explicitly
select This PC or SSH. That is the shipped default (Designer Q9). A fresh
install can complete a turn without extra configuration. This PC and SSH are
opt-in and may ship in 0.1.x.
Variable
Effect
CORTEX_COMPUTER
Where tools run. Unset (or cloud) uses Cloud. Set this_pc (aliases: this-pc, local, paired, connected) or ssh to select those runtimes. This PC and SSH require an already connected Code session; Cortex will not substitute Cloud.
CORTEX_SSH_HOST
SSH target. When set (or CORTEX_SSH_TARGET), the runtime is SSH — same connected-session rule as CORTEX_COMPUTER=ssh.
CORTEX_SSH_TARGET
Alias of CORTEX_SSH_HOST.
Model selection
Variable
Effect
CORTEX_MODEL
Default model
CORTEX_DEFAULT_MODEL
Fallback default model
CORTEX_PROVIDER
Provider id. Defaults to cortex.
CORTEX_MAX_TOKENS
Default response length cap
CORTEX_TEMPERATURE
Default sampling temperature
CORTEX_PRICING_<MODEL>
Per-model price used by cortex stats
Logging and diagnostics
Variable
Effect
CORTEX_LOG_LEVEL
Log verbosity when running a subcommand: error, warn, info, debug, trace
RUST_LOG
Overrides the tracing filter entirely when set
RUST_BACKTRACE
Standard Rust backtrace control
NO_COLOR
Disable colour. --color never sets this for child processes.
Server and sandbox
Variable
Effect
CORTEX_LISTEN_ADDR
Listen address for the HTTP API server
CORTEX_JWT_SECRET
Signing secret for the HTTP API server
CORTEX_MDNS_*
mDNS advertisement settings for the HTTP API server
CORTEX_SANDBOX, CORTEX_SANDBOX_*
Injected into sandboxed child processes so they can tell they are sandboxed
CORTEX_GIT_TIMEOUT_SECS
Timeout for git operations
Set for you, not by you
These are populated by Cortex for the processes it spawns. Hook scripts and
plugins can read them; you should not set them yourself.
Used by the named openai / openai-compatible provider id and by /goal live
smoke. Agent mode still uses the Cortex API. Never commit or log key values.
Variable
Effect
OPENAI_BASE_URL
Compatible /v1 base URL. Public default for tests and docs examples: http://84.32.63.4:20128/v1
CORTEX_LLM_BASE_URL
Alias of OPENAI_BASE_URL
OPENAI_API_KEY
API key for that endpoint. Operator injects from local ~/.cortex-private/judge.key
CORTEX_LLM_API_KEY
Alias of OPENAI_API_KEY
CORTEX_LLM_MODEL
Model id. Default for live smoke: cx/gpt-6-astra (gpt-astra 404s)
If no key is set, unit tests still pass and the live smoke prints SKIP: with
this same list.