Skip to main content
Goose supports extensive configuration through environment variables, allowing you to override settings, customize behavior, and integrate with CI/CD pipelines.

Provider Configuration

GOOSE_PROVIDER

Override the configured provider. Values: Provider name (e.g., anthropic, openai, databricks) Example:
Default: Value from ~/.config/goose/config.yaml

GOOSE_MODEL

Override the configured model. Values: Model identifier (e.g., claude-4.5-sonnet, gpt-4) Example:
Default: Value from configuration

Provider-Specific API Keys

Each provider has its own API key environment variable:

Anthropic

OpenAI

OpenRouter

Databricks

Google

Groq

Ollama

Mode Configuration

GOOSE_MODE

Set the operational mode for goose. Values:
  • auto: Full autonomy, no approval required
  • approve: All actions require approval
  • smart_approve: File modifications require approval
  • chat: No tools or file modifications
Example:
Default: auto Use cases:
  • auto: Rapid development, trusted environments
  • approve: Maximum control, learning goose
  • smart_approve: Balance of speed and safety
  • chat: Simple Q&A, no file access

Telemetry and Privacy

GOOSE_TELEMETRY_OFF

Disable anonymous telemetry collection. Values: 1 or true to disable Example:
Default: Telemetry enabled (opt-in during setup) What we collect:
  • Operating system and version
  • Provider and model used
  • Extension usage counts (names only)
  • Session metrics (duration, tokens)
  • Error types (no messages)
What we never collect:
  • Conversation content
  • Code or file contents
  • API keys or credentials
  • Personal information

CLI Behavior

GOOSE_CLI_MIN_PRIORITY

Control tool output verbosity in CLI. Values: Float from 0.0 to 1.0
  • 0.0: Show all tool output
  • 0.2: Medium importance and above
  • 0.8: High importance only
Example:
Default: 0.0 (show all) Configuration via CLI:

GOOSE_WORKING_DIR

Set default working directory for sessions. Example:
Default: Current directory

Security Configuration

GOOSE_DISABLE_KEYRING

Disable system keyring, use file-based secret storage. Values: 1, true, or any non-empty string Example:
Default: Keyring enabled Platforms:
  • macOS: Uses system Keychain
  • Windows: Uses Credential Manager
  • Linux: Uses Secret Service (requires D-Bus)
Security note: File-based storage saves secrets to ~/.config/goose/secrets.yaml in plain text. Only use when keyring is unavailable.

Extension Configuration

Extension Environment Variables

Extensions can define custom environment variables. Common patterns:
Refer to extension documentation for specific variables.

Advanced Configuration

GOOSE_TOOLSHIM

Enable experimental tool shimming with local models. Values: 1 or true Example:
Use case: Use local model to interpret tool calls from providers without native tool support.

GOOSE_TOOLSHIM_OLLAMA_MODEL

Specify Ollama model for tool shimming. Example:
Requires: GOOSE_TOOLSHIM=true

Max Turns Configuration

Limit autonomous agent turns before requiring user input. Configuration via settings:

Claude-Specific Configuration

CLAUDE_THINKING_TYPE

Configure extended thinking mode for Claude models. Values:
  • adaptive: Claude decides when to think (recommended)
  • enabled: Fixed token budget for thinking
  • disabled: No extended thinking
Example:
Supported models: claude-4.5-sonnet and newer

CLAUDE_THINKING_EFFORT

Set adaptive thinking effort level. Values:
  • low: Minimal thinking
  • medium: Moderate thinking
  • high: Deep reasoning (default)
  • max: No constraints (Opus 4.6 only)
Example:

CLAUDE_THINKING_BUDGET

Set fixed token budget for thinking mode. Values: Integer (tokens) Example:

Gemini-Specific Configuration

GEMINI_THINKING_LEVEL

Configure thinking level for Gemini 3 models. Values:
  • low: Better latency, lighter reasoning
  • high: Deeper reasoning, higher latency
Example:

Development and Debugging

RUST_LOG

Control Rust logging verbosity. Values:
  • error: Only errors
  • warn: Warnings and errors
  • info: General information
  • debug: Detailed debugging
  • trace: Very verbose
Example:
Module-specific logging:

GOOSE_TEST_ERROR

Enable test error mode in desktop app (development only). Example:

CI/CD Integration

Example GitHub Actions workflow:

Configuration Precedence

Goose loads configuration in this order (highest to lowest priority):
  1. Environment variables (highest priority)
  2. Configuration file (~/.config/goose/config.yaml)
  3. Default values (lowest priority)
Example:

Secrets Precedence

Secrets follow this precedence:
  1. Environment variables (e.g., ANTHROPIC_API_KEY)
  2. System keyring (if enabled)
  3. Secrets file (~/.config/goose/secrets.yaml if keyring disabled)
Security best practice: Use environment variables in CI/CD, keyring for local development.

Common Patterns

Project-Specific Configuration

Create .env file in project root:
Load and run:

Multiple Provider Setup

Switch between providers:

Secure CI Configuration

Platform-Specific Paths

macOS/Linux

  • Config: ~/.config/goose/config.yaml
  • Secrets: ~/.config/goose/secrets.yaml
  • Sessions: ~/.config/goose/sessions/
  • Logs: ~/.local/share/goose/logs/

Windows

  • Config: %APPDATA%\goose\config.yaml
  • Secrets: %APPDATA%\goose\secrets.yaml
  • Sessions: %APPDATA%\goose\sessions\
  • Logs: %APPDATA%\goose\logs\

Troubleshooting

Verify environment variables

Test configuration

Clear and reconfigure