Borrowing it
Nothing to install: this file belongs to DemonDamon/AgenticX. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/DemonDamon/AgenticX/main/.cursor/commands/setup-feishu-cli.mdgit clone --depth 1 https://github.com/DemonDamon/AgenticXWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/demondamon/agenticx/setup-feishu-cli)<a href="https://agentmods.dev/commands/demondamon/agenticx/setup-feishu-cli"><img src="https://agentmods.dev/badge/commands/demondamon/agenticx/setup-feishu-cli/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/demondamon/agenticx/setup-feishu-cli"><img src="https://agentmods.dev/badge/commands/demondamon/agenticx/setup-feishu-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01821 |
| Opus 5.5 | $0.00000 | $0.00728 |
| Sonnet 5.5 | $0.00000 | $0.00364 |
| Haiku 4.5 | $0.00000 | $0.00182 |
Grade A, and why
setup-feishu-cli scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
proc = subprocess.run( How it starts
The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
setup-feishu-cli
从安装到配置多个飞书企业账号。一个 profile 对应一个开放平台应用,对应一个企业。飞书客户端里登了几个企业,不会自动变成几条 profile。
官方安装页:飞书 CLI。命令与多账号说明以 larksuite/cli 的中文 README 为准。
命令名
- 对话里使用:
/setup-feishu-cli - 可选参数:要配置的企业清单。用户没给清单时,先列出已有 profile,再问还要加哪几个企业。
硬性边界
- 只改本机
lark-cli配置(钥匙串 /~/.lark-cli)。不要把 App Secret、device code、用户令牌写入仓库、plan、commit 或mcp.json。 - 回复用户时不回显 App Secret。添加 profile 时 Secret 只从 stdin 进入
lark-cli profile add --app-secret-stdin。 - 不使用
config init覆盖已有默认应用。已有 App ID 时用profile add,不要再--new出一个重复应用。 - 未经用户点名,不执行
profile use、profile remove。单次操作用--profile "<名称>"。 - 同一轮只发起一个企业的浏览器授权。展示授权链接和二维码后结束本轮,等用户说做完了,再执行
--device-code。不要在同一轮里阻塞等待。 - 授权失败且 CLI 写明「请勿持续重试」时,不要立刻重开登录。把缺的 scope 告诉用户。
第一步:安装
需要本机有 Node.js(npm / npx)。源码编译才需要 Go 1.23+ 和 Python 3。
先检查:
command -v lark-cli && lark-cli -v
已有可执行文件就跳过安装,向用户报告版本和路径。没有则用官方一行安装(飞书 CLI 安装页 与 README 的推荐方式):
npx @larksuite/cli@latest install
装完再跑 command -v lark-cli && lark-cli -v。新开的 shell 找不到命令时,提示用户新开终端,或执行 hash -r。
源码安装只在用户明确要求时使用:
git clone https://github.com/larksuite/cli.git
cd cli
make install
npx skills add larksuite/cli -y -g
npm 安装脚本若没有装上 Agent skills,补一次:
npx skills add larksuite/cli -y -g
用 lark-cli skills list 确认能看到 lark-shared。不要把社区包 feishu-mcp 或 @larksuiteoapi/lark-mcp 当成这个 CLI。
第二步:看清已有账号
lark-cli profile list
lark-cli whoami
向用户说明:active: true 是以后不写 --profile 时的默认身份。tokenStatus: valid 且 user 非空,才算用户身份可用。只有 bot、没有 user 的 profile 不能读该用户的知识库和云文档。
第三步:逐个企业接入
对用户点名的每一个企业单独做完下面一整段,再开始下一个。
3.1 已有应用
用户提供该企业的 App ID 和 App Secret。profile 名称用用户指定的短名(例如企业简称),不要用 App ID 当名字,除非用户要求。
python3 - << 'PY'
import subprocess
secret = """PASTE_SECRET"""
proc = subprocess.run(
[
"lark-cli", "profile", "add",
"--name", "PROFILE_NAME",
"--app-id", "APP_ID",
"--app-secret-stdin",
"--lang", "zh_cn",
],
input=secret,
text=True,
capture_output=True,
)
print(proc.stdout)
print(proc.stderr)
raise SystemExit(proc.returncode)
PY
lark-cli --profile "PROFILE_NAME" whoami
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 168 lines · 0 tokens per session scan A 49899f288e3d
setup-feishu-cli is a command published in the GitHub repository DemonDamon/AgenticX (988 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,821 tokens. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-27.
setup-feishu-cli compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| setup-feishu-cliDemonDamon/AgenticX | Command | 988 | yesterday | Apache-2.0 | A | 0 | Claude Code, Cursor |
| parallel-executeshyftlabs/continuum | Command | 84 | 1mo ago | Apache-2.0 | A | 0 | Claude Code |
| renameasgeirtj/system_prompts_leaks | Command | 71k | 2d ago | CC0-1.0 | A | 0 | Claude Code |
| dashboard-session-abort-allBlackBeltTechnology/pi-agent-dashboard | Command | 341 | 2d ago | MIT | A | 16 | Claude Code |
| dashboard-session-renameBlackBeltTechnology/pi-agent-dashboard | Command | 341 | 2d ago | MIT | A | 18 | Claude Code |
| dashboard-session-tellBlackBeltTechnology/pi-agent-dashboard | Command | 341 | 2d ago | MIT | A | 21 | Claude Code |
| dashboard-session-unhideBlackBeltTechnology/pi-agent-dashboard | Command | 341 | 2d ago | MIT | A | 18 | Claude Code |