安装 goose
桌面版和 CLI 请从中文社区下载页获取。
- macOS
- Linux
- Windows
选择安装 goose 的桌面版和/或 CLI:
- goose Desktop
- goose CLI
从浏览器直接安装 goose 桌面版。
方式一:下载安装
点下面的按钮下载 macOS 版 goose 桌面应用:
- 解压下载的 zip 文件。
- 运行可执行文件以启动 goose 桌面应用。
最好定期更新 goose。
上游官方安装方式
下面的方式安装的是上游项目,不是中文社区构建。Homebrew 会下载同一应用,也可以负责更新。
brew install --cask block-goose
如果你使用 Apple Mac M3,且 goose 桌面应用启动后没有窗口,请检查并更新以下内容:
确保 ~/.config 目录具有读写权限。
goose 需要此权限来创建日志目录和文件。授予权限后,应用应能正确加载。具体步骤见已知问题指南。
从中文社区下载页获取 macOS 上的 goose CLI。
方式一:从中文社区下载
打开 goose-update.vcorp.ai 下载并安装 CLI。上游官方安装方式
下面的命令安装的是上游项目,不是中文社区构建。运行以下命令,在 macOS 上安装最新版 goose:
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
该脚本会获取最新版 goose 并在系统上完成设置。
如果希望安装时不做交互式配置,请关闭 CONFIGURE:
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash
最好保持 goose 为最新版本。要更新 goose,运行:
goose update
Homebrew 会下载预编译 CLI 工具,也可以负责更新。
brew install block-goose-cli
选择安装 goose 的桌面版和/或 CLI:
- goose Desktop
- goose CLI
从浏览器直接安装 goose 桌面版。
下载安装
点下面的按钮下载 Linux 版 goose 桌面应用:
对于基于 Debian/Ubuntu 的发行版:
- 下载 DEB 文件
- 在终端中进入保存该文件的目录
- 运行
sudo dpkg -i (filename).deb - 从应用菜单启动 goose
最好定期更新 goose。
从中文社区下载页获取 Linux 上的 goose CLI。
上游官方安装方式
下面的命令安装的是上游项目,不是中文社区构建。运行以下命令在 Linux 上安装 goose CLI:
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
该脚本会获取最新版 goose 并在系统上完成设置。
如果希望安装时不做交互式配置,请关闭 CONFIGURE:
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash
最好保持 goose 为最新版本。要更新 goose,运行:
goose update
选择安装 goose 的桌面版和/或 CLI:
- goose Desktop
- goose CLI
从浏览器直接安装 goose 桌面版。
下载安装
点下面的按钮下载 Windows 版 goose 桌面应用:
- 解压下载的 zip 文件。
- 运行可执行文件以启动 goose 桌面应用。
最好定期更新 goose。
从中文社区下载页获取 Windows 上的 goose CLI。
上游官方安装方式
下面的命令安装的是上游项目,不是中文社区构建。要在 Windows 上原生安装 goose,需要以下环境之一:
- Git Bash(推荐):随 Git for Windows 提供
- MSYS2:可从 msys2.org 获取
- PowerShell:Windows 10/11 默认提供
Git Bash / MSYS2:标准方式
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
要在不做交互式配置的情况下安装,请关闭 CONFIGURE:
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash
PowerShell 安装:标准方式 把 PowerShell 安装脚本下载到当前目录。
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/aaif-goose/goose/main/download_cli.ps1" -OutFile "download_cli.ps1";
然后运行脚本以安装 goose:
.\download_cli.ps1
如果看到 goose 不在 PATH 中的警告,需要把 goose 加入 PATH:
对于 Git Bash/MSYS2
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
对于 PowerShell
# Add to your PowerShell profile
$profilePath = $PROFILE
if (!(Test-Path $profilePath)) { New-Item -Path $profilePath -ItemType File -Force }
Add-Content -Path $profilePath -Value '$env:PATH = "$env:USERPROFILE\.local\bin;$env:PATH"'
# Reload profile or restart PowerShell
. $PROFILE
更新 PATH 后,就可以在任意目录运行 goose 命令。
通过 Windows Subsystem for Linux (WSL) 安装
我们建议在 Windows 上原生运行 goose CLI,但如果你更喜欢类 Linux 环境,也可以使用 WSL。
- 以管理员身份打开 PowerShell,安装 WSL 和默认的 Ubuntu 发行版:
wsl --install
- 如果出现提示,重启计算机以完成 WSL 安装。重启后,或如果 WSL 已经安装,运行以下命令启动 Ubuntu shell:
wsl -d Ubuntu
- 运行 goose 安装脚本:
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
如果下载时遇到问题,可能需要安装 bzip2 来解压下载的文件:
sudo apt update && sudo apt install bzip2 -y
如果希望安装时不做交互式配置,请关闭 CONFIGURE:
curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash
如有需要,把 goose 加入 PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
echo 'export OPENAI_API_KEY=your_api_key' >> ~/.bashrc
source ~/.bashrc
设置 LLM 提供商
goose 使用受支持的 LLM 提供商,由它们提供 goose 理解你的请求所需的 AI 能力。首次使用时,系统会提示你配置偏好的提供商。
- goose Desktop
- goose CLI
第一次打开 goose 时,在欢迎屏幕上选择如何配置提供商:
- 用 API 密钥快速设置 — goose 会根据 API 密钥自动配置提供商
- ChatGPT Subscription — 使用 ChatGPT Plus/Pro 登录,以使用 GPT-5 Codex 模型
- Agent Router by Tetrate — 一次设置即可使用多个 AI 模型
- OpenRouter — 用一个 API 按量使用 200 多个模型
- 其他提供商 — 在设置里手动配置其他提供商
CLI 会自动进入配置模式,你可以选择如何配置提供商:
- OpenRouter Login - 使用 OpenRouter 登录,自动配置模型
- Tetrate Agent Router Service Login - 使用 Tetrate Agent Router Service 登录,自动配置模型
- Manual Configuration - 选择提供商并手动输入凭据
配置流程示例:
┌ goose-configure
│
◇ How would you like to set up your provider?
│ Tetrate Agent Router Service Login
│
Opening browser for Tetrate Agent Router Service authentication...
[goose opens the browser and prints details]
Authentication complete!
Configuring Tetrate Agent Router Service...
✓ Tetrate Agent Router Service configuration complete
✓ Models configured successfully
Testing configuration...
✓ Configuration test passed!
✓ Developer extension enabled!
└ Tetrate Agent Router Service setup complete! You can now use goose.
如果选择手动配置提供商,配置过程中出现提示时,请选择不要存入密钥环。如果设置 API 密钥时遇到密钥环错误,可以改为手动设置环境变量:
export OPENAI_API_KEY={your_api_key}
然后再次运行 goose configure。goose 会检测到环境变量并显示:
● OPENAI_API_KEY is set via environment variable
要使 API 密钥在会话之间保持,把它们加入 shell 配置文件:
echo 'export OPENAI_API_KEY=your_api_key' >> ~/.bashrc
source ~/.bashrc
goose 很依赖工具调用能力,目前和 Claude 4 系列模型配合得最好。
第一次通过 goose 自动向 Tetrate 进行身份验证时,你会获得 10 美元免费额度。新用户和现有 Tetrate 用户都可以获得此优惠。
更新提供商
你可以随时更改 LLM 提供商和/或模型,或更新 API 密钥。
- goose Desktop
- goose CLI
- 点击左上角的 按钮打开侧边栏。
- 在侧边栏中点击
Settings按钮。 - 点击
Models选项卡。 - 选择更新提供商、切换模型,或点击
Reset Provider and Model清除设置并返回欢迎屏幕。这些配置选项的细节见相应文档。
- 运行以下命令:
goose configure
- 从菜单中选择
Configure Providers。 - 按照提示选择 LLM 提供商,并输入或更新 API 密钥。
示例:
配置过程中要选择某一项,用上下方向键高亮你的选择,然后按 Enter。
┌ goose-configure
│
◇ What would you like to configure?
│ Configure Providers
│
◇ Which model provider should we use?
│ Google Gemini
│
◇ Provider Google Gemini requires GOOGLE_API_KEY, please enter a value
│▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
│
◇ Enter a model from that provider:
│ gemini-2.0-flash-exp
│
◇ Hello there! You're all set to use me, so please ask away!
│
└ Configuration saved successfully
有些提供商还会限制 API 调用频率,这会影响使用体验。可以看我们的 处理速率限制 指南,了解使用 goose 时如何应对这些限制。
运行 goose
- goose Desktop
- goose CLI
在 goose 桌面版中开始会话很直接。选择提供商后,你会看到准备就绪的会话界面。
把问题、任务或指令直接输入输入框,goose 会立刻开始工作。
在终端中进入你想作为起点的目录,然后运行:
goose session
共享配置
goose CLI 和桌面 UI 共享所有核心配置,包括 LLM 提供商设置、模型选择和扩展配置。在任一界面安装或配置扩展时,设置会存储在中心位置,桌面应用和 CLI 都可以使用。这样在界面之间切换时仍能保持一致的设置。更多信息见配置文件指南。
虽然核心配置在界面之间共享,扩展在存储身份验证凭据的方式上有灵活性。有些扩展使用共享配置文件,另一些则实现自己的存储方法。
- goose Desktop
- goose CLI
通过以下方式进入共享配置:
- 点击左上角的 按钮打开侧边栏。
- 在侧边栏中点击
Settings按钮。
使用以下命令管理共享配置:
goose configure
在 CI/CD 中固定 goose 版本
在 CI/CD(以及其他自动化、非交互环境)中,用 GOOSE_VERSION 固定特定版本,使安装可复现,并避免在 stable 发布标签不包含 goose CLI 二进制资源时下载出现 404。
完整示例和用法见 CI/CD 环境。
为 Linux 发行版生成 man 手册页
如果你在为 Linux 发行版打包 goose,或创建自定义构建,可以从 CLI 命令定义生成 Unix man 手册页:
just generate-manpages
这会在 target/man/ 中创建 ROFF 格式的手册页(例如 goose.1、goose-session.1),可以安装到 /usr/share/man/man1/,以便通过 man 命令提供离线文档。
生成手册页需要 goose 源码仓库,面向为 Fedora、Debian 和其他 Linux 发行版准备软件包的发行版打包者。实现细节见 generate_manpages.rs 源码。
更多资源
你也可以配置扩展来扩展 goose 的功能,包括添加新扩展或打开/关闭它们。详细说明见使用扩展指南。