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:
export GOOSE_PROVIDER=anthropic
goose session start
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:
export GOOSE_MODEL=claude-4.5-sonnet
goose session start
Default: Value from configuration

Provider-Specific API Keys

Each provider has its own API key environment variable:

Anthropic

export ANTHROPIC_API_KEY=sk-ant-...

OpenAI

export OPENAI_API_KEY=sk-...

OpenRouter

export OPENROUTER_API_KEY=sk-or-...

Databricks

export DATABRICKS_HOST=https://your-workspace.databricks.com
export DATABRICKS_TOKEN=dapi...

Google

export GOOGLE_API_KEY=AIza...

Groq

export GROQ_API_KEY=gsk_...

Ollama

export OLLAMA_HOST=http://localhost:11434

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:
export GOOSE_MODE=smart_approve
goose session start
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:
export GOOSE_TELEMETRY_OFF=1
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:
# Show only important output
export GOOSE_CLI_MIN_PRIORITY=0.8
goose session start
Default: 0.0 (show all) Configuration via CLI:
goose configure
# Select "goose settings" > "Tool Output"

GOOSE_WORKING_DIR

Set default working directory for sessions. Example:
export GOOSE_WORKING_DIR=/path/to/project
goose session start
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:
export GOOSE_DISABLE_KEYRING=true
goose configure
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:
# API keys for extension services
export GDRIVE_API_KEY=your-key
export SLACK_BOT_TOKEN=xoxb-...

# Service endpoints
export WIKI_SERVER_URL=http://localhost:8000
export MCP_SERVER_URL=http://localhost:3000/messages

# Extension-specific settings
export MEMORY_STORAGE_PATH=/custom/path
export DEVELOPER_SHELL=/bin/zsh
Refer to extension documentation for specific variables.

Advanced Configuration

GOOSE_TOOLSHIM

Enable experimental tool shimming with local models. Values: 1 or true Example:
export GOOSE_TOOLSHIM=true
export GOOSE_TOOLSHIM_OLLAMA_MODEL=llama3.2
goose session start
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:
export GOOSE_TOOLSHIM_OLLAMA_MODEL=qwen3
Requires: GOOSE_TOOLSHIM=true

Max Turns Configuration

Limit autonomous agent turns before requiring user input. Configuration via settings:
goose configure
# Select "goose settings" > "Max Turns"

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:
export CLAUDE_THINKING_TYPE=adaptive
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:
export CLAUDE_THINKING_TYPE=adaptive
export CLAUDE_THINKING_EFFORT=high

CLAUDE_THINKING_BUDGET

Set fixed token budget for thinking mode. Values: Integer (tokens) Example:
export CLAUDE_THINKING_TYPE=enabled
export CLAUDE_THINKING_BUDGET=16000

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:
export GEMINI_THINKING_LEVEL=high

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:
export RUST_LOG=debug
goose session start
Module-specific logging:
export RUST_LOG=goose=debug,goose_mcp=trace

GOOSE_TEST_ERROR

Enable test error mode in desktop app (development only). Example:
export GOOSE_TEST_ERROR=true
npm run start:test-error

CI/CD Integration

Example GitHub Actions workflow:
name: Code Review
on: [pull_request]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Install Goose
        run: |
          curl -fsSL https://getgoose.ai/install.sh | bash
      
      - name: Run Review
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          GOOSE_PROVIDER: anthropic
          GOOSE_MODEL: claude-4.5-sonnet
          GOOSE_MODE: auto
          GOOSE_TELEMETRY_OFF: 1
        run: |
          goose run --recipe code-review

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:
# config.yaml has GOOSE_PROVIDER=openai
# This overrides it:
export GOOSE_PROVIDER=anthropic
goose session start  # Uses anthropic

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:
# .env
GOOSE_MODE=smart_approve
GOOSE_WORKING_DIR=/workspace/myproject
GOOSE_CLI_MIN_PRIORITY=0.2
Load and run:
source .env
goose session start

Multiple Provider Setup

Switch between providers:
# Use Anthropic
alias goose-claude="GOOSE_PROVIDER=anthropic GOOSE_MODEL=claude-4.5-sonnet goose"

# Use OpenAI
alias goose-gpt="GOOSE_PROVIDER=openai GOOSE_MODEL=gpt-4 goose"

goose-claude session start

Secure CI Configuration

# Never hardcode secrets
# Use CI secret management:
export ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }}

# Disable telemetry in CI
export GOOSE_TELEMETRY_OFF=1

# Use auto mode for automation
export GOOSE_MODE=auto

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

env | grep GOOSE
env | grep ANTHROPIC

Test configuration

goose info  # Shows active configuration

Clear and reconfigure

# Backup current config
cp ~/.config/goose/config.yaml ~/.config/goose/config.yaml.bak

# Remove config
rm -rf ~/.config/goose/

# Reconfigure
goose configure

Build docs developers (and LLMs) love