
Feishu Cli Export
Export Feishu/Lark docs, wiki nodes, and sheets to local Markdown or async PDF, Word, and Excel with images and embedded spreadsheets expanded.
Overview
feishu-cli-export is an agent skill for the Build phase that exports Feishu documents, wiki pages, and spreadsheets to local Markdown or office formats via feishu-cli.
Install
npx skills add https://github.com/riba2534/feishu-cli --skill feishu-cli-exportWhat is this skill?
- Routes docx, wiki, and sheet URLs or tokens to feishu-cli doc, wiki, and sheet export commands
- Markdown export with doc export expanding embedded spreadsheets; image and whiteboard asset download
- Async PDF, Word, and Excel via doc export-file and drive export
- Explicit output paths recommended because default stdout/tmp/token filenames differ per command
- Pairs with feishu-cli-read for viewing; import uses feishu-cli-import or feishu-cli-drive
- 3 primary export surfaces: docx, wiki, sheet
- Routing table maps URL patterns /docx/, /wiki/, /sheets/ to CLI commands
Adoption & trust: 735 installs on skills.sh; 1.2k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Critical Feishu docs and sheets are locked in the cloud and you need dated, local Markdown or PDF/Word files for agents, backups, or repo docs.
Who is it for?
Builders already authenticated with feishu-cli who routinely sync Feishu knowledge into a codebase or agent context on demand.
Skip if: Uploading or creating Feishu content from local files—use feishu-cli-import or feishu-cli-drive instead; or read-only preview without writing files—use feishu-cli-read.
When should I use this skill?
User requests exporting Feishu documents, saving as Markdown, exporting PDF/Word/Excel, downloading document images, exporting spreadsheets, or sheet-to-Markdown conversion.
What do I get? / Deliverables
Feishu content lands on an explicit local path as Markdown or exported office files, with embedded sheets and media handled per feishu-cli export options.
- Local Markdown file from doc, wiki, or sheet export
- Optional PDF, Word, or Excel via async export-file
- Downloaded images and whiteboard assets when requested
Recommended Skills
Journey fit
Build/docs is the canonical shelf because the skill turns team knowledge base content into repo-local artifacts agents and builders can edit, diff, and version. docs matches exporting documentation assets to disk—not drive upload (import) or passive read-only preview without export paths.
How it compares
CLI export orchestration skill—not a hosted Feishu MCP server or manual browser copy-paste.
Common Questions / FAQ
Who is feishu-cli-export for?
Solo and indie developers using Feishu/Lark with feishu-cli who want agents to dump docs and sheets to disk for editing, archiving, or RAG ingestion.
When should I use feishu-cli-export?
Use in Build/docs when the user asks to export a document, save as Markdown, download images, export PDF/Word/Excel, or convert a spreadsheet to Markdown from a doc, wiki, or sheet link or token.
Is feishu-cli-export safe to install?
It runs feishu-cli against your tenant with filesystem writes; check Prism Security Audits on this page, scope allowed-tools Bash to feishu-cli, and avoid exporting sensitive docs to shared paths.
SKILL.md
READMESKILL.md - Feishu Cli Export
# 飞书导出 把飞书内容导出成本地文件。读文档到 Markdown 也可以用 `feishu-cli-read`;本技能更偏“落盘/下载素材/导出文件格式”。 ## 路由 | 输入 | 命令 | |---|---| | `/docx/<id>` 或 document_id | `feishu-cli doc export` | | `/wiki/<token>` 或 node_token | `feishu-cli wiki export` | | `/sheets/<token>` 或 spreadsheet_token | `feishu-cli sheet export --format markdown` | | 需要 PDF/Word/Excel 文件 | `feishu-cli doc export-file` 或 `feishu-cli drive export` | `sheet export` 支持直接传 `/sheets/<token>` URL。`wiki export` 会根据节点类型导出 docx 或 sheet。 ## Markdown 导出 ```bash # 普通文档 feishu-cli doc export <document_id> --output /tmp/doc.md # 知识库节点 feishu-cli wiki export <node_token_or_url> --output /tmp/wiki.md # 普通电子表格 feishu-cli sheet export <spreadsheet_token_or_url> --format markdown -o /tmp/sheet.md ``` CLI 默认输出行为不同,skill 执行时建议显式传输出路径: | 命令 | 未传输出路径时 | |---|---| | `doc export` | 打印到 stdout | | `wiki export` | 保存到 `/tmp/<title>.md` | | `sheet export` | 保存为 `<spreadsheet_token>.<format>` | ## doc export 专属参数 ```bash feishu-cli doc export <document_id> \ --output /tmp/doc.md \ --download-images \ --assets-dir /tmp/assets \ --front-matter \ --highlight \ --expand-mentions \ --expand-sheets ``` | 参数 | 说明 | |---|---| | `--download-images` | 下载图片和画板缩略图并改写 Markdown 引用 | | `--assets-dir` | 素材保存目录 | | `--front-matter` | 添加 YAML front matter | | `--highlight` | 保留文本颜色/背景色为 HTML span | | `--expand-mentions` | 展开 @用户为友好名称 | | `--expand-sheets` | 默认 true;把文档内嵌电子表格块展开成 Markdown 表格,false 时保留 `<sheet .../>` | `--front-matter`、`--highlight`、`--expand-mentions`、`--expand-sheets` 只属于 `doc export`,不要传给 `wiki export`。 ## Sheet Markdown ```bash # 导出所有可见工作表 feishu-cli sheet export <token_or_url> --format markdown -o /tmp/sheet.md # CSV 必须指定 sheet-id feishu-cli sheet export <token_or_url> --format csv --sheet-id <sheet_id> -o /tmp/sheet.csv ``` Markdown 输出会按工作表生成标题和表格。大表格用于阅读场景;需要保留公式/样式请导出 xlsx。 ## 文件格式导出 ```bash feishu-cli doc export-file <doc_token> --type pdf -o /tmp/report.pdf feishu-cli doc export-file <doc_token> --type docx -o /tmp/report.docx feishu-cli doc export-file <sheet_token> --doc-type sheet --type xlsx -o /tmp/report.xlsx ``` | 参数 | 说明 | 默认 | |---|---|---| | `--type` | `pdf` / `docx` / `xlsx` | 必填 | | `--doc-type` | `docx` / `sheet` 等源文档类型 | `docx` | | `-o, --output` | 输出路径 | `<doc_token>.<type>` | 长任务或需要 sub-id/resume 时使用 `feishu-cli-drive` 的 `drive export`。 ## 本地文件导入提醒 `doc import-file` 属于“本地文件导入为云文档”,不属于导出;简单格式如下: ```bash feishu-cli doc import-file report.docx --type docx --name "季度报告" ``` 更推荐的异步导入、大小限制和 resume 能力见 `feishu-cli-drive`。 ## 验证 1. 导出后检查文件存在且大小大于 0。 2. Markdown 场景读前 40 行确认标题、表格、图片路径是否合理。 3. 下载素材时确认 `assets-dir` 下有对应文件;wiki 批量导出时注意同名素材覆盖风险。