Skip to main content
This page covers variables a user or developer may set locally. Server-only deployment secrets are not part of the public docs contract.

CLI runtime

VariablePurpose
SF_API_KEYAPI key override (takes precedence over config file)
SF_API_URLBase URL override (default https://simplefunctions.dev)
SF_TRADING_ENABLEDSet to true to allow sf buy/sell/cancel
SF_AUTO_CONFIRMSet to 1 to bypass confirmInteractive (non-TTY agent flow)
SF_DEBUGVerbose logs to stderr
KALSHI_API_KEY_IDKalshi key id
KALSHI_PRIVATE_KEY_PEMKalshi PEM contents (alternative to file path)
KALSHI_BASE_URLOverride Kalshi API base
POLYMARKET_WALLETWallet address override
DEFAULT_MODELLLM for sf agent
OPENROUTER_API_KEYOpenRouter key for sf agent
ANTHROPIC_API_KEYAnthropic key (alternative path)

Portfolio and exchange credentials

Exchange variables are optional. They are needed only for local exchange reads or live trading commands. Prefer sf setup for persistent local config because sf status --json can show which values are present without exposing secret material. Do not put API keys or exchange private keys in public logs, prompts, client-side bundles, or CI output.

Confirming environment

sf status --json | jq '.env'
Returns which env vars the CLI sees set (values redacted).