Maicenter Loop Post
将AI代理状态推送到mAICenter共享社交时间线,支持发帖与转发。
在macOS菜单栏实时显示OpenClaw代理的上下文使用情况与状态。
openclaw skills install @hjklasdfg/menubar-context-monitor命令、参数、文件名以原文为准
macOS 菜单栏实时显示 OpenClaw agent 的上下文用量、模型和运行状态。基于 [SwiftBar](https://github.com/swiftbar/SwiftBar)。
macOS 菜单栏中实时展示 OpenClaw agent 的上下文使用情况、模型信息与运行状态,由 [SwiftBar](https://github.com/swiftbar/SwiftBar) 支持。
版本: 1.2.0
平台: 仅支持 macOS
作者: [@hjklasdfg](https://github.com/hjklasdfg)
源码: [GitHub](https://github.com/hjklasdfg/context-monitor)
🔧 140k)🔧 98k ← 菜单栏显示
───────────────────────────────
🦞 OpenClaw Agents (6)
───────────────────────────────
▶ 🔧 tech 98k/1000k (9%) │ opus │ 26s ago
— 🎮 main 50k/1000k (5%) │ opus │ 2m ago
— 🎯 career 52k/1000k (5%) │ opus │ 1m ago
— ✍️ content 40k/1000k (4%) │ opus │ 20h ago
— 💰 finance 52k/200k (26%) │ haiku │ 1h ago
✖ 🧠 phil 26k/1000k (2%) │ opus │ 3d ago
───────────────────────────────
刷新请根据您的实际部署场景选择对应方案:
所有组件运行在同一台机器上——OpenClaw 和菜单栏监控。
# 1. 使用 OpenClaw CLI 安装该技能
openclaw skills install menubar-context-monitor
# 2. 执行安装脚本
bash ~/.openclaw/skills/context-monitor/scripts/install.sh最常见配置——OpenClaw 运行在服务器 / Raspberry Pi / Mac Mini 上,您希望在笔记本电脑上使用菜单栏监控。无需在 MacBook 上安装 OpenClaw。
# 1. 克隆仓库
git clone https://github.com/hjklasdfg/openclaw-context-monitor.git
cd openclaw-context-monitor
# 2. 使用您的 OpenClaw 主机 SSH 地址运行安装脚本
bash scripts/install.sh --remote user@host示例:
bash scripts/install.sh --remote linyili@192.168.1.100需要配置 SSH 密钥认证。若尚未设置,安装程序将引导您完成配置。
如果您已在本地运行 OpenClaw,可直接让代理为您执行安装:
“帮我设置 agent 菜单栏监控”
代理将读取本技能并引导您完成配置。
首次启动 SwiftBar 时,会提示您选择一个插件目录。按 Cmd+Shift+G 并粘贴以下路径:
~/Library/Application Support/SwiftBar/Plugins安装程序会将插件脚本放置于此目录。此操作只需执行一次。
SwiftBar 插件(您的 Mac) → SSH → 状态采集器(OpenClaw 主机) → sessions.json
或本地 ↗系统包含两个核心组件:
openclaw-status.py** — 在 OpenClaw 主机上读取 agent 会话数据swiftbar-plugin.sh** — 在您的 Mac 上渲染菜单栏内容| 设置项 | 修改方法 |
|---|---|
| 刷新间隔 | 重命名插件文件:30s → 10s、1m、5m |
| 警告阈值 | 编辑插件中的 WARN = 100000 |
| SSH 目标地址 | 编辑插件中的 MINI= 变量,或设置环境变量 OPENCLAW_SSH_TARGET |
从每个 agent 的 IDENTITY.md 文件中读取:
- **Emoji:** 🔧若未设置,则回退为 agent 名称。
显示短格式别名:opus、sonnet、haiku、flash、pro。用户在 openclaw.json 中配置的 modelAliases 优先级更高。
| 菜单栏显示 | 含义 | 解决方法 |
|---|---|---|
🦞 ❌ | 连接失败 | 检查 SSH 或网络连接 |
🦞 ⚠️ | 数据解析错误 | 在主机上运行 python3 ~/.openclaw/openclaw-status.py |
| agent 缺失 | 尚无会话数据 | 使用该 agent 一次以生成会话记录 |
MIT
<!-- 以下为代理指令,不会在 ClawHub 显示 -->
当用户请求设置上下文监控时,请按以下流程操作:
开始前提醒: 此技能需在 Mac 上运行命令。若用户可能使用移动设备:
“此操作需在 Mac 上执行。你现在在 Mac 前吗?若在其他设备上,我稍后会发送可复制的命令。”
步骤 1: 向用户询问:
“OpenClaw 是运行在本机,还是远程机器上?若是远程,请提供 SSH 地址(如
user@hostname)。”
步骤 2(本地模式): 直接运行安装脚本:
bash scripts/install.sh --yes步骤 2(远程模式): 代理无法远程安装 SwiftBar。请执行以下操作:
scp scripts/openclaw-status.py <user>@<host>:~/.openclaw/openclaw-status.pySwiftBar 安装提示: 若需安装 SwiftBar,请先征得用户同意:
“这需要安装 SwiftBar(一款 macOS 菜单栏工具)。是否允许安装?”
获得确认后,传递 --yes 参数跳过交互式提示。
menu bar, SwiftBar, agent status, agent monitor, observability, dashboard mac, agent context, context monitor, 菜单栏, 上下文显示, agent 监控
已收录 1 个 Skill