跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    Yusuzhan

    Simple Notify

    v1.0.0通知与集成
    opencode-simple-notify

    Desktop notification plugin for OpenCode - works on Linux (dbus) and macOS (osascript)

    GitHub 星标

    8

    近 30 天 +2

    月装机量

    152

    近 7 天 36

    综合评分SCORE

    38.2

    生态多维模型

    最近提交

    3 个月前

    2026-04-25

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-simple-notify@1.0.0"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    screenshot

    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