Skip to content

feishu-md-syncLocal Markdown and Feishu docs in one loop

Publish, pull, inspect, and merge Feishu/Lark document changes with dry-run-first CLI commands.

Install

Requires Node.js 20 or newer:

bash
npm install --global feishu-md-sync@latest
feishu-md-sync --help

Main Loop

bash
feishu-md-sync status ./doc.md --target DocToken
feishu-md-sync diff ./doc.md --target DocToken
feishu-md-sync publish ./doc.md --target DocToken
feishu-md-sync publish ./doc.md --target DocToken --write --confirm-untracked-remote

The first command with publish is a dry-run. The second writes after review and confirms that the current working directory is adopting an existing remote document for the first time.

Commands

CommandPurpose
publishDry-run or write local Markdown to Feishu.
pullSave a remote Markdown snapshot locally.
statusCheck local, remote, and receipt state.
diffCompare current remote content to the local publish draft.
mergeMerge remote edits into the local Markdown file.

Safety Model

  • Remote writes are opt-in through publish --write.
  • Whole-document replacement requires --strategy document-replace --confirm-destructive.
  • Block updates that may affect collaboration context require --confirm-collaboration-risk.
  • Existing untracked remote documents require --confirm-untracked-remote.
  • merge writes only local files and supports --abort.