Homebrew Bridge
Use this skill when the real value is giving a Linux OpenClaw gateway access to a Mac node's Homebrew toolchain.
This skill is for /opt/homebrew/bin/<tool> wrappers such as:
- - INLINECODE1
- INLINECODE2
- other Homebrew-installed CLIs you want to expose from a Mac node
Use This Skill For
- - Linux gateways that should run Homebrew-backed tools through a Mac node
- wrapper-backed skills that depend on
brew, gh, or another Homebrew CLI - same-LAN Mac nodes that already hold the real Homebrew installs
- optional host auto-discovery from OpenClaw config when only one Mac owner is known
Do Not Use This Skill For
- - tools that are inherently Mac-owned apps or permissioned CLIs like
imsg or INLINECODE6 - Linux-native tools that should be installed on Linux directly
- WAN-routed Macs or generic remote shell access
Requirements
- - Linux gateway and owning Mac share the same trusted local network or VLAN
- Linux gateway can SSH to the owning Mac
- the requested tool exists at
/opt/homebrew/bin/<tool> on that Mac - the Mac stays awake during work windows or supports Wake-on-LAN
Workflow
1. Render A Tool Ownership Map
Run:
CODEBLOCK0
This prints the inferred or fallback Mac owner for Homebrew-backed tools.
2. Install The Homebrew Pack
Example:
CODEBLOCK1
Host resolution order:
- - explicit INLINECODE8
- INLINECODE9
- the single discovered
remoteHost in the OpenClaw config, if there is exactly one - no repeated host questions when the OpenClaw config already resolves the owner
3. Verify The Pack
Run:
CODEBLOCK2
Design Contract
- - Linux owns the stable wrapper paths
- the Mac owns the real
/opt/homebrew/bin binaries - public skills depend on wrapper paths, not Mac paths
- wrapper names stay explicit per tool
Files
- -
scripts/install-wrapper.sh: create one SSH wrapper for a remote binary - INLINECODE13 : install a batch of Homebrew-backed wrappers
- INLINECODE14 : verify the installed wrappers
- INLINECODE15 : print inferred or fallback tool-to-host maps
- INLINECODE16 : publishability rules for Homebrew-backed wrappers
Homebrew Bridge
当实际需求是为 Linux OpenClaw 网关提供访问 Mac 节点 Homebrew 工具链的权限时,使用此技能。
此技能适用于 /opt/homebrew/bin/<工具> 包装器,例如:
- - brew
- gh
- 其他你想从 Mac 节点暴露的 Homebrew 安装的 CLI 工具
适用场景
- - 需要通过 Mac 节点运行 Homebrew 工具的 Linux 网关
- 依赖 brew、gh 或其他 Homebrew CLI 的包装器技能
- 同一局域网内已安装真实 Homebrew 的 Mac 节点
- 当仅知道一个 Mac 所有者时,可选的 OpenClaw 配置主机自动发现
不适用场景
- - 本质上属于 Mac 自有应用或需要权限的 CLI 工具,如 imsg 或 remindctl
- 应直接安装在 Linux 上的原生 Linux 工具
- 通过广域网路由的 Mac 或通用远程 shell 访问
前提条件
- - Linux 网关和 Mac 所有者共享同一可信本地网络或 VLAN
- Linux 网关可通过 SSH 连接到 Mac 所有者
- 请求的工具存在于该 Mac 的 /opt/homebrew/bin/<工具> 路径下
- Mac 在工作时段保持唤醒状态,或支持局域网唤醒功能
工作流程
1. 生成工具所有权映射
运行:
bash
scripts/render-tool-map.sh /home/node/.openclaw/openclaw.json
这将打印 Homebrew 工具的推断或备用 Mac 所有者。
2. 安装 Homebrew 包
示例:
bash
scripts/install-homebrew-pack.sh \
--target-dir /home/node/.openclaw/bin \
--tool brew \
--tool gh \
--tool claude \
--default-host mac-ops@mac-node.local \
--wake-map mac-node.local=AA:BB:CC:DD:EE:FF \
--wake-wait 20 \
--wake-retries 2
主机解析顺序:
- - 显式 --map tool=user@host
- --default-host user@host
- 如果 OpenClaw 配置中只有一个 remoteHost,则使用该发现的主机
- 当 OpenClaw 配置已解析所有者时,不重复询问主机
3. 验证包
运行:
bash
scripts/verify-homebrew-pack.sh --target-dir /home/node/.openclaw/bin
设计约定
- - Linux 拥有稳定的包装器路径
- Mac 拥有真实的 /opt/homebrew/bin 二进制文件
- 公共技能依赖包装器路径,而非 Mac 路径
- 包装器名称按工具保持显式
文件
- - scripts/install-wrapper.sh:为远程二进制文件创建一个 SSH 包装器
- scripts/install-homebrew-pack.sh:安装一批 Homebrew 包装器
- scripts/verify-homebrew-pack.sh:验证已安装的包装器
- scripts/render-tool-map.sh:打印推断或备用的工具到主机映射
- references/skill-readiness.md:Homebrew 包装器的可发布性规则