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

agent-notify-ts

v0.3.7

Published

Notification setup tool for AI agents

Readme

Agent Notify

一个面向 AI Agent 的通知配置工具,用于把 Claude Code、Codex 等 Agent 的事件推送到常用通知渠道。

功能

  • 支持 Claude Code 与 Codex hooks
  • 支持系统通知、飞书、企业微信
  • 支持授权等待、输入等待、任务完成、任务失败等事件
  • 内置短时间去重,避免同一事件重复通知
  • 提供环境诊断与测试通知命令

快速开始

npx agent-notify-ts

也可以直接进入初始化:

npx agent-notify-ts init

初始化流程会引导你完成:

  1. 选择要配置的 Agent:Claude Code 或 Codex。
  2. 选择通知渠道:系统通知、飞书、企业微信。
  3. 选择订阅事件。
  4. 写入 Agent Notify 配置。
  5. 写入 Claude Code 或 Codex hook 配置。

默认配置位于:

~/.agent-notify/config.yaml

Agent hook 配置位于:

Claude Code: ~/.claude/settings.json
Codex:       ~/.codex/hooks.json

Codex 用户首次配置后,需要在 Codex 中运行:

/hooks

然后完成 trust 审核。

常用命令

检查环境、配置和 hook 状态:

npx agent-notify-ts doctor

查看当前配置:

npx agent-notify-ts view

测试系统通知:

npx agent-notify-ts test system

测试飞书通知:

npx agent-notify-ts test feishu

测试企业微信通知:

npx agent-notify-ts test wechat-work --webhook "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxx"

清理 Agent Notify 配置:

npx agent-notify-ts clean

飞书配置

飞书通知支持两种绑定方式:

  1. 使用已有飞书应用:填写已有应用的 App ID / App Secret。
  2. 扫码一键创建新应用:使用飞书开放平台提供的一键创建应用能力,扫码确认后自动创建并绑定。

运行:

npx agent-notify-ts init

选择「飞书」通知渠道后,会看到:

是否使用已有飞书应用?选择否将扫码一键创建新应用

使用已有飞书应用

选择「是」,然后按提示填写:

飞书 App ID
飞书 App Secret
飞书 User Open ID(可选,留空则发送给应用创建者)

App ID / App Secret 可以在飞书开放平台应用详情页的「凭证与基础信息」中获取。

飞书官方文档:

扫码一键创建新应用

选择「否」,然后按提示扫码或打开链接:

请使用飞书或 Lark 扫码/打开链接完成应用创建

扫码确认后,Agent Notify 会自动创建应用、获取凭据并保存到:

~/.agent-notify/config.yaml

配置文件会包含:

credentials:
  feishu:
    app_id: cli_xxx
    app_secret: xxx
    user_open_id: ""

注意:app_secret 会以明文保存在本机配置文件中,请不要提交到 Git 或分享给他人。

飞书官方文档:

一键创建流程会完成应用注册并返回凭据。配置完成后可以直接测试:

npx agent-notify-ts test feishu

企业微信配置

企业微信通知使用群机器人 Webhook。

获取 Webhook URL

  1. 打开企业微信 PC 端。
  2. 进入用于接收通知的群聊。
  3. 打开群设置或右键群聊。
  4. 找到「群机器人」「添加群机器人」或「消息推送」入口。
  5. 创建一个自定义机器人。
  6. 复制生成的 Webhook 地址。

Webhook 地址通常长这样:

https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

企业微信官方群机器人文档:

在初始化时填写

运行:

npx agent-notify-ts init

选择「企业微信」通知渠道,然后粘贴 Webhook URL。

也可以直接测试:

npx agent-notify-ts test wechat-work --webhook "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxx"