Skip to content

Environment variables

VariablePurpose
WISP_PROVIDERProvider name: openai-codex, openai, xai, deepseek, openai-compatible, anthropic, google, or fake
WISP_MODELModel override; blank uses the provider default
WISP_MODEDefault mode for invocations without --prompt; prompt runs require explicit --mode
WISP_TUI_RENDERERTUI renderer: line, fullscreen, or textual
WISP_SESSION_DIRSession storage directory; defaults to ~/.wisp/sessions
WISP_AUTH_FILEAuth file path; defaults to ~/.wisp/auth.json
WISP_OPENAI_COMPATIBLE_CONFIGJSON object configuring one OpenAI-compatible endpoint; overrides the user-settings openai_compatible object
WISP_TRUSTTrust the current project for one process: 1 to opt in, 0 to force untrusted
WISP_TRUST_FILERelocate the global trust store; must be absolute, but is otherwise accepted as supplied
WISP_EFFORTReasoning effort override
WISP_RETRY_MAX_RETRIESProvider retry count; defaults to 2, set 0 to disable
WISP_RETRY_BASE_DELAY_SECONDSInitial retry delay; defaults to 0.5
WISP_RETRY_MAX_DELAY_SECONDSMaximum retry delay; defaults to 30
WISP_CONTEXT_RESERVE_TOKENSMinimum tokens reserved outside estimated input context; defaults to 16384
WISP_AUTO_COMPACTIONAutomatic threshold compaction and overflow recovery; defaults to true
WISP_UPDATE_CHECKSix-hour non-blocking PyPI update notice; defaults to true

Provider credentials

VariableProvider
OPENAI_API_KEYopenai
XAI_API_KEYxai
DEEPSEEK_API_KEYdeepseek
ANTHROPIC_API_KEYanthropic
GOOGLE_API_KEY · GEMINI_API_KEYgoogle
<CUSTOM_PROVIDER>_API_KEYA custom OpenAI-compatible provider; hyphens become underscores
OPENAI_COMPATIBLE_API_KEYFallback for custom OpenAI-compatible providers

Each is required only for the matching provider. See Providers & auth for storage and precedence details.

WISP_OPENAI_COMPATIBLE_CONFIG accepts provider_name, base_url, default_model, optional requires_api_key, and optional absolute ca_bundle fields. The value must be a JSON object; invalid JSON or unknown fields fail configuration instead of being ignored. It overrides the structured endpoint in ~/.wisp/settings.json, while an explicit SDK configuration value overrides the environment.

WISP_TRUST and WISP_TRUST_FILE are read only from the real process environment, never from project files, and WISP_TRUST is never persisted — see Tools & safety.

WISP_MODE applies only when neither a mode nor a prompt is supplied on the command line. For example, WISP_MODE=json wisp -p "hello" still uses text output; write wisp -p "hello" --mode json for a machine-readable prompt run.

Released under the MIT License.