documentation/docs/guides/cli-providers.md
:::warning Deprecated — Use ACP Providers
The Claude Code (claude-code), Codex (codex), and Gemini CLI (gemini-cli) providers are deprecated. Use the ACP providers (claude-acp, codex-acp) instead, which support goose extensions via MCP and use the standardized Agent Client Protocol. For Gemini, use the Gemini (gemini_oauth) provider which authenticates via OAuth. CLI providers are kept for backward compatibility only.
:::
goose can make use of pass-through providers that integrate with existing CLI tools from Anthropic, OpenAI, Cursor, and Google. These providers allow you to use your existing Claude Code, Codex, Cursor Agent, and Google Gemini CLI subscriptions through goose's interface, adding session management, persistence, and workflow integration capabilities to these tools.
:::warning Limitations These providers don’t fully support all goose features, may have platform or capability limitations, and can sometimes require advanced debugging if issues arise. They’re included here purely as a convenience. :::
CLI providers are useful if you:
goose session interface across all providers:::warning Extensions CLI providers do not give you access to goose's extension ecosystem (MCP servers, third-party integrations, etc.). They use their own built-in tools to prevent conflicts. If you need goose's extensions, use standard API providers instead. :::
The Claude Code provider integrates with Anthropic's Claude CLI tool, allowing you to use Claude models through your existing Claude Code subscription.
Features:
Requirements:
The Codex provider integrates with OpenAI's Codex CLI tool, allowing you to use OpenAI models through your existing ChatGPT Plus/Pro subscription or API credits.
Features:
low, medium, high, xhigh; none is only supported on non-codex models like gpt-5.2)Requirements:
npm i -g @openai/codex or brew install --cask codex)CODEX_SKIP_GIT_CHECK=true to bypass this requirementThe Cursor provider integrates with Cursor's CLI agent, providing access to through your existing subscription.
Features:
Requirements:
The Gemini CLI provider integrates with Google's Gemini CLI tool, providing access to Gemini models through your Google AI subscription.
Features:
Requirements:
Install Claude CLI Tool
Follow the installation instructions for Claude Code to install and configure the Claude CLI tool.
Authenticate with Claude
Ensure your Claude CLI is authenticated and working
Configure goose
Set the provider environment variable:
export GOOSE_PROVIDER=claude-code
Or configure through the goose CLI using goose configure:
┌ goose-configure
│
◇ What would you like to configure?
│ Configure Providers
│
◇ Which model provider should we use?
│ Claude Code
│
◇ Model fetch complete
│
◇ Enter a model from that provider:
│ default
Install Codex CLI Tool
Install the Codex CLI using npm or Homebrew:
npm i -g @openai/codex
# or
brew install --cask codex
Authenticate with OpenAI
Run codex and follow the authentication prompts. You can use your ChatGPT account or API key.
Configure goose
Set the provider environment variable:
export GOOSE_PROVIDER=codex
Or configure through the goose CLI using goose configure:
┌ goose-configure
│
◇ What would you like to configure?
│ Configure Providers
│
◇ Which model provider should we use?
│ OpenAI Codex CLI
│
◇ Model fetch complete
│
◇ Enter a model from that provider:
│ gpt-5.2-codex
Install Cursor agent Tool
Follow the installation instructions for Cursor Agent to install and configure the cursor agent tool.
Authenticate with Cursor
Ensure your Cursor Agent is authenticated and working
Configure goose
Set the provider environment variable:
export GOOSE_PROVIDER=cursor-agent
Or configure through the goose CLI using goose configure:
┌ goose-configure
│
◇ What would you like to configure?
│ Configure Providers
│
◇ Which model provider should we use?
│ Cursor Agent
│
◇ Model fetch complete
│
◇ Enter a model from that provider:
│ default
Install Gemini CLI Tool
Follow the installation instructions for Gemini CLI to install and configure the Gemini CLI tool.
Authenticate with Google
Ensure your Gemini CLI is authenticated and working.
Configure goose
Set the provider environment variable:
export GOOSE_PROVIDER=gemini-cli
Or configure through the goose CLI using goose configure:
┌ goose-configure
│
◇ What would you like to configure?
│ Configure Providers
│
◇ Which model provider should we use?
│ Gemini CLI
│
◇ Model fetch complete
│
◇ Enter a model from that provider:
│ default
Once configured, you can start a goose session using these providers just like any others:
goose session
CLI providers also work well with planning mode when you want one model for strategy and another for execution:
# Use Claude Code for execution, OpenAI for planning
export GOOSE_PROVIDER=claude-code
export GOOSE_MODEL=default
export GOOSE_PLANNER_PROVIDER=openai
export GOOSE_PLANNER_MODEL=gpt-4o
goose session
| Environment Variable | Description | Default |
|---|---|---|
GOOSE_PROVIDER | Set to claude-code to use this provider | None |
GOOSE_MODEL | Model to use (only sonnet or opus are passed to CLI) | claude-sonnet-4-20250514 |
CLAUDE_CODE_COMMAND | Path to the Claude CLI command | claude |
Known Models:
The following models are recognized and passed to the Claude CLI via the --model flag. If GOOSE_MODEL is set to a value not in this list, no model flag is passed and Claude Code uses its default:
default (opus)sonnethaikuPermission Modes (GOOSE_MODE):
| Mode | Claude Code Flag | Behavior |
|---|---|---|
auto | --dangerously-skip-permissions | Bypasses all permission prompts |
smart-approve | --permission-prompt-tool stdio | Routes permission checks through the control protocol (prompts as needed) |
approve | --permission-prompt-tool stdio | Routes permission checks through the control protocol (prompts as needed) |
chat | (none) | Default Claude Code behavior |
:::tip Approve Mode Integration
When using approve or smart_approve mode with Claude Code, goose routes Claude Code's permission prompts through goose's confirmation interface. This means:
This provides a consistent permission experience across all goose providers while leveraging Claude Code's built-in safety checks.
Example with approve mode:
GOOSE_PROVIDER=claude-code GOOSE_MODE=approve goose session
:::
| Environment Variable | Description | Default |
|---|---|---|
GOOSE_PROVIDER | Set to cursor-agent to use this provider | None |
CURSOR_AGENT_COMMAND | Path to the Cursor Agent command | cursor-agent |
| Environment Variable | Description | Default |
|---|---|---|
GOOSE_PROVIDER | Set to codex to use this provider | None |
GOOSE_MODEL | Model to use (only known models are passed to CLI) | gpt-5.2-codex |
CODEX_COMMAND | Path to the Codex CLI command | codex |
GOOSE_THINKING_EFFORT | Unified thinking effort (off, low, medium, high, max). Mapped to Codex CLI effort levels (none/low/medium/high/xhigh). | high |
CODEX_ENABLE_SKILLS | Enable Codex skills: true or false | true |
CODEX_SKIP_GIT_CHECK | Skip git repository requirement: true or false | false |
Known Models:
The following models are recognized and passed to the Codex CLI via the -m flag. If GOOSE_MODEL is set to a value not in this list, no model flag is passed and Codex uses its default:
gpt-5.2-codex (400K context, auto-compacting)gpt-5.2 (400K context, auto-compacting)gpt-5.1-codex-max (256K context)gpt-5.1-codex-mini (256K context):::note Legacy Models
These are the default models supported by Codex CLI v0.77.0. To access older or legacy models, you can run codex -m <model_name> directly or configure them in Codex's config.toml. See the Codex CLI documentation for details.
:::
Permission Modes (GOOSE_MODE):
| Mode | Codex Flag | Behavior |
|---|---|---|
auto | --yolo | Bypasses all approvals and sandbox restrictions |
smart-approve | --full-auto | Workspace-write sandbox, approvals only on failure |
approve | (none) | Interactive approvals (Codex default behavior) |
chat | --sandbox read-only | Read-only sandbox mode |
| Environment Variable | Description | Default |
|---|---|---|
GOOSE_PROVIDER | Set to gemini-cli to use this provider | None |
GEMINI_CLI_COMMAND | Path to the Gemini CLI command | gemini |
The CLI providers automatically filter out goose's extension information from system prompts since these CLI tools have their own tool ecosystems. This prevents conflicts and ensures clean interaction with the underlying CLI tools.
CLI providers depend on external tools, so ensure:
CODEX_SKIP_GIT_CHECK=trueCLI providers offer a way to use existing AI tool subscriptions through goose's interface, adding session management and workflow integration capabilities. They're particularly valuable for users with existing CLI subscriptions who want unified session management and recipe integration.