Skip to content

Repository files navigation

Feishu Sync - Obsidian Plugin

Bidirectional synchronization between Obsidian and Feishu (Lark) documents.

Features

  • Push/Pull Sync: Push local Markdown files to Feishu or pull remote content to local
  • 3-Way Merge: Git-style block-level merge with automatic conflict detection
  • Conflict Resolution: Visual diff interface to resolve conflicts block by block
  • Recursive Folder Sync: Sync nested folders as Feishu document hierarchy
  • Wiki Import: Import Feishu Wiki pages with children to local vault
  • Auto Sync: Scheduled automatic pull from Feishu
  • File Context Menu: Right-click to push/pull files

Prerequisites

This plugin requires Feishu MCP service. You need to:

  1. Get the Feishu MCP URL (contains embedded token)
  2. Create .claude/mcp.json in your vault root:
{
  "mcpServers": {
    "feishu-mcp": {
      "type": "http",
      "url": "https://mcp.feishu.cn/mcp/xxx?token=yyy"
    }
  }
}

Installation

Via BRAT (Recommended)

  1. Install BRAT plugin
  2. Open BRAT settings → "Add Beta plugin"
  3. Enter repository URL: https://github.com/yourusername/feishu-sync-plugin
  4. Enable "Feishu Sync" in Community Plugins

Manual Installation

  1. Download main.js and manifest.json from Releases
  2. Create folder .obsidian/plugins/feishu-sync-plugin/
  3. Copy downloaded files to the folder
  4. Enable "Feishu Sync" in Obsidian Settings → Community Plugins

Usage

Commands

Command Description
📤 推送当前文件到飞书 Push current file to Feishu
📥 从飞书拉取当前文件 Pull current file from Feishu
🔄 同步所有文件 Batch push all mapped files
📋 打开映射管理器 Open mapping management panel
📊 打开监控面板 Open sync monitor panel
➕ 创建新映射 Create new file mapping
📥 从飞书 Wiki 拉取(含子文档) Import Wiki with children
📁 递归同步文件夹到飞书 Sync nested folder as document hierarchy

First Time Setup

  1. Create .claude/mcp.json with your Feishu MCP URL
  2. Open a Markdown file
  3. Run ➕ 创建新映射 to link local file with Feishu document
  4. Use push/pull commands to sync

Conflict Resolution

When both local and remote have changes:

  1. Plugin detects conflicts using 3-way merge algorithm
  2. Auto-merges non-conflicting blocks (only one side modified)
  3. Shows visual diff for conflicting blocks
  4. User chooses to keep local or remote version per block

Configuration

Plugin Settings

Setting Default Description
Enable Auto Pull true Automatically pull remote changes
Pull Interval 5 min How often to check for updates
Save Auto Push false Push on file save (per-mapping)

Data Files

File Purpose
.claude/feishu-mappings.json File-to-document mappings
.claude/feishu-base/*.md Base snapshots for 3-way merge

Development

# Clone repository
git clone https://github.com/yourusername/feishu-sync-plugin.git
cd feishu-sync-plugin

# Install dependencies
npm install

# Build
npm run build

# Dev mode (watch)
npm run dev

License

MIT License - see LICENSE file.

Contributing

Issues and pull requests are welcome!

Acknowledgments

About

Feishu Sync - Obsidian Plugin for bidirectional document synchronization

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages