tag:github.com,2008:https://github.com/riba2534/feishu-cli/releases Release notes from feishu-cli 2026-03-18T17:02:47Z tag:github.com,2008:Repository/1138743298/v1.11.0 2026-03-18T17:04:36Z v1.11.0 <h2>What's New</h2> <h3>New Features</h3> <ul> <li><strong>Device Flow Authentication (RFC 8628)</strong>: <code>auth login --method device</code> — no redirect URL configuration needed, supports <code>--scopes</code></li> <li><strong>Direct file/image sending</strong>: <code>msg send --file &lt;path&gt;</code> / <code>msg send --image &lt;path&gt;</code> — auto-upload and send in one step</li> <li><strong>Multipart upload for large files</strong>: <code>file upload</code> automatically uses chunked upload for files &gt;20MB</li> <li><strong>User Token passthrough for exports</strong>: <code>doc export</code>, <code>wiki export</code>, <code>doc export-file</code> now support <code>--user-access-token</code> for accessing user-authorized documents</li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>sheet style</strong>: Rename <code>BgColor</code> to <code>BackColor</code> to match Feishu API field name</li> <li><strong>wiki create</strong>: Separate <code>--node-type</code> (origin/shortcut) from <code>--obj-type</code> (docx/doc/sheet)</li> <li><strong>QuoteContainer export</strong>: Skip empty text children to avoid spurious <code>&gt; </code> lines</li> <li><strong>wiki export</strong>: Pass User Access Token through to block fetching (was only passed to node info)</li> <li><strong>perm commands</strong>: Accept IM API style member type aliases (<code>open_id</code>, <code>user_id</code>, <code>chat_id</code>, <code>union_id</code>)</li> <li><strong>Device Flow --scopes</strong>: Now correctly passed to the authorization request (was silently ignored)</li> <li><strong>IM upload</strong>: Add file size pre-check (30MB file / 10MB image) and use 5-minute timeout</li> <li><strong>msg send</strong>: Output upload progress to stderr to avoid polluting <code>--output json</code></li> <li><strong>doc export</strong>: Unify file permission to 0600</li> </ul> <h3>Skills Updated</h3> <ul> <li><code>feishu-cli-auth</code>, <code>feishu-cli-msg</code>, <code>feishu-cli-export</code>, <code>feishu-cli-perm</code>, <code>feishu-cli-toolkit</code></li> </ul> <p><strong>Full Changelog</strong>: <a class="commit-link" href="https://github.com/riba2534/feishu-cli/compare/v1.10.0...v1.11.0"><tt>v1.10.0...v1.11.0</tt></a></p> riba2534 tag:github.com,2008:Repository/1138743298/v1.10.0 2026-03-18T15:12:40Z v1.10.0 <h2>What's Changed</h2> <h3>Breaking Change: User Token Required for msg/chat Commands</h3> <p>11 msg/chat commands now <strong>require User Token</strong> (previously optional):</p> <ul> <li><code>msg get</code>, <code>msg list</code>, <code>msg history</code>, <code>msg pins</code>, <code>msg pin</code>, <code>msg unpin</code></li> <li><code>msg reaction add/remove/list</code>, <code>msg delete</code>, <code>msg search-chats</code></li> <li><code>chat get</code>, <code>chat update</code>, <code>chat delete</code>, <code>chat member list/add/remove</code></li> </ul> <p>Run <code>feishu-cli auth login</code> with updated scopes to use these commands.</p> <h3>New: feishu-cli-chat Skill</h3> <p>New Claude Code skill covering session browsing, message interaction (Reaction/Pin/delete/get), and group management — all under User Token.</p> <h3>Auto-Fallback for msg history</h3> <p>When User Token list API returns empty results for groups where the bot is absent, CLI automatically degrades to search+get mode transparently.</p> <h3>Skill Documentation Sync</h3> <p>Updated 8 skill SKILL.md files:</p> <ul> <li><strong>auth</strong>: Three-tier Token classification, added <code>im:chat:readonly</code> + <code>im:chat.members:read</code> scopes</li> <li><strong>msg</strong>: Slimmed to send-only, Reaction/Pin/delete redirected to chat skill</li> <li><strong>chat</strong>: New skill with full permission table</li> <li><strong>search</strong>: Added scopes + cross-skill routing table</li> <li><strong>toolkit</strong>: Clarified module 4 as "群聊创建"</li> <li><strong>write/import/perm</strong>: Clarified App Token usage</li> </ul> riba2534 tag:github.com,2008:Repository/1138743298/v1.9.0 2026-03-15T07:37:02Z v1.9.0 <h2>What's New</h2> <ul> <li><strong>feat</strong>: Support User Access Token for <code>doc export</code> — automatically reads saved User Token from <code>auth login</code>, enabling export of documents the App has no access to (e.g., documents owned by others) (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="4077688235" data-permission-text="Title is private" data-url="https://github.com/riba2534/feishu-cli/issues/33" data-hovercard-type="pull_request" data-hovercard-url="/riba2534/feishu-cli/pull/33/hovercard" href="https://github.com/riba2534/feishu-cli/pull/33">#33</a>, by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mojitote/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mojitote">@mojitote</a>)</li> <li><strong>refactor</strong>: Extract <code>resolveOptionalUserTokenWithFallback</code> helper for consistent token resolution pattern</li> <li><strong>docs</strong>: Update skills and README with User Token usage, error codes (1770032/99991679), and <code>--user-access-token</code> flag</li> </ul> <h2>Usage</h2> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Export with App Token (default) feishu-cli doc export &lt;doc_id&gt; -o output.md # Export others' documents (auto-reads User Token from auth login) feishu-cli doc export &lt;doc_id&gt; -o output.md # Or specify User Token explicitly feishu-cli doc export &lt;doc_id&gt; -o output.md --user-access-token &lt;token&gt;"><pre><span class="pl-c"><span class="pl-c">#</span> Export with App Token (default)</span> feishu-cli doc <span class="pl-k">export</span> <span class="pl-k">&lt;</span>doc_id<span class="pl-k">&gt;</span> -o output.md <span class="pl-c"><span class="pl-c">#</span> Export others' documents (auto-reads User Token from auth login)</span> feishu-cli doc <span class="pl-k">export</span> <span class="pl-k">&lt;</span>doc_id<span class="pl-k">&gt;</span> -o output.md <span class="pl-c"><span class="pl-c">#</span> Or specify User Token explicitly</span> feishu-cli doc <span class="pl-k">export</span> <span class="pl-k">&lt;</span>doc_id<span class="pl-k">&gt;</span> -o output.md --user-access-token <span class="pl-k">&lt;</span>token<span class="pl-k">&gt;</span></pre></div> <h2>Install</h2> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -fsSL https://raw.githubusercontent.com/riba2534/feishu-cli/main/install.sh | bash"><pre>curl -fsSL https://raw.githubusercontent.com/riba2534/feishu-cli/main/install.sh <span class="pl-k">|</span> bash</pre></div> riba2534 tag:github.com,2008:Repository/1138743298/v1.8.2 2026-03-10T18:00:03Z v1.8.2 <h2>Changes since v1.8.1</h2> <h3>Bug Fixes</h3> <ul> <li><strong>search-chats</strong>: 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 (<code>4d4f20b</code>)</li> <li><strong>msg list/history</strong>: Support User Access Token via raw HTTP request, bypassing Go SDK's incorrect token type validation that rejects user_access_token (<code>bf44e6c</code>)</li> <li><strong>OAuth scope names</strong>: Correct <code>im:chat:readonly</code> → <code>im:chat:read</code>, remove non-existent <code>search:app</code>, add <code>drive:drive.search:readonly</code> and <code>im:chat:read</code> (<code>bf44e6c</code>)</li> <li><strong>CGO disabled</strong>: Add <code>CGO_ENABLED=0</code> to all cross-compilation targets for statically linked binaries (<code>9ac8767</code>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add Bot vs User identity guide and <code>--user-access-token</code> examples to feishu-cli-msg skill (<code>c3772db</code>)</li> <li>Add board image node guide and clone workflow (<code>46463f5</code>)</li> <li>Add p2p search guide and <code>im:message.group_msg:get_as_user</code> scope (<code>5f13af9</code>)</li> <li>Add skills install instructions to README (<code>9ac8767</code>)</li> </ul> riba2534 tag:github.com,2008:Repository/1138743298/v1.8.1 2026-03-09T12:59:36Z v1.8.1 <h2>Bug Fix</h2> <ul> <li><strong>fix(auth): prefer App Token over User Token for optional commands</strong> <ul> <li><code>resolveOptionalUserToken</code> 不再自动从 <code>token.json</code> 加载 User Token</li> <li>能用 App Token 的 API 默认使用 App Token(租户身份),避免因 User Token scope 不足导致 <code>99991679 Unauthorized</code> 错误</li> <li>仅通过 <code>--user-access-token</code> 参数或 <code>FEISHU_USER_ACCESS_TOKEN</code> 环境变量显式指定时才使用 User Token</li> <li>搜索命令(<code>search docs/messages/apps</code>)不受影响,仍自动从 <code>token.json</code> 加载</li> </ul> </li> </ul> <h2>文档更新</h2> <ul> <li>更新 <code>CLAUDE.md</code>、<code>feishu-cli-auth</code> 技能、<code>feishu-cli-toolkit</code> 搜索参考文档,统一 Token 使用策略描述</li> </ul> riba2534 tag:github.com,2008:Repository/1138743298/v1.8.0 2026-03-09T05:02:04Z v1.8.0 <h2>What's New</h2> <h3>OAuth 认证系统</h3> <ul> <li><code>auth login</code> — 支持自动浏览器、手动模式(<code>--manual</code>)、非交互模式(<code>--print-url</code> + <code>auth callback</code>,AI Agent 推荐)</li> <li><code>auth status</code> — 查看授权状态,支持 <code>-o json</code> 输出</li> <li><code>auth logout</code> — 退出登录</li> <li>Token 自动刷新(Refresh Token 30 天有效期)</li> <li>Token 优先级链:命令行参数 &gt; 环境变量 &gt; token.json &gt; config.yaml</li> </ul> <h3>搜索功能</h3> <ul> <li><code>search docs</code> — 文档搜索,支持类型过滤(<code>--docs-types</code>)、分页(<code>--count</code>/<code>--offset</code>)</li> <li><code>search messages</code> — 消息搜索,支持群聊/用户/时间范围过滤</li> <li><code>search apps</code> — 应用搜索</li> <li>所有搜索 API 使用 User Access Token(通过 <code>auth login</code> 获取)</li> </ul> <h3>画板精排绘图</h3> <ul> <li><code>board create-notes</code> — JSON 精确控制节点坐标、颜色、连线,适合架构图和看板</li> <li><code>board import</code> — Mermaid/PlantUML 代码自动渲染(服务端排版)</li> <li><code>board nodes</code> — 获取画板所有节点</li> <li><code>board image</code> — 下载画板截图</li> </ul> <h3>图片上传管道</h3> <ul> <li><code>doc import --upload-images</code> — 自动上传本地和网络图片到飞书</li> <li><code>--image-workers</code> 参数控制并发(默认 2,API 限制 5 QPS)</li> <li>集成到三阶段并发导入管道</li> </ul> <h3>AI 技能扩展(8 → 11 个)</h3> <ul> <li>新增 <code>feishu-cli-auth</code> — OAuth 认证、Token 管理、scope 配置</li> <li>新增 <code>feishu-cli-search</code> — 搜索文档/消息/应用(含 Token 前置检查流程)</li> <li>新增 <code>feishu-cli-board</code> — 画板精排绘图/Mermaid 导入/截图/节点管理</li> </ul> <h3>其他改进</h3> <ul> <li>User Access Token 支持统一到所有命令(wiki/task/calendar/msg)</li> <li>Callout 导入修复:重用 API 生成的空子块,避免重复创建</li> <li>AddOns/TextDrawing 导出:自动还原为 Mermaid/PlantUML 代码块</li> <li>PNG 临时文件泄漏修复</li> <li>install.sh 临时目录清理修复</li> <li>权限 scope 映射修正(12 处)</li> </ul> <h2>Contributors</h2> <p>感谢所有贡献者的 PR!</p> riba2534 tag:github.com,2008:Repository/1138743298/v1.7.0 2026-03-02T03:20:36Z v1.7.0 <h2>新功能</h2> <ul> <li><strong>表格列数超限自动拆分</strong>:飞书 API 限制单个表格最大 9 行 × 9 列,此前仅实现行拆分。现新增列拆分,超过 9 列的 Markdown 表格自动拆分为多个子表格,保留首列作为标识列</li> <li>支持复合拆分:同时超过 9 行和 9 列时,先列拆分再行拆分</li> </ul> <h2>文档更新</h2> <ul> <li>API 限制表补充列数限制、文件夹子节点上限(1500)、文档块总数上限</li> <li>技能文件同步更新表格拆分说明</li> </ul> riba2534 tag:github.com,2008:Repository/1138743298/v1.6.0 2026-02-27T08:52:02Z v1.6.0 <h2>新功能</h2> <p>补全飞书 SDK 缺失接口,新增 <strong>46 个 CLI 命令</strong>,覆盖 7 大模块:</p> <h3>Permission 模块</h3> <ul> <li><code>perm list</code> — 查看协作者列表</li> <li><code>perm delete</code> — 删除协作者</li> <li><code>perm public-get/public-update</code> — 公共权限查询/更新</li> <li><code>perm password create/update/delete</code> — 文档密码管理</li> <li><code>perm batch-add</code> — 批量添加协作者</li> <li><code>perm auth</code> — 权限判断</li> <li><code>perm transfer-owner</code> — 转移文档所有权</li> </ul> <h3>Drive 模块</h3> <ul> <li><code>file download/upload</code> — 文件下载/上传</li> <li><code>doc export-file/import-file</code> — 异步导出/导入(PDF/DOCX/XLSX)</li> <li><code>file version list/create/get/delete</code> — 文件版本管理</li> <li><code>file meta</code> — 批量获取文件元数据</li> <li><code>file stats</code> — 文件访问统计</li> </ul> <h3>IM 模块</h3> <ul> <li><code>chat create/get/update/delete/link</code> — 群聊 CRUD</li> <li><code>chat member list/add/remove</code> — 群成员管理</li> <li><code>msg merge-forward</code> — 合并转发</li> <li><code>msg reply</code> — 回复消息</li> <li><code>msg reaction add/remove/list</code> — 表情回复</li> <li><code>msg pin/unpin/pins</code> — 消息置顶</li> </ul> <h3>Calendar 模块</h3> <ul> <li><code>calendar get/primary</code> — 日历查询</li> <li><code>calendar event-search/event-reply</code> — 日程搜索/回复</li> <li><code>calendar attendee add/list</code> — 参与人管理</li> <li><code>calendar freebusy</code> — 忙闲查询</li> </ul> <h3>Task 模块</h3> <ul> <li><code>task subtask create/list</code> — 子任务管理</li> <li><code>task member add/remove</code> — 任务成员管理</li> <li><code>task reminder add/remove</code> — 提醒管理</li> <li><code>tasklist create/get/list/delete</code> — 任务清单(新顶级命令)</li> </ul> <h3>Wiki 模块</h3> <ul> <li><code>wiki space-get</code> — 知识空间详情</li> <li><code>wiki member add/list/remove</code> — 空间成员管理</li> </ul> <h3>Contact 模块</h3> <ul> <li><code>user search</code> — 邮箱/手机号查询用户 ID</li> <li><code>user list</code> — 部门用户列表</li> <li><code>dept get/children</code> — 部门信息/子部门(新顶级命令)</li> </ul> <h2>Bug 修复</h2> <ul> <li>12 处 <code>resp.Data</code> nil 指针保护</li> <li>export/import 轮询逻辑修复(仅终态失败才返回 error)</li> <li>3 处 <code>strings.Split</code> 替换为 <code>splitAndTrim</code> 防止空元素</li> <li><code>root.go</code> PersistentPreRunE 改用 <code>HasSubCommands</code> 判断,修复子命令命名冲突</li> <li>新增 batch-add JSON 字段验证、task member role 验证</li> </ul> riba2534 tag:github.com,2008:Repository/1138743298/v1.5.0 2026-02-12T19:38:45Z v1.5.0 <h2>新功能</h2> <ul> <li><strong>导出 @用户展开</strong>:导出时 <code>@[user:ou_xxx]</code> 自动解析为 <code>[@姓名](mailto:邮箱)</code> 格式(<code>--expand-mentions</code>,默认开启)</li> <li><strong>画板 PNG 导出</strong>:<code>--download-images</code> 同时将画板导出为本地 PNG 图片</li> <li><strong>9 种新块类型导出</strong>:Agenda、LinkPreview、SyncBlock、WikiCatalogV2、AITemplate 等</li> <li><strong>未知块类型可读注释</strong>:<code>&lt;!-- 不支持的块类型: WikiCatalog (type=42) --&gt;</code></li> </ul> <h2>Bug 修复</h2> <ul> <li><strong>修复 Callout 内容丢失</strong>:CAUTION/IMPORTANT Callout 导入时因 429 限流内容丢失</li> <li><strong>修复嵌套列表丢失</strong>:混合嵌套列表子项导入时因 429 限流静默丢失</li> </ul> <h2>重构</h2> <ul> <li><strong>统一重试机制</strong>:新增泛型重试框架 <code>DoWithRetry[T]</code>,统一 6 处手写重试循环 <ul> <li>退避策略:full jitter + 服务端 <code>x-ogw-ratelimit-reset</code> header</li> <li>Phase 1 顶层块创建和嵌套子块创建均加入 429 重试保护</li> <li>支持 <code>context.Context</code> 取消</li> </ul> </li> </ul> <h2>安装</h2> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -fsSL https://raw.githubusercontent.com/riba2534/feishu-cli/main/install.sh | bash"><pre>curl -fsSL https://raw.githubusercontent.com/riba2534/feishu-cli/main/install.sh <span class="pl-k">|</span> bash</pre></div> riba2534 tag:github.com,2008:Repository/1138743298/v1.4.2 2026-02-06T19:56:09Z v1.4.2 <h2>修复 doc add Markdown 模式</h2> <ul> <li><strong>嵌套列表支持</strong>:改用 BlockNode 树结构 + 递归创建,不再打平丢失层级</li> <li><strong>50 块分批处理</strong>:支持大文档,避免 API 限制报错</li> <li><strong>表格填充 429 重试</strong>:最多 5 次指数退避,提升稳定性</li> <li><strong>成功计数修正</strong>:输出实际成功/失败数,JSON 模式含完整统计</li> <li><strong>代码风格统一</strong>:去掉 log.Printf,魔法数字改为常量引用</li> </ul> riba2534