macOS 原生菜单栏 AI 快捷助手
简介
基于 Electron 的 macOS 专属菜单栏应用,为 OpenClaw 提供一键唤起的原生快捷访问体验,无需浏览器即可快速启动 AI 对话。
原始描述
Enable OpenClaw as a native macOS menu bar app with quick access popup. **macOS ONLY** - not compatible with Windows or Linux. Use when user asks to "enable menubar", "add menu bar", "run in menu bar", "make it accessible from menu bar", or wants quick OpenClaw access without opening full dashboard.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
中文使用说明 来自收录源
OpenClaw Menu Bar 综合评估
核心用法
OpenClaw Menu Bar 是一款基于 Electron 的 macOS 原生菜单栏应用,将 OpenClaw 聊天功能嵌入系统托盘。用户点击菜单栏的 🦀 螃蟹图标,或使用 Cmd+Shift+O 快捷键,即可弹出约 480×680px 的精简聊天窗口,无需打开浏览器或完整仪表板。安装后自动读取 ~/.openclaw/openclaw.json 配置完成认证,直接对接本地 OpenClaw Gateway(localhost:18789)。
显著优点
- 极致效率:菜单栏常驻后台,秒级唤起,适合高频查询场景
- 原生体验:支持 macOS 毛玻璃效果(vibrancy)、全局快捷键、置顶窗口
- 轻量占用:Electron 架构,内存占用可控
- 自动认证:零配置启动,自动读取本地 token
- 消息持久化:本地保存最近 10 条消息历史
潜在缺点与局限性
- 平台锁定:macOS 专属,Windows/Linux 用户无法使用
- Electron 安全风险:
nodeIntegration: true+contextIsolation: false构成高危攻击面,渲染进程可直接调用 Node.js API - 凭证明文处理:token 通过 URL 参数明文传递(
/#token=xxx),存在日志泄露风险 - 命令注入隐患:使用
child_process.exec拼接 shell 命令,虽有转义但防护薄弱 - 网络暴露:尝试连接局域网 IP,公共网络环境下可能被利用
适合人群
- macOS 重度用户,追求菜单栏快捷操作
- 已部署 OpenClaw Gateway 的本地开发环境
- 对 Electron 安全风险有认知、能承担一定风险的技术用户
- 不适合:企业敏感数据场景、对安全合规要求严格的用户、多平台协作用户
常规风险
- XSS 转 RCE:由于禁用上下文隔离,若渲染内容被篡改,攻击者可执行系统命令
- Token 泄露:配置和 URL 中的明文 token 可能被日志、历史记录捕获
- 依赖供应链:Electron 及 npm 依赖需持续监控漏洞
- 无代码签名:应用未经 Apple 签名,Gatekeeper 可能拦截
建议:在个人开发环境使用,处理非敏感数据;修复高危配置后再用于生产场景。
技能正文
slug: openclaw-menubar displayName: OpenClaw Menu Bar description: Enable OpenClaw as a native macOS menu bar app with quick access popup. macOS ONLY - not compatible with Windows or Linux. Use when user asks to "enable menubar", "add menu bar", "run in menu bar", "make it accessible from menu bar", or wants quick OpenClaw access without opening full dashboard.
OpenClaw Menu Bar
⚠️ macOS ONLY - This skill requires macOS. Menu bar apps are not supported on Windows or Linux.
Adds a native macOS menu bar app for quick OpenClaw access - click the crab icon 🦀 in your menu bar to get an instant chat popup.
Quick Start
Install & Launch
scripts/install.sh
scripts/start.sh
The crab icon will appear in your menu bar. Click it to open the chat window.
Stop
scripts/stop.sh
Check Status
scripts/status.sh
What It Does
- Menu bar icon: Crab 🦀 icon appears in macOS menu bar
- Quick popup: Click icon → instant chat window (no browser needed)
- Keyboard shortcut: Cmd+Shift+O to toggle popup
- Native feel: Proper macOS vibrancy, stays on top when needed
- Lightweight: Electron app, ~480x680px popup window
Icon Setup
The menubar app requires two icon files in assets/openclaw-menubar/icons/:
icon.png(22x22 pixels, transparent PNG)icon@2x.png(44x44 pixels, transparent PNG)
Option 1: Auto-generate icons
cd assets/openclaw-menubar
./create-icon.sh
This creates a simple crab emoji icon.
Option 2: Custom icons
Replace the generated icons with your own 22x22 and 44x44 transparent PNGs.
Note: macOS menu bar uses monochrome template mode (auto-colorizes your icon).
Window Size
Edit assets/openclaw-menubar/main.js:
browserWindow: {
width: 480, // Change width
height: 680 // Change height
}
Keyboard Shortcut
Edit assets/openclaw-menubar/main.js:
globalShortcut.register('CommandOrControl+Shift+O', () => {
// Change 'O' to any key
});
Architecture
- Electron app using menubar package
- Header: Custom HTML header (index-webchat.html) with branding
- Content: OpenClaw webchat loaded via BrowserView with auth token
- Auto-auth: Reads gateway config from
~/.openclaw/openclaw.json
Requirements
- macOS (menu bar apps are macOS-specific)
- OpenClaw Gateway running on localhost
- Node.js (for Electron)
Troubleshooting
Icon not showing
- Icon must be 22x22 PNG with transparent background
- macOS menu bar uses monochrome template mode (auto-colorizes)
"OpenClaw Not Running" error
- Ensure OpenClaw Gateway is running:
openclaw gateway status - Check config:
cat ~/.openclaw/openclaw.json
Window doesn't open
- Check logs in Console.app (search "OpenClaw")
- Try:
scripts/stop.sh && scripts/start.sh
Files
assets/openclaw-menubar/- Complete Electron appscripts/install.sh- Install dependencies (npm install)scripts/start.sh- Launch the menu bar appscripts/stop.sh- Kill the app processscripts/status.sh- Check if app is running
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。