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

    Ntfy

    v0.1.3智能体编排
    opencode-ntfy

    OpenCode plugin that sends push notifications via ntfy.sh when permission is needed, generation completes, or errors occur

    GitHub 星标

    4

    近 30 天 +1

    月装机量

    85

    近 7 天 20

    综合评分SCORE

    27.8

    生态多维模型

    最近提交

    7 个月前

    2026-01-12

    快速安装与配置

    opencode.json

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

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-ntfy@0.1.3"]
    }

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

    OpenCode plugin that sends push notifications via ntfy.sh when the agent needs input, requests permission, or encounters errors.

    Installation

    Add the plugin to your opencode.json or opencode.jsonc:

    {
      "plugin": ["opencode-ntfy"]
    }
    

    Configuration

    Create a configuration file at ~/.config/opencode/opencode-ntfy.json:

    {
      "topic": "my-opencode-alerts"
    }
    

    Configuration Options

    Option Type Default Description
    topic string required The ntfy topic to publish to
    server string https://ntfy.sh The ntfy server URL (for self-hosted instances)
    token string null Access token for authentication
    priority number (1-5) 3 Default notification priority
    events.idle boolean true Notify when agent finishes and needs input
    events.permission boolean true Notify when permission is requested
    events.error boolean true Notify on session errors

    Full Configuration Example

    {
      "topic": "my-opencode-alerts",
      "server": "https://ntfy.sh",
      "token": "tk_xxx",
      "priority": 3,
      "events": {
        "idle": true,
        "permission": true,
        "error": true
      }
    }
    

    Subscribing to Notifications

    1. Install the ntfy app on your phone (Android, iOS)
    2. Subscribe to your topic (e.g., my-opencode-alerts)
    3. You'll receive push notifications when OpenCode events occur

    You can also subscribe via the web at https://ntfy.sh/your-topic.

    Self-Hosted ntfy

    If you're running your own ntfy server, set the server option:

    {
      "topic": "opencode",
      "server": "https://ntfy.example.com"
    }
    

    Authentication

    For protected topics, add your access token:

    {
      "topic": "private-alerts",
      "token": "tk_your_access_token"
    }
    

    License

    MIT