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

@jack-yang/opencode-bark-notify

v1.0.2

Published

Focus-aware Bark push notifications for OpenCode — get detailed agent messages on your phone when you step away

Readme

opencode-bark-notify

OpenCode 提供基于 Bark 的手机推送通知,智能感知终端焦点

离开电脑时收到 agent 的实际消息内容,在终端前时自动静默——不打扰。

功能

  • 焦点感知 — 终端在前台时不发通知,切走或离开时才推
  • 详细内容 — 推送 agent 的最后一条消息,不只是"任务完成"
  • 分类标识 — iOS 副标题显示事件类型:✅ Responded / 🔐 Wait for Permission / ❓ Input Needed
  • Session 感知 — 每条通知包含 session 标题
  • 零依赖 — 纯 TypeScript,Bun 直接运行

前置条件

  • iOS 设备安装 Bark
  • Bark device key(在 Bark App 首页查看,如 BrHXXCACzphzrB63kNJMFF

安装

方式一:带配置(推荐)

~/.config/opencode/opencode.json 中添加:

{
  "plugin": [
    ["@jack-yang/opencode-bark-notify", {
      "barkKey": "你的BARK设备KEY"
    }]
  ]
}

方式二:环境变量

~/.zshrc 中设置:

export BARK_KEY="你的BARK设备KEY"

然后在 opencode.json 中:

{
  "plugin": ["@jack-yang/opencode-bark-notify"]
}

重启 OpenCode 生效。

配置项

| 选项 | 类型 | 默认值 | 说明 | |------|------|--------|------| | barkKey | string | (环境变量 BARK_KEY) | Bark 设备 Key(必填) | | barkUrl | string | https://api.day.app | Bark 服务器地址(自建服务器用) | | level | string | timeSensitive | iOS 通知级别 | | group | string | opencode | iOS 通知分组 | | terminals | string[] | ["Ghostty", "Terminal", "iTerm2", ...] | 焦点检测的终端 App 名称 |

通知类型

| 事件 | 标识 | 内容 | |------|------|------| | Session 完成 | ✅ Responded | agent 最后一条消息(≤500字) | | 需要权限 | 🔐 Wait for Permission | 权限类型 + 匹配模式 | | 需要回答 | ❓ Input Needed | 问题内容 |

与桌面通知配合

本插件与 @mohak34/opencode-notifier(桌面通知)互补:

  • 桌面通知(声音/弹窗)→ 在电脑前但切到了其他窗口
  • Bark 推送(手机)→ 完全离开电脑

两者各自独立检测焦点,互不冲突。

许可证

MIT