| name | larksuite-wiki |
| description | Manage and export Lark Suite (Feishu) Wiki/Knowledge Base documents. Read, search, sync with subdocuments, and incremental export to local Markdown files. |
| homepage | https://open.larksuite.com |
| tags | ["lark","wiki","knowledge-base","export","sync","markdown"] |
| metadata | {"openclaw":{"emoji":"๐","requires":{"env":["LARK_APP_ID","LARK_APP_SECRET"]},"primaryEnv":"LARK_APP_ID"}} |
Lark Suite Wiki
Manage and export Lark Suite (Feishu) Wiki/Knowledge Base documents with recursive sync and incremental updates.
Prerequisites
- Create a Lark/Feishu app at https://open.larksuite.com/console
- Enable permissions:
docs:doc:read
drive:drive:read
wiki:wiki:read
- Publish the app and authorize it to access your wiki
- Set environment variables (or edit script defaults):
export LARK_APP_ID="cli_xxxxxxxx"
export LARK_APP_SECRET="xxxxxxxx"
Commands
List Wiki Spaces
larksuite-wiki spaces
Read Document (with subdocument links)
larksuite-wiki read <doc_id_or_url>
Export Single Document
larksuite-wiki export <doc_id_or_url> --output ./docs/
Show Document Tree Structure
larksuite-wiki tree <doc_id_or_url>
Sync Entire Wiki (Recursive Export)
larksuite-wiki sync <doc_id_or_url> --output ./lark-wiki/
larksuite-wiki sync <doc_id_or_url> --output ./lark-wiki/
larksuite-wiki sync <doc_id_or_url> --output ./lark-wiki/ --force
Features
1. โ
Batch Export
Export entire knowledge base with one command.
2. โ
Recursive Subdocument Export
Automatically follows and exports all linked subdocuments.
3. โ
Preserves Directory Structure
Creates nested folders matching your wiki structure:
lark-wiki/
โโโ 01_้ฆ้กต/
โ โโโ 01_้ฆ้กต.md
โ โโโ 01_ๆฅๅธธๅค็/
โ โโโ 01_ๆฅๅธธๅค็.md
โ โโโ ...
โโโ 02_ไบ่ช้่ๅๆ/
โ โโโ ...
4. โ
Incremental Sync
Tracks document revisions and only exports changed documents:
- Saves sync state to
.lark-sync-state.json
- Compares revision IDs
- Skips unchanged documents
Quick Start
Export your entire wiki
python3 larksuite-wiki.py sync TDCZweBJ2iMFO4kI1LAlSE62gnd --output ./my-wiki/
Daily incremental sync
python3 larksuite-wiki.py sync TDCZweBJ2iMFO4kI1LAlSE62gnd --output ./my-wiki/
Output Structure
Each document gets its own folder:
- Main
.md file
- Subfolders for child documents
- Numbered prefixes for ordering (01_, 02_, etc.)
API Reference
Notes
- Documents must be explicitly shared with your app
- Some block types may not convert perfectly to Markdown
- Large wikis with many subdocuments may take time to sync
- Sync state is saved locally for incremental updates