Skip to main content

Environment Variables

Goose supports various environment variables that allow you to customize its behavior. This guide provides a comprehensive list of available environment variables grouped by their functionality.

Model Configuration

These variables control the language models and their behavior.

Basic Provider Configuration

These are the minimum required variables to get started with Goose.

VariablePurposeValuesDefault
GOOSE_PROVIDERSpecifies the LLM provider to useSee available providersNone (must be configured)
GOOSE_MODELSpecifies which model to use from the providerModel name (e.g., "gpt-4", "claude-3.5-sonnet")None (must be configured)
GOOSE_TEMPERATURESets the temperature for model responsesFloat between 0.0 and 1.0Model-specific default

Examples

# Basic model configuration
export GOOSE_PROVIDER="anthropic"
export GOOSE_MODEL="claude-3.5-sonnet"
export GOOSE_TEMPERATURE=0.7

Advanced Provider Configuration

These variables are needed when using custom endpoints, enterprise deployments, or specific provider implementations.

VariablePurposeValuesDefault
GOOSE_PROVIDER__TYPEThe specific type/implementation of the providerSee available providersDerived from GOOSE_PROVIDER
GOOSE_PROVIDER__HOSTCustom API endpoint for the providerURL (e.g., "https://api.openai.com")Provider-specific default
GOOSE_PROVIDER__API_KEYAuthentication key for the providerAPI key stringNone

Examples

# Advanced provider configuration
export GOOSE_PROVIDER__TYPE="anthropic"
export GOOSE_PROVIDER__HOST="https://api.anthropic.com"
export GOOSE_PROVIDER__API_KEY="your-api-key-here"

Planning Mode Configuration

These variables control Goose's planning functionality.

VariablePurposeValuesDefault
GOOSE_PLANNER_PROVIDERSpecifies which provider to use for planning modeSee available providersFalls back to GOOSE_PROVIDER
GOOSE_PLANNER_MODELSpecifies which model to use for planning modeModel name (e.g., "gpt-4", "claude-3.5-sonnet")Falls back to GOOSE_MODEL

Examples

# Planning mode with different model
export GOOSE_PLANNER_PROVIDER="openai"
export GOOSE_PLANNER_MODEL="gpt-4"

Tool Configuration

These variables control how Goose handles tool permissions and their execution.

VariablePurposeValuesDefault
GOOSE_MODEControls how Goose handles tool execution"auto", "approve", "chat", "smart_approve""smart_approve"
GOOSE_TOOLSHIMEnables/disables tool call interpretation"1", "true" (case insensitive) to enablefalse
GOOSE_TOOLSHIM_OLLAMA_MODELSpecifies the model for tool call interpretationModel name (e.g. llama3.2, qwen2.5)System default
GOOSE_CLI_MIN_PRIORITYControls verbosity of tool outputFloat between 0.0 and 1.00.0

Examples

# Enable tool interpretation
export GOOSE_TOOLSHIM=true
export GOOSE_TOOLSHIM_OLLAMA_MODEL=llama3.2
export GOOSE_MODE="auto"
export GOOSE_CLI_MIN_PRIORITY=0.2 # Show only medium and high importance output

Security Configuration

These variables control security related features.

VariablePurposeValuesDefault
GOOSE_ALLOWLISTControls which extensions can be loadedURL for allowed extensions listUnset
GOOSE_DISABLE_KEYRINGDisables the system keyring for secret storageSet to any value (e.g., "1", "true", "yes") to disable. The actual value doesn't matter, only whether the variable is set.Unset (keyring enabled)
tip

When the keyring is disabled, secrets are stored here:

  • macOS/Linux: ~/.config/goose/secrets.yaml
  • Windows: %APPDATA%\Block\goose\config\secrets.yaml

Langfuse Integration

These variables configure the Langfuse integration for observability.

VariablePurposeValuesDefault
LANGFUSE_PUBLIC_KEYPublic key for Langfuse integrationStringNone
LANGFUSE_SECRET_KEYSecret key for Langfuse integrationStringNone
LANGFUSE_URLCustom URL for Langfuse serviceURL StringDefault Langfuse URL
LANGFUSE_INIT_PROJECT_PUBLIC_KEYAlternative public key for LangfuseStringNone
LANGFUSE_INIT_PROJECT_SECRET_KEYAlternative secret key for LangfuseStringNone

Notes

  • Environment variables take precedence over configuration files.
  • For security-sensitive variables (like API keys), consider using the system keyring instead of environment variables.
  • Some variables may require restarting Goose to take effect.
  • When using the planning mode, if planner-specific variables are not set, Goose will fall back to the main model configuration.