npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jachy/opencode-notify-ios

v1.0.7

Published

OpenCode plugin for iOS push notifications via Bark

Readme

opencode-notify-ios

通过 Bark 将 OpenCode 事件推送通知到 iOS 设备。

前提

在 App Store 安装 Bark,获取设备密钥。

安装

全局安装

编辑 ~/.config/opencode/opencode.json

{
  "plugin": ["@jachy/opencode-notify-ios"]
}

项目安装

在项目根目录创建或编辑 opencode.json

{
  "plugin": ["@jachy/opencode-notify-ios"]
}

配置

在项目根目录创建 notify-ios.json,或者在全局目录 ~/.config/opencode/notify-ios.json 创建一份共用配置(项目优先于全局):

{
  "deviceKey": "your_bark_device_key",
  "sound": "default",
  "enable": ["permission.updated", "session.error"],
  "templates": {
    "permission.asked": {
      "title": "OpenCode 需要确认",
      "body": "请确认操作"
    }
  }
}

| 字段 | 说明 | |------|------| | deviceKey | 必填。Bark 设备密钥 | | sound | 通知声音,默认 "default" | | enable | 启用的事件列表。默认 ["permission.asked", "session.error", "session.idle"],设为 [] 关闭所有通知 | | templates | 按事件自定义文案,body 支持 \n 换行。支持变量 {{time}}(当前本地时间)和 {{session.title}}(会话标题) |

配置文件修改即时生效,无需重启。

模板变量

titlebody 中可使用以下变量,运行时自动替换:

| 变量 | 说明 | 示例值 | |------|------|--------| | {{time}} | 当前本地时间 | 2026-06-14 15:30:00 | | {{session.title}} | 当前会话标题 | 修复登录 Bug | | {{project.name}} | 项目目录名 | opencode-push-ios |

示例:

{
  "templates": {
    "session.idle": {
      "title": "OpenCode 空闲",
      "body": "[{{time}}] 会话「{{session.title}}」进入空闲"
    }
  }
}

事件

| 推荐 | 事件 | 触发时机 | |:---:|------|------| | ✓ | permission.asked | OpenCode 需要用户确认 | | ✓ | session.error | 会话发生错误 | | | session.idle | 会话进入空闲 |

完整事件列表见 DEVELOPMENT.md

安全

notify-ios.json 包含 Bark 设备密钥,强烈建议将其加入 .gitignore,避免密钥泄露:

# opencode-notify-ios
notify-ios.json