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

hwjcode-personal

v1.1.135

Published

<div align="center">

Readme

🚀 hwjcode

飞书原生 · Worktree 并行 · 自更新的 AI 编程 Agent

基于 Easy Code 深度定制的增强 fork,专为飞书团队协作而生

npm version License Node.js TypeScript


📖 这是什么?

hwjcodeEasy Code 的增强 fork,在原项目的 AI 编码能力之上,增加了三大核心能力:

1. 🦜 飞书原生集成

把 AI Agent 变成飞书机器人,在群聊里直接干活:

你在飞书群:帮我重构这个模块
                ↓
飞书 Bot → 绑定项目目录 → Agent 执行任务(需要并行时创建独立 Worktree)→ 提交代码
  • 私聊:直接对话,像用 CLI 一样
  • 项目群:「拉个群 + 项目路径」一键创建绑定工作目录的专属群
  • 批量建群:一次性拆分任务到多个群并行开发,每个群自带独立 worktree + TASK.md 任务文档
  • 实时流式:Agent 的思考过程和工具调用通过飞书卡片实时回传
  • 工作区命令:使用显式 /worktree ... 管理隔离工作区;普通 Git 需求由 Agent 按当前分支处理

2. 🌳 Git Worktree 并行隔离

多个 Agent 在同一仓库下互不干扰地并行工作:

ai-exam/                         ← 仓库根目录
├── .hwjcode/worktrees/
│   ├── ui-team/                 ← UI 组的隔离工作区(独立分支)
│   ├── api-team/                ← API 组的隔离工作区(独立分支)
│   └── test-team/               ← 测试组的隔离工作区(独立分支)
├── vibe-coding-题目.md
└── packages/
  • 单个项目群默认直接绑定项目目录;批量并行群或明确要求隔离时才创建独立 worktree
  • /worktree status 查看改动 · /worktree commit 提交存档 · /worktree done 提交并清理 · /worktree discard 丢弃
  • worktree 正确建在 git root(而非子目录),包含完整仓库快照
  • TASK.md 持久化任务文档(handoff 设计哲学:文档是最可靠的上下文)

3. 🔄 自更新机制

飞书里发送 /update,或说「更新一下你自己」,自动完成 npm 安装 + 进程重启

  • 外挂脚本模式:父进程退出 → npm cache clean → 安装当前产品通道 → 拉起新进程
  • SIGHUP 修复:外挂脚本脱离父进程 session,不被连带杀死
  • npm cache 三重保险:cache clean --force + --prefer-online + --force
  • 自动带上原启动参数(--feishu 等),无缝重启

📦 安装

商业稳定版和个人版是两个可共存的 npm 产品:

# 商业稳定版
npm install -g hwjcode@stable

# 个人版
npm install -g hwjcode-personal@latest

验证:

hwjcode --version
hwjcode-personal --version

两者的全局命令、自更新目标和配置目录完全独立。商业版使用 ~/.hwjcode-user / .hwjcode,个人版使用 ~/.hwjcode-personal / .hwjcode-personal

项目指令也按产品隔离:个人版默认只自动加载社区通用的 AGENTS.md/initsave_memory 也会使用该文件;商业版继续兼容 DEEPV.mdAGENTS.md 的既有行为。需要其他文件名时,可通过 contextFileName 显式配置。

本仓库自身的协作与开发约定只维护根目录的 AGENTS.md,不再维护或新增 DEEPV.md


🚀 快速开始

CLI 模式(和原项目一样)

cd your-project
hwjcode

飞书网关模式(核心差异化)

hwjcode --feishu

首次启动会引导你完成飞书应用配置(App ID / Secret)。配置完成后:

  1. 私聊机器人:直接对话即可,机器人绑定一个默认工作目录
  2. 创建项目群:发送 拉个群 /path/to/project
  3. 批量并行开发:告诉主 Agent 你的任务清单,它会自动拆分到多个群

🦜 飞书功能详解

项目群创建

| 操作 | 效果 | | :------------------------------------- | :----------------------------------------------- | | 拉个群 D:\my-app | 创建群 + 绑定项目工作目录(默认不创建 worktree) | | 拉个群 D:\my-app --agent claude-code | 群消息自动派发给本机 Claude Code 执行 | | 创建项目群时明确要求「并行」或「隔离」 | 在 Git 仓库中为该群创建独立 worktree | | 批量建群(Agent 自动) | 一次性创建多个群,每个群独立 worktree + TASK.md |

飞书命令

| 命令 | 说明 | | :------------------------ | :----------------------------------------- | | /help | 查看帮助 | | /status | 查看 CLI 版本、积分、模型、上下文大小 | | /model <name> | 切换 AI 模型 | | /bind <路径> | 绑定/切换群的工作目录 | | /worktree status | 查看当前工作目录的 Git 改动 | | /worktree commit [msg] | 提交隔离 worktree 的修改,保留工作区 | | /worktree done [msg] | 提交并清理隔离 worktree,群切回项目目录 | | /worktree push | 推送隔离 worktree 分支到远程 | | /worktree discard | 丢弃隔离 worktree 的修改并清理工作区 | | /worktree create [name] | 创建新 worktree | | /sessions | 查看本机 Agent 会话(Claude Code / Codex) | | /update | 自更新到最新版 |

自然语言快捷操作

Worktree 操作必须使用显式 /worktree(或 /wt)命令;普通的「提交」「推送」等 Git 请求会保留给 Agent 在当前工作目录处理。

| 你说的话 | 触发的操作 | | :----------------- | :----------------------------------- | | 「更新一下你自己」 | 直接自更新到最新版(不经过模型工具) |

Agent 派发(ACP)

把编码任务转交给本机的 Claude CodeCodex 执行:

@cc 给 src/foo.ts 加单元测试          → 派发给 Claude Code
@codex 写个基准测试                    → 派发给 Codex
@cc:resume <sessionId> 继续上次的工作   → 续接历史会话

也可以通过 /bind <路径> --agent claude-code 设置群默认派发方。


🌳 Worktree 管理详解

工作流

建群(默认项目目录)→ 需要隔离时 `/worktree create <name>`(独立分支)
  ↓
Agent 在隔离环境工作(文件互不干扰)
  ↓
/worktree status   ← 查看改了什么
/worktree commit   ← 提交到分支,保留工作区
/worktree done     ← 提交到分支 + 清理
/worktree discard  ← 不满意?丢弃重来

TASK.md 任务文档

创建项目群时附带任务描述,会在该群工作目录(项目目录或 worktree 根目录)生成 TASK.md

# 任务规划

> 本文档由主 Agent 在建群时自动生成,描述本群 agent 的工作目标。
> 文件持久保存在工作区根目录,可随时查看或编辑。

---

(主 Agent 分配的具体任务描述)

Agent 首次收到消息时会被引导去读 TASK.md。这个文件:

  • 持久 — 不会因 session 重建或 /compact 丢失
  • 可见 — 终端 cat TASK.md 随时查看
  • 可编辑 — 改了文件,Agent 下次读就是新内容

⚙️ CLI 原有功能

作为 Easy Code 的 fork,原项目的所有功能完整保留:

  • AI 编码:代码生成、重构、Bug 修复、多语言支持
  • 工具系统:read_file / write_file / shell / grep / glob / web_fetch / web_search 等
  • MCP 协议:连接外部数据源和工具
  • 自定义模型:OpenAI / Anthropic / 本地模型(通过 litellm-gateway)
  • Hooks 钩子:在工作流节点注入自定义逻辑
  • 会话管理:持久化 / 恢复 / 压缩 / 检查点
  • 斜杠命令:/help / /model / /session / /mcp / /memory 等
  • Skills 系统:可复用的技能包,支持本地和远程仓库
  • Cron 定时任务:支持定时执行任务

详见原项目文档。

🛠️ 开发

git clone https://github.com/hwj123hwj/hwjcode.git
cd hwjcode
npm install
npm run build
npm run dev

常用命令

| 命令 | 说明 | | :------------------ | :-------------------------------------- | | npm run build | 构建所有包 | | npm run dev | 开发模式运行 | | npm run test | 运行测试 | | npm run lint | 代码风格检查 | | npm run typecheck | TypeScript 类型检查 | | 个人版发布 | 合并 PR 到 master 后自动打 tag 并发布 |

发布流程

个人版:将功能 PR 合并到 master。自动版本工作流会按最新 vX.Y.Z tag 递增 patch,随后发布 hwjcode-personal@latest;无需手动打 tag 或执行 npm publish

商业版:将商业版变更合并到 commercial/1.1 后,自动版本工作流会按最新 commercial-vX.Y.Z tag 选择下一个未被 npm 占用的 patch,随后发布 hwjcode@stable(同时兼容更新 latest);无需手动打 tag 或执行 npm publish。只有需要受控的手动发布时,才在 GitHub Actions 运行 Release Commercial,输入版本号与确认词 RELEASE_COMMERCIAL


📋 与原项目的差异

| 功能 | 原 Easy Code | hwjcode fork | | :------------ | :------------ | :----------------------------------------- | | 飞书集成 | ❌ | ✅ 网关模式 + 群聊 + 卡片 + 流式 | | Worktree 隔离 | ❌ | ✅ 并行开发 + 群聊隔离 | | 自更新 | ❌ | ✅ npm + 外挂脚本 + SIGHUP 修复 | | 批量建群 | ❌ | ✅ + TASK.md 持久化任务文档 | | Agent 派发 | 基础 ACP | ✅ 增强(群默认绑定 + /sessions + resume) | | 包名 | easycode-ai | hwjcode | | 命令名 | easycode | hwjcode |


📄 许可证

Apache License 2.0


⭐ 如果这个 fork 对你有帮助,请给个 Star!

Based on Easy Code by OrionStarAI