feishu-docx by leemysw/feishu-docx
npx skills add https://github.com/leemysw/feishu-docx --skill feishu-docx将飞书/ Lark 云文档导出为 Markdown 格式,用于 AI 分析。
pip install feishu-docx
feishu-docx config set --app-id YOUR_APP_ID --app-secret YOUR_APP_SECRET
Token 会自动刷新。无需用户交互。
feishu-docx export "<FEISHU_URL>" -o ./output
导出的 Markdown 文件将以文档标题作为文件名保存。
| 命令 | 描述 |
|---|---|
feishu-docx export <URL> |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 将文档导出为 Markdown |
feishu-docx export-wechat <URL> | 将微信公众号文章导出为 Markdown |
feishu-docx create <TITLE> | 创建新文档 |
feishu-docx create --url <URL> | 从微信公众号文章创建文档 |
feishu-docx write <URL> | 向文档追加内容 |
feishu-docx update <URL> | 更新特定块 |
feishu-docx drive ls | 列出应用或个人云空间文件 |
feishu-docx drive perm-show <TOKEN> | 显示公开权限 |
feishu-docx drive perm-members <TOKEN> | 列出权限成员 |
feishu-docx drive clear | 双重确认后清除文件 |
feishu-docx export-wiki-space <URL> | 批量导出整个知识库空间 |
feishu-docx export-workspace-schema <ID> | 导出多维表格数据库架构 |
feishu-docx auth | OAuth 授权 |
feishu-docx config set | 设置凭据 |
feishu-docx config show | 显示当前配置 |
feishu-docx config clear | 清除 Token 缓存 |
feishu-docx tui | 交互式 TUI 界面 |
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -o ./docs
feishu-docx export "https://xxx.feishu.cn/docx/XYZ789" -o ./docs -n meeting_notes
# 将内容输出到标准输出,而不是保存到文件
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" --stdout
# 或使用短标志
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -c
# 在 Markdown 输出中包含块 ID 作为 HTML 注释
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" --with-block-ids
# 或使用短标志
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -b
# 导出知识库空间中的所有文档(自动从 URL 提取 space_id)
feishu-docx export-wiki-space "https://xxx.feishu.cn/wiki/ABC123" -o ./wiki_backup
# 指定深度限制
feishu-docx export-wiki-space "https://xxx.feishu.cn/wiki/ABC123" -o ./docs --max-depth 3
# 导出时包含块 ID 以便后续更新
feishu-docx export-wiki-space "https://xxx.feishu.cn/wiki/ABC123" -o ./docs -b
# 将多维表格/工作空间数据库架构导出为 Markdown
feishu-docx export-workspace-schema <workspace_id>
# 指定输出文件
feishu-docx export-workspace-schema <workspace_id> -o ./schema.md
# 创建空文档
feishu-docx create "我的笔记"
# 使用 Markdown 内容创建
feishu-docx create "会议记录" -c "# 会议纪要\n\n- 议题一\n- 议题二"
# 从 Markdown 文件创建
feishu-docx create "周报" -f ./weekly_report.md
# 在特定文件夹中创建
feishu-docx create "笔记" --folder fldcnXXXXXX
# 从微信公众号文章 URL 创建
feishu-docx create --url "https://mp.weixin.qq.com/s/xxxxx"
如何获取 folder token :
https://xxx.feishu.cn/drive/folder/fldcnXXXXXXfldcnXXXXXX 就是 folder token# 追加 Markdown 内容
feishu-docx write "https://xxx.feishu.cn/docx/xxx" -c "## 新章节\n\n内容"
# 从文件追加
feishu-docx write "https://xxx.feishu.cn/docx/xxx" -f ./content.md
# 列出应用云空间文档
feishu-docx drive ls --auth-mode tenant --type docx
# 列出个人云空间文档
feishu-docx drive ls --auth-mode oauth --type docx
# 显示公开权限
feishu-docx drive perm-show "https://xxx.feishu.cn/docx/ABC123"
# 列出权限成员
feishu-docx drive perm-members "https://xxx.feishu.cn/docx/ABC123"
# 双重确认后清除文件
feishu-docx drive clear --type docx
# 步骤 1:使用块 ID 导出
feishu-docx export "https://xxx.feishu.cn/docx/xxx" -b -o ./
# 步骤 2:从 HTML 注释中找到块 ID
# <!-- block:blk123abc -->
# # 标题
# <!-- /block -->
# 步骤 3:更新特定块
feishu-docx update "https://xxx.feishu.cn/docx/xxx" -b blk123abc -c "新内容"
给 AI Agent 的提示 : 当您需要更新特定部分时:
- 使用
-b导出以获取块 ID- 从 HTML 注释中找到目标块 ID
- 使用该块 ID 执行
feishu-docx update
{doc_title}/ 文件夹--stdout 或 -c 直接输出内容(推荐给 Agent 使用)-b 导出时包含块 ID 以便后续更新--lark 标志tenant_access_token 管理应用云空间,user_access_token 管理个人云空间每周安装量
243
仓库
GitHub Stars
127
首次出现
Jan 22, 2026
安全审计
安装于
opencode217
gemini-cli202
cursor198
codex197
github-copilot189
openclaw181
Export Feishu/Lark cloud documents to Markdown format for AI analysis.
pip install feishu-docx
feishu-docx config set --app-id YOUR_APP_ID --app-secret YOUR_APP_SECRET
Token auto-refreshes. No user interaction required.
feishu-docx export "<FEISHU_URL>" -o ./output
The exported Markdown file will be saved with the document's title as filename.
| Command | Description |
|---|---|
feishu-docx export <URL> | Export document to Markdown |
feishu-docx export-wechat <URL> | Export WeChat article to Markdown |
feishu-docx create <TITLE> | Create new document |
feishu-docx create --url <URL> | Create document from WeChat article |
feishu-docx write <URL> | Append content to document |
feishu-docx update <URL> | Update specific block |
feishu-docx drive ls | List app or personal cloud-space files |
feishu-docx drive perm-show <TOKEN> | Show public permission |
feishu-docx drive perm-members <TOKEN> | List permission members |
feishu-docx drive clear | Clear files with double confirmation |
feishu-docx export-wiki-space <URL> | Batch export entire wiki space |
feishu-docx export-workspace-schema <ID> | Export bitable database schema |
feishu-docx auth | OAuth authorization |
feishu-docx config set | Set credentials |
feishu-docx config show | Show current config |
feishu-docx config clear | Clear token cache |
feishu-docx tui | Interactive TUI interface |
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -o ./docs
feishu-docx export "https://xxx.feishu.cn/docx/XYZ789" -o ./docs -n meeting_notes
# Output content to stdout instead of saving to file
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" --stdout
# or use short flag
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -c
# Include block IDs as HTML comments in the Markdown output
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" --with-block-ids
# or use short flag
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -b
# Export all documents in a wiki space (auto-extract space_id from URL)
feishu-docx export-wiki-space "https://xxx.feishu.cn/wiki/ABC123" -o ./wiki_backup
# Specify depth limit
feishu-docx export-wiki-space "https://xxx.feishu.cn/wiki/ABC123" -o ./docs --max-depth 3
# Export with Block IDs for later updates
feishu-docx export-wiki-space "https://xxx.feishu.cn/wiki/ABC123" -o ./docs -b
# Export bitable/workspace database schema as Markdown
feishu-docx export-workspace-schema <workspace_id>
# Specify output file
feishu-docx export-workspace-schema <workspace_id> -o ./schema.md
# Create empty document
feishu-docx create "我的笔记"
# Create with Markdown content
feishu-docx create "会议记录" -c "# 会议纪要\n\n- 议题一\n- 议题二"
# Create from Markdown file
feishu-docx create "周报" -f ./weekly_report.md
# Create in specific folder
feishu-docx create "笔记" --folder fldcnXXXXXX
# Create from a WeChat article URL
feishu-docx create --url "https://mp.weixin.qq.com/s/xxxxx"
如何获取 folder token :
https://xxx.feishu.cn/drive/folder/fldcnXXXXXXfldcnXXXXXX 就是 folder token# Append Markdown content
feishu-docx write "https://xxx.feishu.cn/docx/xxx" -c "## 新章节\n\n内容"
# Append from file
feishu-docx write "https://xxx.feishu.cn/docx/xxx" -f ./content.md
# List app cloud-space documents
feishu-docx drive ls --auth-mode tenant --type docx
# List personal cloud-space documents
feishu-docx drive ls --auth-mode oauth --type docx
# Show public permission
feishu-docx drive perm-show "https://xxx.feishu.cn/docx/ABC123"
# List permission members
feishu-docx drive perm-members "https://xxx.feishu.cn/docx/ABC123"
# Clear files with double confirmation
feishu-docx drive clear --type docx
# Step 1: Export with Block IDs
feishu-docx export "https://xxx.feishu.cn/docx/xxx" -b -o ./
# Step 2: Find block ID from HTML comments
# <!-- block:blk123abc -->
# # Heading
# <!-- /block -->
# Step 3: Update the specific block
feishu-docx update "https://xxx.feishu.cn/docx/xxx" -b blk123abc -c "新内容"
Tip for AI Agents : When you need to update a specific section:
- Export with
-bto get block IDs- Find the target block ID from HTML comments
- Use
feishu-docx updatewith that block ID
{doc_title}/ folder--stdout or -c for direct content output (recommended for agents)-b to export with block IDs for later updates--lark flagtenant_access_token manages app cloud space, user_access_token manages personal cloud spaceWeekly Installs
243
Repository
GitHub Stars
127
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
opencode217
gemini-cli202
cursor198
codex197
github-copilot189
openclaw181
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
27,400 周安装