Releases: riba2534/feishu-cli
Releases · riba2534/feishu-cli
v1.13.0
What's Changed
New Features (since v1.12.0)
- 50+ 新命令: bitable 全功能(仪表盘/工作流/表单/角色/附件上传/聚合查询/视图配置)、doc content-update(7 种模式)、doc media-insert/download、msg 增强(批量获取/资源下载/话题回复)、sheet 导出、calendar agenda、task 增强(我的任务/重新打开/评论/清单成员管理)、vc 会议搜索与妙记、board 覆盖更新与删除、config add-scopes/create-app
- Markdown 互转增强: QuoteContainer 导入导出、HTML 标签解析(u/mark/sub/sup/grid)、AddOns/WikiCatalog 导出
Bug Fixes
Refactor
- 消除重复代码、删除死代码、修复效率问题(净减 187 行)
- 复用
printJSON、splitAndTrim、loadJSONInput消除 8 处重复 - 合并
Enable/DisableBitableWorkflow为SetBitableWorkflowStatus - 修复
parseBitableRawPagedListResponse双重 JSON 解析 - 修复
doOverwrite用GetBlock替代GetAllBlockChildren - 删除 5 处死代码和 3 个无用包装函数
- 复用
Full Changelog: v1.12.0...v1.13.0
v1.12.0
What's New
🎉 Bitable (多维表格) 全功能支持
新增 20 个子命令,完整支持飞书多维表格操作:
- 创建多维表格、数据表管理(创建/重命名/删除)
- 字段管理(创建/更新/删除,支持 20+ 种字段类型)
- 记录 CRUD(单条/批量创建、更新、删除、条件搜索)
- 视图管理(表格/看板/画册/甘特/表单)
✨ 新增 config get 命令
查看当前配置项的最终值(合并环境变量、配置文件和默认值):
feishu-cli config get app_id
feishu-cli config get owner_email✨ 新增配置项
owner_email:创建文档后自动授权的邮箱(环境变量FEISHU_OWNER_EMAIL)transfer_ownership:是否自动转移文档所有权(环境变量FEISHU_TRANSFER_OWNERSHIP)
🐛 Bug Fixes
- 修正 OAuth scope
im:chat:readonly→im:chat:read(不存在的 scope 已替换为正确名称)
📝 文档改进
- 所有 Claude Code 技能添加 GitHub 安装链接
- feishu-cli-chat 技能补充话题群(Thread Group)支持文档
- 新增 feishu-cli-bitable 技能文档
Contributors
- @flyinghanger — Bitable 功能实现 (#47)
- @tzy0608 — scope 修正 (#51)
v1.11.0
What's New
New Features
- Device Flow Authentication (RFC 8628):
auth login --method device— no redirect URL configuration needed, supports--scopes - Direct file/image sending:
msg send --file <path>/msg send --image <path>— auto-upload and send in one step - Multipart upload for large files:
file uploadautomatically uses chunked upload for files >20MB - User Token passthrough for exports:
doc export,wiki export,doc export-filenow support--user-access-tokenfor accessing user-authorized documents
Bug Fixes
- sheet style: Rename
BgColortoBackColorto match Feishu API field name - wiki create: Separate
--node-type(origin/shortcut) from--obj-type(docx/doc/sheet) - QuoteContainer export: Skip empty text children to avoid spurious
>lines - wiki export: Pass User Access Token through to block fetching (was only passed to node info)
- perm commands: Accept IM API style member type aliases (
open_id,user_id,chat_id,union_id) - Device Flow --scopes: Now correctly passed to the authorization request (was silently ignored)
- IM upload: Add file size pre-check (30MB file / 10MB image) and use 5-minute timeout
- msg send: Output upload progress to stderr to avoid polluting
--output json - doc export: Unify file permission to 0600
Skills Updated
feishu-cli-auth,feishu-cli-msg,feishu-cli-export,feishu-cli-perm,feishu-cli-toolkit
Full Changelog: v1.10.0...v1.11.0
v1.10.0
What's Changed
Breaking Change: User Token Required for msg/chat Commands
11 msg/chat commands now require User Token (previously optional):
msg get,msg list,msg history,msg pins,msg pin,msg unpinmsg reaction add/remove/list,msg delete,msg search-chatschat get,chat update,chat delete,chat member list/add/remove
Run feishu-cli auth login with updated scopes to use these commands.
New: feishu-cli-chat Skill
New Claude Code skill covering session browsing, message interaction (Reaction/Pin/delete/get), and group management — all under User Token.
Auto-Fallback for msg history
When User Token list API returns empty results for groups where the bot is absent, CLI automatically degrades to search+get mode transparently.
Skill Documentation Sync
Updated 8 skill SKILL.md files:
- auth: Three-tier Token classification, added
im:chat:readonly+im:chat.members:readscopes - msg: Slimmed to send-only, Reaction/Pin/delete redirected to chat skill
- chat: New skill with full permission table
- search: Added scopes + cross-skill routing table
- toolkit: Clarified module 4 as "群聊创建"
- write/import/perm: Clarified App Token usage
v1.9.0
What's New
- feat: Support User Access Token for
doc export— automatically reads saved User Token fromauth login, enabling export of documents the App has no access to (e.g., documents owned by others) (#33, by @mojitote) - refactor: Extract
resolveOptionalUserTokenWithFallbackhelper for consistent token resolution pattern - docs: Update skills and README with User Token usage, error codes (1770032/99991679), and
--user-access-tokenflag
Usage
# Export with App Token (default)
feishu-cli doc export <doc_id> -o output.md
# Export others' documents (auto-reads User Token from auth login)
feishu-cli doc export <doc_id> -o output.md
# Or specify User Token explicitly
feishu-cli doc export <doc_id> -o output.md --user-access-token <token>Install
curl -fsSL https://raw.githubusercontent.com/riba2534/feishu-cli/main/install.sh | bashv1.8.2
Changes since v1.8.1
Bug Fixes
- search-chats: Use Search API for server-side filtering instead of List API with client-side filtering, fixing missing results when matching chats are on later pages (
4d4f20b) - msg list/history: Support User Access Token via raw HTTP request, bypassing Go SDK's incorrect token type validation that rejects user_access_token (
bf44e6c) - OAuth scope names: Correct
im:chat:readonly→im:chat:read, remove non-existentsearch:app, adddrive:drive.search:readonlyandim:chat:read(bf44e6c) - CGO disabled: Add
CGO_ENABLED=0to all cross-compilation targets for statically linked binaries (9ac8767)
Documentation
- Add Bot vs User identity guide and
--user-access-tokenexamples to feishu-cli-msg skill (c3772db) - Add board image node guide and clone workflow (
46463f5) - Add p2p search guide and
im:message.group_msg:get_as_userscope (5f13af9) - Add skills install instructions to README (
9ac8767)
v1.8.1
Bug Fix
- fix(auth): prefer App Token over User Token for optional commands
resolveOptionalUserToken不再自动从token.json加载 User Token- 能用 App Token 的 API 默认使用 App Token(租户身份),避免因 User Token scope 不足导致
99991679 Unauthorized错误 - 仅通过
--user-access-token参数或FEISHU_USER_ACCESS_TOKEN环境变量显式指定时才使用 User Token - 搜索命令(
search docs/messages/apps)不受影响,仍自动从token.json加载
文档更新
- 更新
CLAUDE.md、feishu-cli-auth技能、feishu-cli-toolkit搜索参考文档,统一 Token 使用策略描述
v1.8.0
What's New
OAuth 认证系统
auth login— 支持自动浏览器、手动模式(--manual)、非交互模式(--print-url+auth callback,AI Agent 推荐)auth status— 查看授权状态,支持-o json输出auth logout— 退出登录- Token 自动刷新(Refresh Token 30 天有效期)
- Token 优先级链:命令行参数 > 环境变量 > token.json > config.yaml
搜索功能
search docs— 文档搜索,支持类型过滤(--docs-types)、分页(--count/--offset)search messages— 消息搜索,支持群聊/用户/时间范围过滤search apps— 应用搜索- 所有搜索 API 使用 User Access Token(通过
auth login获取)
画板精排绘图
board create-notes— JSON 精确控制节点坐标、颜色、连线,适合架构图和看板board import— Mermaid/PlantUML 代码自动渲染(服务端排版)board nodes— 获取画板所有节点board image— 下载画板截图
图片上传管道
doc import --upload-images— 自动上传本地和网络图片到飞书--image-workers参数控制并发(默认 2,API 限制 5 QPS)- 集成到三阶段并发导入管道
AI 技能扩展(8 → 11 个)
- 新增
feishu-cli-auth— OAuth 认证、Token 管理、scope 配置 - 新增
feishu-cli-search— 搜索文档/消息/应用(含 Token 前置检查流程) - 新增
feishu-cli-board— 画板精排绘图/Mermaid 导入/截图/节点管理
其他改进
- User Access Token 支持统一到所有命令(wiki/task/calendar/msg)
- Callout 导入修复:重用 API 生成的空子块,避免重复创建
- AddOns/TextDrawing 导出:自动还原为 Mermaid/PlantUML 代码块
- PNG 临时文件泄漏修复
- install.sh 临时目录清理修复
- 权限 scope 映射修正(12 处)
Contributors
感谢所有贡献者的 PR!
v1.7.0
v1.6.0
新功能
补全飞书 SDK 缺失接口,新增 46 个 CLI 命令,覆盖 7 大模块:
Permission 模块
perm list— 查看协作者列表perm delete— 删除协作者perm public-get/public-update— 公共权限查询/更新perm password create/update/delete— 文档密码管理perm batch-add— 批量添加协作者perm auth— 权限判断perm transfer-owner— 转移文档所有权
Drive 模块
file download/upload— 文件下载/上传doc export-file/import-file— 异步导出/导入(PDF/DOCX/XLSX)file version list/create/get/delete— 文件版本管理file meta— 批量获取文件元数据file stats— 文件访问统计
IM 模块
chat create/get/update/delete/link— 群聊 CRUDchat member list/add/remove— 群成员管理msg merge-forward— 合并转发msg reply— 回复消息msg reaction add/remove/list— 表情回复msg pin/unpin/pins— 消息置顶
Calendar 模块
calendar get/primary— 日历查询calendar event-search/event-reply— 日程搜索/回复calendar attendee add/list— 参与人管理calendar freebusy— 忙闲查询
Task 模块
task subtask create/list— 子任务管理task member add/remove— 任务成员管理task reminder add/remove— 提醒管理tasklist create/get/list/delete— 任务清单(新顶级命令)
Wiki 模块
wiki space-get— 知识空间详情wiki member add/list/remove— 空间成员管理
Contact 模块
user search— 邮箱/手机号查询用户 IDuser list— 部门用户列表dept get/children— 部门信息/子部门(新顶级命令)
Bug 修复
- 12 处
resp.Datanil 指针保护 - export/import 轮询逻辑修复(仅终态失败才返回 error)
- 3 处
strings.Split替换为splitAndTrim防止空元素 root.goPersistentPreRunE 改用HasSubCommands判断,修复子命令命名冲突- 新增 batch-add JSON 字段验证、task member role 验证