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

openclaw-feishu-team

v0.1.2

Published

CLI to configure a 1-leader + 3-staff OpenClaw Feishu bot team from simple config files.

Readme

openclaw-feishu-team

一个用于 OpenClaw 的飞书多 Bot 配置 CLI,帮你在一台服务器上,一键装配「1 个老大 + 3 个员工」的 AI 团队,并生成对应的 OpenClaw 配置和 soul 人设。

功能概览

  • 多飞书 Bot 账号:支持多个 Feishu/Lark 机器人账号,全部接入同一台 OpenClaw 服务器。
  • AI 团队结构:按「1 个老大 + 3 个员工」的业界常见组织结构来建队。
  • 自动生成 OpenClaw 配置
    • channels.feishu.accounts:为每个飞书 Bot 生成账号配置;
    • agents.list:为每个账号生成一个 Agent;
    • bindings:为每个账号创建 channel=feishu 的绑定。
  • 自动生成 soul 人设
    • 公司级 company.md:团队愿景、团队规则、群聊用途;
    • 老大 leader-*.md:负责统筹分工、向老板汇报;
    • 员工 staff-*.md:脚本/运营/数据等角色的专长与服从关系。

安装

确保服务器已安装 Node.js(建议 18+,OpenClaw 推荐 22+)。

npm install -g openclaw-feishu-team

安装完成后会注册一个全局命令:

openclaw-feishu-team

你也可以在本仓库中直接使用:

npm run openclaw:feishu-multi-bot -- --dry-run

配置文件约定:双配置模式

建议使用两个配置文件,符合「先配老大,再配员工」的实践:

  • leader-config.txt:老大 + 公司级信息
  • staff-config.txt:员工清单 + 角色

1. leader-config.txt(老大 + 公司愿景)

示例:

[BotName]:AIGlass-ManagerBot
APP_ID=cli_xxx_manager
APP_SECRET=manager_secret
VERIFICATION_TOKEN=...
ENCRYPT_KEY=ManagerBot

TEAM_CHAT_ID=oc_xxx_team
BOSS_CHAT_ID=oc_xxx_boss

TEAM_MODEL=1_LEADER_3_STAFF
STAFF_ROLES=script,growth,data

账号定位:发布AI眼镜行业信息+公司产品信息
目标人群:科技尝鲜+渠道商(帮我们卖货的)
客单价区间:1000-4000
内容风格(理性/热血/测评/对比):热血/测评
单条视频时长(30s/60s/90s):30s/60s
每周发布时间偏好:周五晚上8点
禁区(不能说的话题):战争/非法的
  • [BotName] 段:飞书开放平台上为老大创建的应用。
  • TEAM_CHAT_ID:你的飞书工作群(老大和员工在这里协作)。
  • BOSS_CHAT_ID:你的飞书汇报群(老大向你汇报)。
  • 最下面几行中文会被用来生成公司级 soul(公司愿景和团队规则)。

2. staff-config.txt(3 个员工 + 角色)

示例:

[BotName]:AIGlass-ScriptBot
ROLE=script
APP_ID=cli_xxx_script
APP_SECRET=script_secret
VERIFICATION_TOKEN=...
ENCRYPT_KEY=ScriptBot

[BotName]:AIGlass-GrowthBot
ROLE=growth
APP_ID=cli_xxx_growth
APP_SECRET=growth_secret
VERIFICATION_TOKEN=...
ENCRYPT_KEY=GrowthBot

[BotName]:AIGlass-DataBot
ROLE=data
APP_ID=cli_xxx_data
APP_SECRET=data_secret
VERIFICATION_TOKEN=...
ENCRYPT_KEY=DataBot
  • 每个 [BotName] 段代表一个员工 Bot(需要你在飞书开放平台创建,并填入真实 APP_ID/SECRET)。
  • ROLE 用于给人设模板提供明确角色信息:
    • script:脚本/内容专家;
    • growth:运营/增长专家;
    • data:数据/分析专家;
    • 你也可以自定义其它角色名(如 opssupport 等),用于区分员工职责。

命令行用法

1)只配置老大(先把 Leader 配好)

openclaw-feishu-team \
  --mode=leader \
  --config=leader-config.txt \
  --openclaw-home=~/.openclaw \
  --dry-run

确认输出无误后,去掉 --dry-run 正式写入:

openclaw-feishu-team \
  --mode=leader \
  --config=leader-config.txt \
  --openclaw-home=~/.openclaw

效果:

  • 更新/创建 <OPENCLAW_HOME>/openclaw.json 中:
    • channels.feishu.accounts(老大账号);
    • agents.list(老大 Agent);
    • bindings(老大绑定)。
  • <OPENCLAW_HOME>/souls/ 下生成:
    • company.md(公司愿景与团队规则);
    • leader-<accountKey>.md(老大人设)。

2)只配置员工(基于 Leader 信息自动补全)

openclaw-feishu-team \
  --mode=staff \
  --config=staff-config.txt \
  --leader-config=leader-config.txt \
  --openclaw-home=~/.openclaw \
  --dry-run

确认无误后,去掉 --dry-run

openclaw-feishu-team \
  --mode=staff \
  --config=staff-config.txt \
  --leader-config=leader-config.txt \
  --openclaw-home=~/.openclaw

效果:

  • 为 3 个员工 Bot 更新/创建:
    • channels.feishu.accounts 中的账号信息;
    • 对应的 agents.list 条目(带有“员工-xxx”命名);
    • 对应的 bindings
  • 利用 leader-config.txt 中的 TEAM/BOSS 群与公司愿景,生成:
    • staff-<accountKey>.md:3 份员工人设,明确:
      • 自己的职责领域(来自 ROLE);
      • 服从团队老大(accountKey);
      • 在 TEAM_CHAT 中如何执行任务、与其他员工协作;
      • 在 BOSS_CHAT 中通常由老大统一汇报,只在被点名时直接发言。

3)一次性配置老大 + 员工(单配置模式,向后兼容)

如果你仍然使用单个 config.txt 把老大和员工都写在一起,也可以直接:

openclaw-feishu-team --mode=all --config=config.txt --openclaw-home=~/.openclaw

通用参数说明

  • --mode
    • leader:只处理老大配置;
    • staff:只处理员工配置(需要 --leader-config 或默认 leader-config.txt);
    • all:处理当前 config 中的所有 Bot(默认)。
  • --config=<path>:当前运行使用的配置文件路径。
  • --leader-config=<path>mode=staff 时,用于提供 TEAM/BOSS 群和公司愿景信息。
  • --openclaw-home=<path>:OpenClaw 数据目录,默认 ~/.openclaw
  • --dry-run:只打印合并结果和摘要,不写入任何文件。

行为说明与安全性

  • 脚本会读取(或创建)<OPENCLAW_HOME>/openclaw.json,在以下位置做幂等合并
    • channels.feishu.accounts:按 key 更新/新增账号;
    • agents.list:按 id 更新/新增 Agent;
    • bindings:按 channel + accountId + agentId 更新/新增绑定。
  • 写入前,如果 openclaw.json 已存在,会自动生成带时间戳的备份文件,便于回滚。
  • 日志中不会打印完整的 APP_SECRET,而是做部分掩码(前后各几位,中间用 ... 代替)。
  • soul 文件如果已存在,则保留原内容,不会覆盖你手工微调的人设。