Simple Notify
Desktop notification plugin for OpenCode - works on Linux (dbus) and macOS (osascript)
11
近 30 天 +2
143
近 7 天 36
36.4
生态多维模型
5 个月前
2026-04-25
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-simple-notify@1.0.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-simple-notify@1.0.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-simple-notifyOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

opencode-simple-notify
Desktop notification plugin for OpenCode.
Sends native desktop notifications when:
- Session completes — shows project name, elapsed time, and your last message as preview
- Session errors — alerts when something goes wrong
- Permission requested — notifies when OpenCode needs approval
- Waiting for input — notifies when OpenCode asks you a question / presents choices
Platform Support
| Platform | Method | Requirements |
|---|---|---|
| Linux (Wayland/X11) | dbus-send (freedesktop Notifications) |
A notification daemon (dunst, mako, swaync, fnott, etc.) |
| macOS | osascript |
None (built-in) |
Install
From npm
Add to your opencode.json:
{
"plugin": ["opencode-simple-notify"]
}
From local file
Copy index.js to your plugin directory:
# Global
cp index.js ~/.config/opencode/plugins/notify.js
# Project-level
cp index.js .opencode/plugins/notify.js
Notification Examples
┌─────────────────────────────────────┐
│ my-project done (2m35s) │
│ 帮我写一个排序函数 │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ OpenCode needs approval │
│ Permission: bash │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ OpenCode waiting │
│ 选择发布方式 │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ my-project error │
│ session encountered an error │
└─────────────────────────────────────┘
License
MIT
同类生态推荐
Smart Notify
opencode-smart-notify
Desktop notifications for OpenCode that stay quiet when auto-approve handles the request
Alert
@chousyn/opencode-alert
Cross-platform notification plugin for OpenCode — desktop alerts, sound alerts, and webhook notifications with project-level configuration
Notification
opencode-notification
OpenCode plugin for simple system notifications when permissions are needed, generation completes, or errors occur