Skip to main content
The Goose CLI provides a powerful command-line interface for interacting with AI agents, managing sessions, and running recipes.

Installation

Install Goose using the installation script:
Or on Windows:

Initial Setup

Run the configuration command to set up your provider:
This interactive wizard will guide you through:
  • Choosing a provider (OpenRouter, Tetrate, or manual configuration)
  • Setting up API credentials
  • Selecting a model
  • Configuring extensions

Core Commands

Starting a Session

Start an interactive session:
Start a session in a specific directory:
Resume a previous session:

Managing Sessions

List all sessions:
List sessions with filters:
Example output:

Exporting Sessions

Export a session to different formats:
The markdown export creates a readable conversation history:

Removing Sessions

Remove sessions by ID:
Remove by name:
Remove using regex pattern:
Interactive removal (select from list):

Diagnostics

Generate a diagnostics bundle for debugging:
This creates a ZIP file containing:
  • Session data
  • Configuration
  • System information
  • Relevant logs

Recipe Commands

Recipes are reusable workflows that automate common tasks.

Listing Recipes

View available recipes:
Example output:
Verbose output with details:

Running Recipes

Run a recipe by name:
Run with parameters:

Validating Recipes

Validate recipe syntax:
Successful validation:
Generate a deeplink to open a recipe in Goose Desktop:
Output:
Open recipe directly in desktop app:

Configuration Commands

Provider Configuration

Reconfigure provider settings:
Select “Configure Providers” to:
  • Change provider (e.g., from OpenAI to Anthropic)
  • Update API keys
  • Select a different model
  • Configure provider-specific settings

Extension Management

Add extensions:
Select “Add Extension” and choose:
  • Built-in Extension: Pre-packaged extensions (developer, memory, etc.)
  • Command-line Extension: Run local scripts or commands
  • Remote Extension: Connect to HTTP/MCP servers
Toggle extensions on/off:
Select “Toggle Extensions” to enable/disable without removing. Remove extensions:
Select “Remove Extension” (only disabled extensions can be removed).

Settings Configuration

Configure various settings:
Select “goose settings” to configure:
  • goose mode: Auto, Approve, Smart Approve, or Chat
  • Telemetry: Enable/disable anonymous usage data
  • Tool Permission: Set permissions for individual tools
  • Tool Output: Control verbosity (high/medium/all)
  • Max Turns: Maximum autonomous turns
  • Secret Storage: Keyring vs file-based storage
  • Experiments: Toggle experimental features

Information Commands

System Information

View system and configuration details:
Example output:

Update Check

Check for updates:

Environment Variables

Key environment variables that affect CLI behavior:
  • GOOSE_PROVIDER: Override configured provider
  • GOOSE_MODEL: Override configured model
  • GOOSE_MODE: Set mode (auto/approve/smart_approve/chat)
  • GOOSE_TELEMETRY_OFF: Disable telemetry (set to 1)
  • GOOSE_CLI_MIN_PRIORITY: Tool output verbosity (0.0-1.0)
  • GOOSE_DISABLE_KEYRING: Use file-based secret storage
See Environment Variables for complete reference.

Common Workflows

Quick Code Review

1

Start session in project

2

Request review

Type your request:
3

Export results

Running a Recipe

1

List available recipes

2

Validate recipe

3

Run recipe

Tips and Tricks

Session Management

  • Use descriptive session names for easy identification
  • Regularly export important sessions for documentation
  • Clean up old sessions with goose session remove

Performance

  • Use --format json for scripting and automation
  • Limit session list results with --limit for faster output
  • Use working directory filters to narrow down sessions

Debugging

  • Generate diagnostics bundles when reporting issues
  • Check goose info to verify configuration
  • Use verbose mode on recipe list for detailed information

Exit Codes

The CLI uses standard exit codes:
  • 0: Success
  • 1: General error
  • 2: Configuration error
  • 3: Network/API error
Use in scripts: