feishu-docx
49
总安装量
50
周安装量
#4319
全站排名
安装命令
npx skills add https://github.com/leemysw/feishu-docx --skill feishu-docx
Agent 安装分布
opencode
34
claude-code
33
openclaw
26
gemini-cli
21
cursor
19
antigravity
19
Skill 文档
Feishu Docx Exporter
Export Feishu/Lark cloud documents to Markdown format for AI analysis.
Setup (One-time)
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.
Export Documents
feishu-docx export "<FEISHU_URL>" -o ./output
The exported Markdown file will be saved with the document’s title as filename.
Supported Document Types
- docx: Feishu cloud documents â Markdown with images
- sheet: Spreadsheets â Markdown tables
- bitable: Multidimensional tables â Markdown tables
- wiki: Knowledge base nodes â Auto-resolved and exported
Command Reference
| Command | Description |
|---|---|
feishu-docx export <URL> |
Export document to Markdown |
feishu-docx create <TITLE> |
Create new document |
feishu-docx write <URL> |
Append content to document |
feishu-docx update <URL> |
Update specific block |
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 |
Examples
Export a wiki page
feishu-docx export "https://xxx.feishu.cn/wiki/ABC123" -o ./docs
Export a document with custom filename
feishu-docx export "https://xxx.feishu.cn/docx/XYZ789" -o ./docs -n meeting_notes
Read content directly (recommended for AI Agent)
# 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
Export with Block IDs (for later updates)
# 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
Batch Export Entire Wiki Space
# 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 Database Schema
# 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
Write Documents (CLI)
Create Document
# 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
å¦ä½è·å folder token:
- 卿µè§å¨ä¸æå¼ç®æ æä»¶å¤¹
- ä» URL 䏿å tokenï¼
https://xxx.feishu.cn/drive/folder/fldcnXXXXXX fldcnXXXXXXå°±æ¯ folder token
Append Content to Existing Document
# 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
Update Specific Block
# 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
Tips
- Images auto-download to
{doc_title}/folder - Use
--stdoutor-cfor direct content output (recommended for agents) - Use
-bto export with block IDs for later updates - Token auto-refreshes, no re-auth needed
- For Lark (overseas): add
--larkflag