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

ai-assistant-notify

v0.1.0

Published

Monitor AI assistant status and send Feishu notifications.

Readme

AI Assistant Notify

监测 Codex、Claude Code 的工作状态,并在完成或中断时通过飞书机器人发送通知。

这份 README 给谁看

这份 README 面向“安装后直接使用这个工具的人”。

如果你要在本仓库里继续开发、调试、发布,请看 DEVELOPMENT.md

功能

  • 监测 Codex turn 完成和中断事件
  • 监测 Claude Code 会话结束事件
  • Codex 和 Claude Code 可分别配置不同飞书机器人
  • 支持按 watcher 单独启动或停止

安装

发布到 npm 后:

npm install -g ai-assistant-notify

如果你只是临时在当前源码目录安装测试:

npm install -g .

安装后可用命令:

ai-assistant-notify
aanotify

快速开始

1. 创建飞书机器人

为 Codex 和 Claude Code 分别创建飞书自定义机器人,并拿到 webhook。

2. 初始化配置

推荐全局配置:

ai-assistant-notify init --global

也可以只在当前目录生成:

ai-assistant-notify init --local

默认配置路径:

  • 全局:~/.config/ai-assistant-notify/.env
  • 当前项目:./.env

两个命令的区别:

  • ai-assistant-notify init --global:生成全局默认配置,适合长期日常使用
  • ai-assistant-notify init --local:只在当前目录生成配置,适合项目单独覆盖或本地调试

如果全局配置和当前目录配置同时存在,当前目录 .env 会覆盖全局同名配置。

配置示例:

CODEX_FEISHU_WEBHOOK="https://open.feishu.cn/open-apis/bot/v2/hook/your-codex-webhook"
CODEX_FEISHU_KEYWORD="Codex提醒"

CLAUDE_FEISHU_WEBHOOK="https://open.feishu.cn/open-apis/bot/v2/hook/your-claude-webhook"
CLAUDE_FEISHU_KEYWORD="Claude提醒"

3. 测试通知

ai-assistant-notify test-notify

4. 启动监测

ai-assistant-notify start

只启动单个 watcher:

ai-assistant-notify start codex
ai-assistant-notify start claude

5. 查看状态

ai-assistant-notify status

6. 停止监测

ai-assistant-notify stop

配置加载规则

如果显式设置了 AI_ASSISTANT_NOTIFY_ENV,只加载这个文件。

否则按下面顺序加载,后加载覆盖先加载:

  1. ~/.config/ai-assistant-notify/.env
  2. 当前目录 .env
  3. 源码目录内 .env,仅当前两者都不存在时兜底

常用命令

ai-assistant-notify init --global
ai-assistant-notify init --local
ai-assistant-notify test-notify
ai-assistant-notify start
ai-assistant-notify start codex
ai-assistant-notify status
ai-assistant-notify stop

排障

查看状态:

ai-assistant-notify status

查看日志:

  • 运行日志:/tmp/ai-assistant-notify/watch-runtime.log
  • 错误日志:/tmp/ai-assistant-notify/watch-errors.log

常见检查项:

  • webhook 地址是否正确
  • 飞书关键词是否和机器人配置一致
  • Codex 日志文件 ~/.codex/log/codex-tui.log 是否存在
  • Claude 会话目录 ~/.claude/sessions 是否存在

更多信息