feishu-lark-agent by joeseesun/feishu-lark-agent
npx skills add https://github.com/joeseesun/feishu-lark-agent --skill feishu-lark-agentsource ~/.zshrc && python3 ~/.claude/skills/feishu-lark-agent/feishu.py <category> <action> [--key value ...]
| 前缀 | 类型 | 用途 |
|---|---|---|
ou_ | open_id | 用户 ID,用于 --to |
oc_ | chat_id | 群聊 ID,用于 --chat |
| 邮箱 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
用于 --email,自动解析为 open_id |
docx/xxx URL 后半段 | document_id | 飞书文档 ID |
base/xxx URL 后半段 | app_token | 多维表格 App Token |
如果只有姓名 :先 user search --name "张三" 获取 open_id,再执行目标操作。
msgmsg send --to <open_id|chat_id> --text "..." # open_id → ou_, chat_id → oc_
msg send --email <email> --text "..." # 用邮箱发
msg send --chat <chat_id> --text "..." # 发群
msg send --to <open_id> --file /path # 发文件内容
msg reply --to <message_id> --text "..."
msg history --chat <chat_id> [--limit 20]
msg search --query "关键词" [--limit 20]
msg chats [--limit 50] # 列出所有群聊
useruser search --name "张三" # 模糊搜索,返回 open_id
user get --email <email> # 精确查询
user get --id <open_id>
docdoc create --title "标题" [--content "markdown内容"] [--file /path.md]
doc get --id <document_id> # 从 URL feishu.cn/docx/DOC_ID 取
doc list [--folder <token>] [--limit 50]
创建后自动授权
FEISHU_OWNER_OPEN_ID编辑权限。
tabletable tables --app <token> # 先列出所有 table
table fields --app <token> --table <id> # 必须先查字段!
table records --app <token> --table <id> [--filter 'AND(CurrentValue.[状态]="进行中")'] [--limit 100]
table add --app <token> --table <id> --data '{"字段名":"值"}'
table update --app <token> --table <id> --record <recXXX> --data '{"字段名":"新值"}'
table delete --app <token> --table <id> --record <recXXX>
App token 在 URL 中 :
feishu.cn/base/APP_TOKEN
calcal calendars # ⚠️ 第一步:列出 Bot 可访问的日历,获取 cal_id
cal list --calendar <cal_id> [--days 7]
cal add --calendar <cal_id> --title "..." --start "YYYY-MM-DD HH:MM" --end "YYYY-MM-DD HH:MM" [--location "..."] [--attendees "a@x.com,b@x.com"]
cal delete --calendar <cal_id> --id <event_id>
⚠️ 重要 :Bot 无法访问个人日历(
primary会报错)。必须先cal calendars获取 Bot 自己的日历 ID,再用该 ID 操作。
tasktask list [--completed true] [--limit 50]
task add --title "..." [--due "YYYY-MM-DD"] [--note "..."]
task done --id <task_guid>
task delete --id <task_guid>
1. 按姓名发消息
# step1 获取 open_id
python3 feishu.py user search --name "张三"
# step2 发消息
python3 feishu.py msg send --to ou_xxx --text "你好"
2. 给群发消息 (已知群名 → 先查 chat_id)
python3 feishu.py msg chats # 找到目标群的 chat_id (oc_xxx)
python3 feishu.py msg send --chat oc_xxx --text "通知内容"
3. 添加多维表记录 (先查字段避免字段名写错)
python3 feishu.py table fields --app APP_TOKEN --table TABLE_ID
python3 feishu.py table add --app APP_TOKEN --table TABLE_ID --data '{"标题":"xxx","状态":"进行中"}'
4. 创建文档并写入内容
python3 feishu.py doc create --title "会议记录" --content "# 会议记录\n\n## 议题\n- 内容"
5. 查看近期日程 (先查可用日历)
python3 feishu.py cal calendars # 获取 Bot 的日历 ID
python3 feishu.py cal list --calendar <cal_id> --days 7
6. 创建日程 (先查日历 ID)
python3 feishu.py cal calendars # 先获取 cal_id
python3 feishu.py cal add --calendar <cal_id> --title "周会" --start "2026-03-20 10:00" --end "2026-03-20 11:00"
| 错误码 | 原因 | 解决 |
|---|---|---|
99991671 | 权限未开通 | 飞书开放平台添加权限 |
230006 | 日历权限缺失 | 开通 calendar:calendar |
1254043 | Bitable 未找到 | 检查 URL 中的 app_token |
191001 | 日历 ID 错误 | 不能用 primary,用真实 cal_id |
Missing FEISHU_APP_ID | 环境变量未加载 | source ~/.zshrc |
Weekly Installs
156
Repository
GitHub Stars
48
First Seen
12 days ago
Security Audits
Installed on
gemini-cli152
kimi-cli152
codex152
github-copilot152
amp152
cline152
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
33,600 周安装
Node.js与Python内存泄漏检测指南:识别、修复与性能优化工具
154 周安装
FDA数据库Python访问指南:药品医疗器械不良事件查询与监管数据分析
154 周安装
iOS StoreKit 2 应用内购买完整指南:实现、测试与最佳实践
154 周安装
Angular HTTP 数据获取教程:基于信号的 httpResource() 与 resource() 使用指南
1 周安装
Angular路由配置指南:v20+懒加载、函数式守卫与信号参数详解
1 周安装
iOS数据持久化与数据库路由指南:SwiftData、Core Data、CloudKit、迁移与审计
154 周安装