homebrew

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill: homebrew

Skill: Homebrew

When to Use

使用场景

Use this skill when the user asks to:
  • Install software, a tool, an app, or a package on macOS
  • Install a programming language, database, or dev tool (e.g. node, python, redis, postgres, go, rust)
  • Install a GUI/desktop application via
    brew install --cask
    (e.g. Chrome, Slack, Docker, VS Code)
  • Search for available packages or check if something is installable via Homebrew
  • List installed packages or check what's currently on the system
  • Update Homebrew or upgrade installed packages
  • Uninstall / remove a package
  • Diagnose or fix Homebrew issues (
    brew doctor
    )
  • Tap a new Homebrew repository
  • Check info or version of an installed package
当用户提出以下需求时,可使用此技能:
  • 在macOS上安装软件、工具、应用程序或软件包
  • 安装编程语言、数据库或开发工具(如node、python、redis、postgres、go、rust)
  • 通过
    brew install --cask
    安装GUI/桌面应用(如Chrome、Slack、Docker、VS Code)
  • 搜索可通过Homebrew安装的软件包,或检查某软件是否可通过Homebrew安装
  • 列出已安装的软件包,或检查系统当前已安装的内容
  • 更新Homebrew本身,或升级已安装的软件包
  • 卸载/移除软件包
  • 诊断或修复Homebrew问题(
    brew doctor
  • 接入新的Homebrew仓库
  • 查看已安装软件包的信息或版本

Prerequisites

前提条件

  • macOS only — Homebrew is a macOS package manager (also works on Linux but this skill targets Mac)
  • Homebrew must be installed. If not, install it first:
    bash
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • 仅支持macOS —— Homebrew是macOS软件包管理器(也可在Linux上使用,但本技能面向Mac用户)
  • 必须已安装Homebrew。若未安装,请先执行以下命令:
    bash
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Available Tool

可用工具

The
brew
tool is registered as a core tool. Use it directly:
ActionTool InputDescription
install
{"action": "install", "packages": ["node", "redis"]}
Install one or more formulae
install_cask
{"action": "install_cask", "packages": ["google-chrome"]}
Install GUI apps via cask
uninstall
{"action": "uninstall", "packages": ["node"]}
Remove installed packages
search
{"action": "search", "query": "python"}
Search for available packages
info
{"action": "info", "packages": ["node"]}
Get detailed info about a package
list
{"action": "list"}
List all installed formulae
list_casks
{"action": "list_casks"}
List all installed cask apps
update
{"action": "update"}
Update Homebrew itself
upgrade
{"action": "upgrade"}
Upgrade all outdated packages
upgrade
{"action": "upgrade", "packages": ["node"]}
Upgrade specific packages
doctor
{"action": "doctor"}
Diagnose Homebrew issues
tap
{"action": "tap", "tap_name": "homebrew/cask-fonts"}
Add a third-party repo
outdated
{"action": "outdated"}
Show packages with updates available
brew
工具已注册为核心工具,可直接使用:
操作(Action)工具输入(Tool Input)描述(Description)
install
{"action": "install", "packages": ["node", "redis"]}
安装一个或多个formulae软件包
install_cask
{"action": "install_cask", "packages": ["google-chrome"]}
通过cask安装GUI应用
uninstall
{"action": "uninstall", "packages": ["node"]}
移除已安装的软件包
search
{"action": "search", "query": "python"}
搜索可用的软件包
info
{"action": "info", "packages": ["node"]}
获取软件包的详细信息
list
{"action": "list"}
列出所有已安装的formulae软件包
list_casks
{"action": "list_casks"}
列出所有已安装的cask应用
update
{"action": "update"}
更新Homebrew本身
upgrade
{"action": "upgrade"}
升级所有过时的软件包
upgrade
{"action": "upgrade", "packages": ["node"]}
升级指定的软件包
doctor
{"action": "doctor"}
诊断Homebrew问题
tap
{"action": "tap", "tap_name": "homebrew/cask-fonts"}
添加第三方仓库
outdated
{"action": "outdated"}
显示有可用更新的软件包

Procedure

操作步骤

  1. Check Homebrew is available: The
    brew
    tool will automatically verify Homebrew is installed before running any action. If not found, it will return instructions to install it.
  2. Determine what to install: Extract the package name(s) from the user's request. If unclear, use
    ask_user
    to clarify.
  3. Choose formulae vs cask: CLI tools use
    install
    , GUI apps (Chrome, Slack, Docker Desktop, etc.) use
    install_cask
    .
  4. Execute: Call the
    brew
    tool with the appropriate action and parameters.
  5. Report results: Confirm what was installed/updated/removed with version info where available.
  1. 检查Homebrew是否可用
    brew
    工具会在执行任何操作前自动验证Homebrew是否已安装。若未找到,将返回安装说明。
  2. 确定要安装的内容:从用户请求中提取软件包名称。若信息不明确,使用
    ask_user
    向用户确认。
  3. 选择formulae或cask:CLI工具使用
    install
    ,GUI应用(如Chrome、Slack、Docker Desktop等)使用
    install_cask
  4. 执行操作:调用
    brew
    工具并传入对应的操作和参数。
  5. 报告结果:确认已安装/更新/移除的内容,若有版本信息也一并提供。

Common Package Examples

常见软件包示例

CLI Tools & Languages (formulae)

CLI工具与编程语言(formulae)

RequestPackage Name
"install node"
node
"install Python"
python@3.12
or
python
"install PHP"
php
"install Go"
go
"install Rust"
rust
"install Redis"
redis
"install PostgreSQL"
postgresql@16
or
postgresql
"install MySQL"
mysql
"install Git"
git
"install FFmpeg"
ffmpeg
"install wget"
wget
"install jq"
jq
"install ripgrep"
ripgrep
"install Docker CLI"
docker
用户请求软件包名称
"安装node"
node
"安装Python"
python@3.12
python
"安装PHP"
php
"安装Go"
go
"安装Rust"
rust
"安装Redis"
redis
"安装PostgreSQL"
postgresql@16
postgresql
"安装MySQL"
mysql
"安装Git"
git
"安装FFmpeg"
ffmpeg
"安装wget"
wget
"安装jq"
jq
"安装ripgrep"
ripgrep
"安装Docker CLI"
docker

GUI Apps (casks)

GUI应用(casks)

RequestCask Name
"install Chrome"
google-chrome
"install VS Code"
visual-studio-code
"install Slack"
slack
"install Docker Desktop"
docker
(cask)
"install Spotify"
spotify
"install Figma"
figma
"install iTerm"
iterm2
"install Rectangle"
rectangle
"install 1Password"
1password
"install Cursor"
cursor
用户请求Cask名称
"安装Chrome"
google-chrome
"安装VS Code"
visual-studio-code
"安装Slack"
slack
"安装Docker Desktop"
docker
(cask)
"安装Spotify"
spotify
"安装Figma"
figma
"安装iTerm"
iterm2
"安装Rectangle"
rectangle
"安装1Password"
1password
"安装Cursor"
cursor

Example

示例

Example requests that trigger this skill:
install node and redis on my mac
I need ffmpeg installed
install google chrome
what packages do I have installed?
search for a markdown editor
update all my brew packages
is postgres installed?
install docker desktop
触发此技能的示例请求:
在我的mac上安装node和redis
我需要安装ffmpeg
安装谷歌浏览器
我已经安装了哪些软件包?
搜索一款markdown编辑器
更新我所有的brew软件包
postgres已经安装了吗?
安装docker桌面版