文末提供程序和源码下载
Goose 是您的机上 AI 代理,能够从头到尾自动执行复杂的开发任务。Goose 不仅可以提供代码建议,还可以自主构建整个项目、编写和执行代码、调试故障、编排工作流程以及与外部 API 交互。无论您是在构建想法原型、优化现有代码,还是管理复杂的工程管道,goose 都能适应您的工作流程并精确执行任务。goose 专为实现最大的灵活性而设计,可与任何 LLM API 配合使用,并与支持 MCP 的 API 无缝集成,使其成为希望更快行动并专注于创新的开发人员的终极 AI 驱动助手。
Run the following command to install the latest version of Goose:
执行以下命令,安装最新版本的 Goose。
curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | bash
Goose 与支持的LLM提供商合作。安装 Goose 时,系统会提示您选择首选LLM密钥并提供 API 密钥。
使用向上和向下箭头键导航 CLI 菜单,然后在选择选项后按 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! You're all set and ready to go, feel free to ask me anything!
│
└ Configuration saved successfully
会话是您和 Goose 之间的单一、连续的对话。让我们开始一个。
goose-demo
)并从终端导航到该目录。goose session
从提示符中,您可以通过键入说明与 Goose 进行交互,就像您与开发人员交谈一样。
让我们让 Goose 制作一个井字游戏吧!
create an interactive browser-based tic-tac-toe game in javascript where a player competes against a bot
Goose 将制定一个计划,然后着手实施它。完成后,您的目录应包含一个 JavaScript 文件以及一个用于播放的 HTML 页面。
虽然您可以手动导航到工作目录并在浏览器中打开 HTML 文件,但如果 Goose 为您执行此作不是更好吗?让我们通过启用 Computer Controller
扩展程序来让 Goose 能够打开 Web 浏览器。
Ctrl+C
结束当前会话,以便您可以返回到终端的命令提示符。goose configure
Add extension
> Built-in Extension
> Computer Controller
,并将 timeout 设置为 300 秒。此扩展程序支持 Webscraping、文件缓存和自动化。┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Built-in Extension
│
◇ Which built-in extension would you like to enable?
│ ○ Developer Tools
│ ● Computer Controller (controls for webscraping, file caching, and automations)
│ ○ Google Drive
│ ○ Memory
│ ○ JetBrains
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
└ Enabled Computer Controller extension
goose session -r
open index.html in a browser
...
)。Settings
从菜单中选择。Extensions
部分下,切换 Computer Controller
扩展以启用它。此扩展程序支持 Webscraping、文件缓存和自动化。<- Back
左上角的 可返回到您的会话。open index.html in a browser
恭喜,您已成功使用 Goose 开发 Web 应用程序!
以下是后续步骤的一些想法:
夸克网盘分享
本文信息来源于GitHub作者地址:GitHub - block/goose: an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM