GuidesHosting choices

goose AI agent: install the CLI, providers, modes and recipes

goose, the open-source AI agent from Block now at the Linux Foundation: install the CLI, set a provider and key, permission modes, MCP extensions and recipes.

November 30, 2026The Everpod team
The short answer

goose is a free, open-source AI agent (Apache 2.0) with a desktop app and a CLI. Block built it; since April 2026 it lives at github.com/aaif-goose/goose under the Agentic AI Foundation at the Linux Foundation, with docs at goose-docs.ai. The current release is 1.61.1 (November 26, 2026). Install the CLI on macOS or Linux with brew install block-goose-cli or the download_cli.sh script, then run goose configure to pick a provider and paste its key. It works with any of dozens of model providers or local models; you pay the provider, not goose. The catch: goose runs in autonomous mode by default, so it edits files, deletes files and runs commands without asking until you switch it to approve or smart_approve.

What goose is now, and who runs it

The README describes “an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM”. It is a general agent rather than a coding agent only: it reads and writes files, runs shell commands, and reaches other tools through MCP servers, which goose calls extensions. The same engine sits behind a desktop app for macOS, Linux and Windows, the goose command line, and goose acp, which lets other apps use it as their agent.

“Block goose” is still how most people find it, but the ownership changed. goose was one of the three founding projects of the Agentic AI Foundation, announced by the Linux Foundation on December 9, 2025 alongside Anthropic’s MCP and OpenAI’s AGENTS.md. On April 7, 2026, the goose team announced that “Block has donated goose to the Agentic AI Foundation (AAIF) at the Linux Foundation”: the repository moved from block/goose to aaif-goose/goose, the docs moved to goose-docs.ai, and old doc links redirect. The Homebrew formula kept its old name, block-goose-cli. If you cloned the repository before the move, point your remote at the new home:

git remote set-url origin git@github.com:aaif-goose/goose.git
Copied

It ships often. The releases page shows the ten newest spanning November 9 to 26, ending at 1.61.1, whose fixes include one to “Drop tool approval state from imported sessions to prevent automatic tool execution on session load”.

Install the goose CLI on Linux or macOS

Two routes from the install guide:

# Homebrew, macOS or Linux
brew install block-goose-cli

# the install script; add CONFIGURE=false to skip the setup questions
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash

goose --version
Copied

A piped installer runs whatever that URL serves at the moment you run it; to read it first, download it to a file and open it. As of November 30, the script downloads the release archive for your OS and CPU from the repository’s releases, copies a single goose binary into ~/.local/bin (change it with GOOSE_BIN_DIR), and never uses sudo. Unless CONFIGURE=false is set, it then runs goose configure and offers to add that directory to your PATH in your shell profile. If the directory is not on your PATH, it says:

Warning: goose installed, but $GOOSE_BIN_DIR is not in your PATH.
Copied

Other switches it reads: GOOSE_VERSION=1.61.1 pins a release (what the docs recommend for CI), CANARY=true takes the canary build, and GOOSE_LINUX_VARIANT picks standard, vulkan or musl (musl is chosen by itself on musl-based systems). If the download fails on Linux, the docs say to install bzip2. Update later with goose update, or through Homebrew if that is how you installed it. The desktop app is a separate download (DEB, RPM or Flatpak on Linux) and is not needed on a server.

Configure a provider, and where the key ends up

goose configure walks you through it: choose Configure Providers, pick one, and it asks for that provider’s variable (“Provider Anthropic requires ANTHROPIC_API_KEY, please enter a value.”), then a model from a list. Settings go to ~/.config/goose/config.yaml. The key does not: the configuration docs say goose ignores keys placed in config.yaml, and store them in the system keyring (Keychain on macOS, the Secret Service on Linux desktops) when one is available.

On a headless Linux server there is usually no Secret Service. In that case goose logs “Keyring unavailable. Using file storage for secrets.” and writes the key to ~/.config/goose/secrets.yaml instead, in plain text, with the file readable by your user only. The same happens when GOOSE_DISABLE_KEYRING is set to any value. Anyone who can read that file has your key, so keep it out of backups you share and out of any repository.

A provider’s environment variable takes precedence over a stored secret, and GOOSE_PROVIDER and GOOSE_MODEL override the config file, so a server can skip the wizard entirely. To set this up without the key appearing on screen or in shell history:

read -rsp 'Anthropic API key: ' k; echo
(umask 077; printf 'export ANTHROPIC_API_KEY=%s\n' "$k" > ~/.goose-env); unset k
cat >> ~/.goose-env <<'EOF'
export GOOSE_PROVIDER=anthropic
export GOOSE_MODEL=<a model ID from your provider>
EOF
. ~/.goose-env
Copied

The first > replaces any existing ~/.goose-env. Swap the variable for your provider’s: OPENAI_API_KEY, OPENROUTER_API_KEY, GOOGLE_API_KEY, or OLLAMA_HOST for a local Ollama. goose configure only offers models from its list; a model ID it does not list goes in GOOSE_MODEL. goose info shows which config file and session store it is using.

Models, providers and subscriptions

goose has no models of its own. The README counts “over 85 providers”, and the providers page covers Anthropic, OpenAI, Google Gemini, OpenRouter, Amazon Bedrock, Groq and many more, plus local runners such as Ollama and LM Studio. A model needs tool calling to do anything but chat. A single OpenRouter key is the shortest way to try many models from one bill.

Three kinds of sign-in avoid a per-token key:

RouteWhat it usesOn a server over SSH
ChatGPT Codex provider
A ChatGPT Plus or Pro plan, signed in through OpenAI’s browser OAuth; tokens saved in ~/.config/goose/chatgpt_codex/The sign-in returns to localhost:1455 on the machine running goose, so a browser on your laptop needs an SSH tunnel to that port
GitHub Copilot provider
Copilot access, signed in with a device codegoose prints GitHub’s URL and the code in the terminal; enter it from any browser
ACP providers claude-acp, codex-acp, amp-acp, pi-acp
Another agent’s own sign-in: goose drives Claude Code, Codex, Amp or Pi through an adapterSign that agent in on the server first; Codex has a device-code login

The ACP providers page installs the adapters with npm install -g @agentclientprotocol/claude-agent-acp and @agentclientprotocol/codex-acp, says to authenticate each CLI first, and describes the benefit as “no per-token API costs”. goose’s extensions are passed through to the other agent as MCP servers, but resuming and forking sessions are “not supported yet” on these providers. goose’s permission mode is passed on too, and the default auto maps to Claude Code’s bypassPermissions (“Skips all permission checks”) and to Codex’s agent-full-access; approve maps to Claude Code’s default and Codex’s read-only. They replace the older claude-code, codex and gemini-cli providers, which the docs now mark as deprecated. For Codex, set GOOSE_MODEL=current to use Codex’s own default model, and see Codex device code sign-in for signing it in over SSH.

On the Claude route, here is what each side says. goose’s page says Claude ACP “Uses the same Claude subscription as the deprecated claude-code CLI provider” and lists an “Active Claude Code subscription” among its requirements. Anthropic’s legal page says subscription sign-in is “designed to support ordinary use of Claude Code and other native Anthropic applications”, that it does not permit third-party developers to “route requests through Free, Pro, Max, or Ultra plan credentials on behalf of their users”, and that this does not prevent “an end user from signing in to the unmodified Claude Code binary with their own Claude subscription”. Its help article on logging in calls API key authentication “the preferred way” to use third-party software, prohibits tools that “attempt to route third-party traffic against subscription limits”, and says Anthropic may draw third-party tool use “from usage credits rather than subscription limits.” Neither page names goose, and the legal page sends questions about a specific use to Anthropic sales. How other agents handle the same question is in using a Claude subscription in Hermes, Pi and OpenCode.

Extensions are MCP servers

The built-in Developer extension, which edits files and runs shell commands, is on by default; Computer Controller, Memory and others are built in and can be turned on. Anything else is an MCP server, added through goose configure → Add Extension as a command-line (stdio) or remote (Streamable HTTP) extension, or by editing config.yaml. The extensions guide gives this shape:

extensions:
  github:
    name: GitHub
    cmd: npx
    args: ["-y", "@modelcontextprotocol/server-github"]
    enabled: true
    envs: { "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>" }
    type: stdio
    timeout: 300
Copied

(The docs write args as one bracketed string; one item per argument is the unambiguous YAML.) A token in envs sits in config.yaml as plain text, and the configuration docs say to “Avoid storing sensitive information (API keys, tokens) in the config file”; if you do, give it the same care as the secrets file. To try a server for one session without installing it: goose session --with-extension "npx -y some-mcp-server". goose checks external extensions for known malware before it starts them. The same servers work in other agents, configured each agent’s own way; see MCP servers in Claude Code and in Codex.

For project instructions goose reads both AGENTS.md and .goosehints by default, with personal hints in ~/.config/goose/.goosehints; the CONTEXT_FILE_NAMES variable changes the list. (More on the shared file in what AGENTS.md is.)

Permission modes: autonomous is the default

The permissions page carries one warning: “Autonomous Mode is applied by default.” In that mode “goose can modify files, use extensions, and delete files without requiring approval”.

Mode (/mode, GOOSE_MODE)What it does
auto (default)
Uses every tool without asking
smart_approve
Approves actions it rates low-risk and asks about the rest; the docs note the read-or-write judgement “is interpreted by your LLM provider”
approve
Asks before every tool or extension call
chat
Talks only, no tools (a /mode option; the environment variable docs list only the other three)

Change it for good under goose configure → goose settings → goose mode, for one session with /mode approve, or per process with GOOSE_MODE. Whatever the mode, the commands it runs run with your user’s rights. On a server, run it as an ordinary user with nothing it should not touch, never as root. (--container runs extensions in a Docker container, which is a separate setup.)

Sessions and recipes

goose session starts an interactive session in the current directory; --name names it and goose session -r resumes the latest (add --name for a named one). Sessions are stored in a SQLite database, ~/.local/share/goose/sessions/sessions.db on Linux, shared with the desktop app, so a session started in one can be resumed in the other. goose session list, export (Markdown, JSON or YAML) and remove manage them; remove is permanent.

A recipe is a saved task: instructions, the extensions it needs, parameters and settings in one YAML or JSON file (the CLI does not accept .yml). The recipe reference requires a title, a description, and instructions or prompt, and a prompt is what lets it run headless:

version: "1.0.0"
title: "Weekly dependency check"
description: "List outdated dependencies in a repository"
prompt: "List the outdated dependencies in {{ repo }} and the latest version of each"
parameters:
  - key: repo
    input_type: string
    requirement: required
    description: "Path to the repository"
Copied

Run it with goose run --recipe deps.yaml --params repo=/srv/app. A recipe’s extensions list, once present, is the only set loaded, so an empty one would leave this recipe without the Developer tools it needs to read the repository; the example leaves the list out. settings can pin goose_provider and goose_model, and a response.json_schema block makes goose check its final answer against a schema.

Running goose headless

goose run does one task and exits:

goose run -t "Summarise the failing tests in this repo"
goose run -i instructions.md
echo "Explain this stack trace" | goose run -i -
goose run --output-format json --no-session -t "automated task"
goose run -n nightly -r -t "Carry on from yesterday"     # resume a named session
goose run -s -t "Start here, then keep the chat open"
Copied

--output-format takes text, json or stream-json; --no-session saves nothing; --provider and --model override the configured ones for that run. Two settings matter more when nobody is watching. --max-turns (or GOOSE_MAX_TURNS) defaults to 1,000 turns without user input, and the environment variable docs say to “Set a reasonable limit for production”, with examples from 5 to 100. And the permission mode applies here too, so with the default auto a scheduled run edits, deletes and runs commands without asking; the docs do not say how approve behaves when there is no one at the terminal. A crontab line of our own, not from the docs, runs it on a timer in that default mode, so point it only at a directory you are content to let it change. Cron’s PATH usually lacks ~/.local/bin, so it gives the binary’s full path:

0 6 * * * . $HOME/.goose-env; cd /srv/app && $HOME/.local/bin/goose run --max-turns 50 -t "Check the overnight logs for errors"
Copied

For pinned, repeatable runs the CI tutorial installs with GOOSE_VERSION and CONFIGURE=false and writes config.yaml with keyring: false.

goose on a remote server over SSH

The CLI is a single binary with nothing to open in a browser, so it runs over SSH as it does locally: install it as your user, set the key as above (the file fallback for secrets is expected on a server), and start goose session inside tmux so the session survives a dropped connection:

tmux new -s goose
goose session --name server-work
# detach with Ctrl-b d; later: tmux attach -t goose
Copied

Two sign-ins need a browser step. The ChatGPT Codex provider sends its sign-in back to localhost:1455 on the server, which a laptop browser reaches only through a tunnel opened before you start (ssh -L 1455:localhost:1455 you@server). With no browser to open, goose’s code writes the sign-in URL to its log at info level, and we could not establish whether the CLI shows it on screen by default. An ACP provider uses the other agent’s own login, which for Claude Code is covered in the Claude Code login guide.

To drive a server’s goose from the desktop app instead, the docs’ remote server guide runs goose serve with a shared secret in GOOSE_SERVER__SECRET_KEY (“Treat it like a password”) and TLS, which it calls “strongly recommended”. The secret is what admits a desktop app to the server’s goose, whose tools run with your user’s rights there. The guide’s example binds to 0.0.0.0, which opens the port to every network the server is on. An alternative of ours, not the docs’: bind to 127.0.0.1, which accepts only local connections, and let an SSH tunnel carry the desktop app’s connection, so the port is never public, and read the secret without echo:

# on the server, inside tmux
read -rsp 'Shared secret: ' GOOSE_SERVER__SECRET_KEY; echo
export GOOSE_SERVER__SECRET_KEY
goose serve --platform desktop --host 127.0.0.1 --port 3000 --tls

# on your laptop, left running
ssh -N -L 3000:127.0.0.1:3000 you@server
Copied

The desktop app’s backend URL is then https://localhost:3000, with the same secret. Choosing the machine itself is covered in choosing a VPS for a coding agent.

Where goose fits among the other agents

goose’s nearest relatives are the other open-source agents that take a key from any provider, such as OpenCode and Aider. Three things set it apart: it is not only a coding tool (recipes, a desktop app and MCP extensions aim it at any task on a computer), it sits in a foundation rather than with one company, and through ACP it can drive Claude Code or Codex, each signed in its own way. The Claude Code alternatives and OpenCode alternatives guides set the wider field side by side.

Run Claude Code, Codex, OpenCode, Pi, Hermes or OpenClaw on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.