Skip to content

Releases: riba2534/feishu-cli

v1.15.0

02 Apr 18:00

Choose a tag to compare

v1.15.0

🎉 新功能

审批功能

  • 审批定义查询feishu-cli approval get <approval_code> - 查看审批模板详情
  • 审批任务查询feishu-cli approval task query --topic todo - 查看待办审批、已办审批、我发起的审批、抄送通知
  • 支持 JSON 和原始 JSON 输出格式
  • 自动推断当前登录用户身份,无需手动指定用户 ID

消息加急功能

  • 消息加急feishu-cli msg urgent <message_id> --user-ids <ids> - 对指定用户发送加急通知
  • 支持三种加急类型:
    • app:应用内加急(默认)
    • phone:电话加急
    • sms:短信加急
  • 支持三种用户 ID 类型:open_iduser_idunion_id

🐛 Bug 修复

  1. 列表项中的代码块丢失 - 修复嵌套在列表中的代码块导入时被忽略的问题
  2. Todo 嵌套子项问题 - 修复 Todo 列表的嵌套子项导入丢失、导出未缩进的问题
  3. 文档更新总是追加 - 修复 content-update 命令 replace 模式失效,总是 append 的问题
  4. base_url 尾部斜杠 - 修复配置中 base_url 带尾部斜杠导致 404 的问题
  5. 加急消息提示不准确 - 区分全部送达与部分送达的提示信息

🔧 代码优化

  • 简化消息加急代码,消除重复的 switch-case 逻辑
  • 添加通用枚举验证函数,提高代码可维护性
  • 审批主题使用常量替代魔法字符串
  • 删除冗余注释,提高代码可读性

📝 文档改进

  • 补充外部群 API 兼容性说明
  • 优化文档更新模式的使用指南,防止误用 append 导致内容重复
  • 完善消息加急功能的 skill 文档

贡献者

感谢以下贡献者:

v1.14.1

01 Apr 07:13

Choose a tag to compare

What's Changed

  • sheet 命令支持 User Tokensheet list-sheetssheet read 自动从 token.json 读取 User Token,修复无 App 权限的表格无法读取的问题
  • wiki export sheet 透传 User Token:知识库 sheet 类型导出也支持 User Token 鉴权

安装

curl -fsSL https://raw.githubusercontent.com/riba2534/feishu-cli/main/install.sh | bash

v1.14.0

01 Apr 06:42

Choose a tag to compare

What's New

  • wiki export 支持 sheet 类型电子表格:知识库节点为 sheet 类型时,自动读取所有工作表数据并转为 Markdown 表格,富文本单元格(文档链接、附件等)完整保留

安装

curl -fsSL https://raw.githubusercontent.com/riba2534/feishu-cli/main/install.sh | bash

v1.13.0

29 Mar 11:15

Choose a tag to compare

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

  • fix: printJSON 输出 URL 时 & 被转义为 \u0026 (#60)
  • fix: 引用块导入导出多个问题 (#61)
  • fix: 配置测试与本地环境隔离 (#62)

Refactor

  • 消除重复代码、删除死代码、修复效率问题(净减 187 行)
    • 复用 printJSONsplitAndTrimloadJSONInput 消除 8 处重复
    • 合并 Enable/DisableBitableWorkflowSetBitableWorkflowStatus
    • 修复 parseBitableRawPagedListResponse 双重 JSON 解析
    • 修复 doOverwriteGetBlock 替代 GetAllBlockChildren
    • 删除 5 处死代码和 3 个无用包装函数

Full Changelog: v1.12.0...v1.13.0

v1.12.0

25 Mar 18:28

Choose a tag to compare

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:readonlyim:chat:read(不存在的 scope 已替换为正确名称)

📝 文档改进

  • 所有 Claude Code 技能添加 GitHub 安装链接
  • feishu-cli-chat 技能补充话题群(Thread Group)支持文档
  • 新增 feishu-cli-bitable 技能文档

Contributors

v1.11.0

18 Mar 17:04

Choose a tag to compare

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 upload automatically uses chunked upload for files >20MB
  • User Token passthrough for exports: doc export, wiki export, doc export-file now support --user-access-token for accessing user-authorized documents

Bug Fixes

  • sheet style: Rename BgColor to BackColor to 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

18 Mar 15:12

Choose a tag to compare

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 unpin
  • msg reaction add/remove/list, msg delete, msg search-chats
  • chat 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:read scopes
  • 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

15 Mar 07:37
e9b263a

Choose a tag to compare

What's New

  • feat: Support User Access Token for doc export — automatically reads saved User Token from auth login, enabling export of documents the App has no access to (e.g., documents owned by others) (#33, by @mojitote)
  • refactor: Extract resolveOptionalUserTokenWithFallback helper for consistent token resolution pattern
  • docs: Update skills and README with User Token usage, error codes (1770032/99991679), and --user-access-token flag

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 | bash

v1.8.2

10 Mar 18:00

Choose a tag to compare

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:readonlyim:chat:read, remove non-existent search:app, add drive:drive.search:readonly and im:chat:read (bf44e6c)
  • CGO disabled: Add CGO_ENABLED=0 to all cross-compilation targets for statically linked binaries (9ac8767)

Documentation

  • Add Bot vs User identity guide and --user-access-token examples 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_user scope (5f13af9)
  • Add skills install instructions to README (9ac8767)

v1.8.1

09 Mar 12:59

Choose a tag to compare

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.mdfeishu-cli-auth 技能、feishu-cli-toolkit 搜索参考文档,统一 Token 使用策略描述