by leemysw
🚀 Feishu/Lark Docs、Sheet、Bitable <-> Markdown | AI Agent-friendly knowledge base exporter and writer with OAuth 2.0, CLI, TUI & Claude Skills support - 飞书文档 <写入/导出> Markdown | AI Agent 友好型导出-写入工具
# Add to your Claude Code skills
git clone https://github.com/leemysw/feishu-docxGuides for using ai agents skills like feishu-docx.
Last scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T15:36:24.677Z",
"npmAuditRan": true,
"pipAuditRan": true
}feishu-docx[pdf] and feishu-docx[browser]Let AI Agents read, write, and manage your Feishu/Lark knowledge base.
uv tool install feishu-docx or pip install feishu-docxRecommended: uv tool install (isolated, no conflicts with system Python)
uv tool install feishu-docx
Optional features are installed separately to keep the core package lightweight:
# PDF export: --pdf, --pdf-template, --pdf-logo, syntax highlighting
uv tool install 'feishu-docx[pdf]'
# Browser-based export: export-browser
uv tool install 'feishu-docx[browser]'
playwright install chromium
Or run directly without installing:
uvx feishu-docx export "https://my.feishu.cn/wiki/xxx"
If you don't have uv yet: curl -LsSf https://astral.sh/uv/install.sh | sh
Alternative: pip install (works inside a virtual environment or with --break-system-packages)
pip install feishu-docx
Optional extras also work with pip:
pip install 'feishu-docx[pdf]'
pip install 'feishu-docx[browser]'
playwright install chromium
Quote extras such as
'feishu-docx[pdf]'in shells like zsh, otherwise the[]may be treated as a glob pattern.
⚠️
pip installoutside a virtual environment may fail withexternally-managed-environmenton modern Linux/macOS (PEP 668). Use a virtual environment oruv tool installinstead.
# Configure credentials (one-time)
feishu-docx config set --app-id YOUR_APP_ID --app-secret YOUR_APP_SECRET
# Export! (auto-obtains tenant_access_token, no OAuth needed)
feishu-docx export "https://my.feishu.cn/wiki/KUIJwaBuGiwaSIkkKJ6cfVY8nSg"
# Create a Feishu doc directly from a WeChat article
feishu-docx create --url "https://mp.weixin.qq.com/s/xxxxx"
# Manage app cloud-space documents
feishu-docx drive ls --type docx
# Optional: Use OAuth mode for user-level permissions
# feishu-docx config set --auth-mode oauth && feishu-docx auth
Enable Agent to access your Feishu knowledge base directly!
This project includes a Claude Skill at .skills/feishu-docx/SKILL.md.
Supports OpenCode, Claude Code, Codex, Cursor, and more.
Copy this Skill to your agent project, and Claude can:
| Feature | Description |
|---|---|
| 📄 Document Export | Docx → Markdown with formatting, images, tables |
| 📊 Spreadsheet Export | Sheet → Markdown tables, with rich-text cells and display/formula modes |
| 📋 Bitable Export | Multidimensional tables → Markdown |
| 📚 Wiki Export | Auto-resolve wiki nodes |
| 🗂️ Wiki Batch Export | Recursively export entire wiki space with hierarchy |
| ✍️ Document Writing | Create docs, append Markdown, update specific blocks |
| 📰 WeChat Import/Export | Export WeChat articles or create Feishu docs from them |
| 🌐 Browser-Based Export | Export public docs or docs accessible in the current browser session, with local assets |
| ☁️ Drive Management | List files, delete files, manage permissions, clear files |
| 🗄️ Database Schema | Export APaaS database structure to Markdown |
| 🧷 Local Asset Download | Images and attachments saved locally with relative paths |
| 🖨️ PDF Export | Generate branded PDF with WeasyPrint, custom CSS templates |
| 🔐 Auth | Auto tenant_access_token (recommended) or OAuth 2.0 |
| 🎨 Beautiful TUI | Terminal UI powered by Textual |
This tool currently supports exporting the following Feishu/Lark document components:
| Category | Features | Status | Notes |
|---|---|---|---|
| Basic Text | Headings, Paragraphs, Lists, Tasks (Todo), Code Blocks, Quotes | ✅ | Fully Supported |
| Formatting | Bold, Italic, Strikethrough, Underline, Links, @Mentions | ✅ | Fully Supported |
| Layout | Columns, Callouts, Dividers | ✅ | Fully Supported |
| Tables | Native Tables | ✅ | Export to Markdown/HTML |
| Media | Images, Drawing Boards | ✅ | Drawing boards exported as images |
| Embedded | Spreadsheets (Sheets), Bitable | ✅ | Sheets support rich-text cells and display/formula modes |
| Special | Synced Blocks, Add-ons Blocks | ✅ | Synced blocks support same-document and cross-document references |
| Files | Attachments | ✅ | Local download when possible, temp link fallback |
export-browser requires Playwright.
If you installed via uv tool install, install the browser extra:
uv tool install 'feishu-docx[browser]'
playwright install chromium
If you are working inside a virtual environment:
pip install 'feishu-docx[browser]'
playwright install chromium
# Export single document to specific directory
feishu-docx export "https://xxx.feishu.cn/docx/xxx" -o ./docs
# Choose display values or formulas for Sheets (affects Sheet and embedded Sheet only)
feishu-docx export "https://xxx.feishu.cn/wiki/xxx" --table md --sheet-value-mode display
feishu-docx export "https://xxx.feishu.cn/wiki/xxx" --table md --sheet-value-mode formula
# Export a public or browser-readable doc in a real browser session
feishu-docx export-browser "https://xxx.larkoffice.com/wiki/xxx" -o ./browser_docs
# Export with existing Playwright storage state
feishu-docx export-browser "https://xxx.larkoffice.com/wiki/xxx" --storage-state ./storage_state.json
# Batch export entire wiki space (preserves hierarchy)
feishu-docx export-wiki-space <space_id_or_url> -o ./wiki_backup --max-depth 5
# Export APaaS database schema
feishu-docx export-workspace-schema <workspace_id> -o ./database_schema.md
# Export WeChat article to Markdown
feishu-docx export-wechat "https://mp.weixin.qq.com/s/xxxxxx"
# Export with PDF (requires the pdf extra)
uv tool install 'feishu-docx[pdf]' # or: pip install 'feishu-docx[pdf]'
feishu-docx export "https://xxx.feishu.cn/docx/xxx" --pdf
# Export with company-branded PDF template
feishu-docx export "https://xxx.feishu.cn/docx/xxx" --pdf --pdf-template ./brand.css
# Export with logo on cover page
feishu-docx export "https://xxx.feishu.cn/docx/xxx" --pdf --pdf-template ./brand.css --pdf-logo ./logo.svg
# Export with syntax highlighting theme
feishu-docx export "https://xxx.feishu.cn/docx/xxx" --pdf --syntax-style solarized-light
# Fetch a WeChat article and create a Feishu doc
feishu-docx create --url "https://mp.weixin.qq.com/s/xxxxxx"
# List app cloud-space documents in tenant mode
feishu-docx drive ls --type docx
# Manage public permission of a document
feishu-docx drive perm-show "https://xxx.feishu.cn/docx/xxx"
feishu-docx drive perm-set "https://xxx.feishu.cn/docx/xxx" --share-entity anyone_can_view
# Clear files in cloud space with double confirmation
feishu-docx drive clear --type docx
# Use token directly
feishu-docx export "URL" -t your_access_token
# Launch TUI
feishu-docx tui
from feishu_docx import FeishuExporter
# Initialize (uses tenant_access_token b
feishu-docx is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by leemysw. 🚀 Feishu/Lark Docs、Sheet、Bitable <-> Markdown | AI Agent-friendly knowledge base exporter and writer with OAuth 2.0, CLI, TUI & Claude Skills support - 飞书文档 <写入/导出> Markdown | AI Agent 友好型导出-写入工具. It has 237 GitHub stars.
Yes. feishu-docx passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/leemysw/feishu-docx" and add it to your Claude Code skills directory (see the Installation section above).
feishu-docx is primarily written in Python. It is open-source under leemysw on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh feishu-docx against similar tools.
No comments yet. Be the first to share your thoughts!