feat: Support native draw.io import into Lark/Feishu whiteboard
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
Feature Request
Please add first-class CLI support for importing .drawio files into Lark/Feishu whiteboards.
The Lark/Feishu web product already supports importing draw.io files manually:
Open a whiteboard → More → Import → upload a draw.io file
However, the current lark-cli whiteboard commands only support updating a whiteboard through raw, mermaid, plantuml, or svg input formats. There does not appear to be a CLI/OpenAPI wrapper
for the product’s native draw.io import path.
Why this is needed
We need to upload existing draw.io diagrams into Lark/Feishu documents as editable whiteboard content.
We tried converting .drawio XML into whiteboard OpenAPI nodes ourselves, but the result is not equivalent to the native product importer:
- draw.io
swimlanesemantics are lost unless manually reconstructed. orthogonalEdgeStyle,jettySize,entryX/entryY,exitX/exitY, and connector routing differ from draw.io.- z-index and group/parent semantics differ between draw.io and whiteboard OpenAPI.
- Text wrapping and font metrics differ.
- Some diagrams require many custom mapping rules to approximate the original.
- Visual fidelity is noticeably worse than local draw.io rendering.
Since the web UI already has a native draw.io importer, exposing that path through lark-cli would avoid fragile custom converters and produce a more faithful editable whiteboard.
Suggested CLI UX
One possible command:
lark-cli whiteboard +import \
--whiteboard-token <whiteboard_token> \
--file ./diagram.drawio \
--format drawio \
--overwrite \
--as user
Or as an additional input format:
lark-cli whiteboard +update \
--whiteboard-token <whiteboard_token> \
--source @./diagram.drawio \
--input_format drawio \
--overwrite \
--as user
Expected behavior
- Upload a .drawio file.
- Use the same importer behavior as the Lark/Feishu web UI.
- Preserve editable whiteboard nodes as much as the official importer supports.
- Support --overwrite and idempotent update behavior.
- Return created node IDs or import task status.
- Provide clear errors for unsupported draw.io features.
Current workaround
The current workaround is to parse .drawio XML and manually convert mxGraph cells to whiteboard OpenAPI nodes, then call:
lark-cli whiteboard +update \
--whiteboard-token <whiteboard_token> \
--source @converted.json \
--input_format raw \
--overwrite \
--as user
This works only partially and requires many lossy mappings. It is not a good replacement for the native draw.io import feature already available in the web UI.
Related docs
Lark/Feishu Help Center documents native draw.io import into whiteboard:
https://www.feishu.cn/hc/zh-CN/articles/018852745122-%E4%BB%8E%E5%A4%96%E9%83%A8%E5%AF%BC%E5%85%A5%E5%86%85%E5%AE%B9%E8%87%B3%E7%94%BB%E6%9D%BF
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing lark-cli whiteboard +update entry point and its raw, mermaid, plantuml, and svg input handling. Verify whether Lark/Feishu exposes the web importer through an API, then define the CLI behavior, overwrite and idempotency handling, status or node-ID response, and unsupported-feature errors described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100