cmux-opencode-notifycmux notifications and activity status for OpenCode
0
322
近 7 天 13
34.7
生态多维模型
19 天前
2026-08-01
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["cmux-opencode-notify@0.1.1"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["cmux-opencode-notify@0.1.1"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D cmux-opencode-notifyopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode notifications and activity status for cmux, modeled after @warp-dot-dev/opencode-warp.
Behavior
- Shows the latest response when a primary agent finishes.
- Alerts when OpenCode remains blocked on a permission request or asks a question.
- Shows
Ready,Working, tool activity, and attention states in the cmux workspace status pill. - Associates notifications with the cmux surface that launched OpenCode.
- Suppresses notifications from subagent sessions.
- Ignores cmux command failures so notifications cannot interrupt an agent turn.
cmux suppresses desktop banners while its window or the target workspace is focused. Notifications still appear in its notification panel.
Installation
Add the npm package to ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["cmux-opencode-notify"]
}
OpenCode installs npm plugins automatically. Restart OpenCode after changing its configuration. The plugin activates only when CMUX_SURFACE_ID is present.
Local Development
Clone the repository and install its dependencies:
git clone https://github.com/lucaspevidor/cmux-opencode-notify.git
cd cmux-opencode-notify
pnpm install
pnpm typecheck
pnpm test
pnpm build
To load the local build instead of the npm package, use its file URL:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"file:///Users/you/repos/node/cmux-opencode-notify/dist/index.js"
]
}
Set CMUX_OPENCODE_NOTIFY_BIN if the cmux executable is not on PATH:
export CMUX_OPENCODE_NOTIFY_BIN=/Applications/cmux.app/Contents/Resources/bin/cmux
Events
| OpenCode event | cmux behavior |
|---|---|
session.created |
Sets the workspace status to Ready |
chat.message |
Sets the workspace status to Working |
tool.execute.after |
Shows the latest tool in the workspace status |
session.status (busy to idle) |
Clears status and sends a completion notification |
permission.updated / permission.asked |
Sends a permission notification |
question tool |
Sends an input-required notification |
License
MIT. Inspired by @warp-dot-dev/opencode-warp. See Third-Party Notices.