name: knowledge-sync version: 1.0.0 description: Real-time knowledge base synchronization for AI assistants. Supports inotifywait file monitoring, Git auto-push/pull, Nutstore sync, and multi-device consistency. Use for maintaining knowledge continuity across servers and local devices.
核心原則: Text > Brain,檔案 > 記憶,同步 > 備份
# 啟用即時同步服務
systemctl --user enable sync-realtime.service
systemctl --user start sync-realtime.service
# 每 5 分鐘 Git push
*/5 * * * * /path/to/git-auto-push.sh
# 每小時 Git pull
0 * * * * cd /path/to/workspace && git pull origin main --rebase
knowledge-sync/
├── SKILL.md # 主文件
├── README.md # 專案說明
├── scripts/
│ ├── sync-realtime.sh # 即時同步指令碼
│ ├── git-auto-push.sh # Git 自動推送
│ └── git-auto-pull.sh # Git 自動拉取
└── docs/
├── QUICKSTART.md # 快速上手
└── sync-guide.md # 同步指南
伺服器 Workspace → 堅果雲實時監聽 → 本地同步 → Gitee → Mac Obsidian
3-10 秒 即時 ≤5 分鐘 ≤5 分鐘
總延遲: 5-10 分鐘(主要等待 Git 推送週期)
# 啟動即時同步服務
systemctl --user start sync-realtime.service
# 檢視狀態
systemctl --user status sync-realtime.service
# 手動推送
./git-auto-push.sh
# 或定時執行
*/5 * * * * ./git-auto-push.sh
# Mac 端拉取
cd ~/Obsidian-MKH/我的知識/OpenClaw
git pull origin main
WATCH_DIRS=(
"/path/to/workspace/articles"
"/path/to/workspace/memory"
"/path/to/workspace/projects"
"/path/to/workspace/docs"
"/path/to/workspace/scripts"
"/path/to/workspace/learnings"
)
EXCLUDE_PATTERN="\\.(log|tmp|swp|pyc)$|node_modules|__pycache__|\\.git"
| 指標 | 正常值 | 警告值 |
|---|---|---|
| 同步延遲 | <10 秒 | >30 秒 |
| Git push 間隔 | 5 分鐘 | >10 分鐘 |
| Git pull 間隔 | 1 小時 | >2 小時 |
| 衝突次數 | 0 | >1/周 |
來源於7w4.net。
維護者: 蝦球 🦐
許可: MIT
狀態: 生產環境執行中
這個工具質量中等偏上,核心的即時同步和 Git 自動備份功能做得不錯,能幫助實現多裝置間的知識同步。但存在文件與實際內容不符的問題——有些承諾的功能實際缺失,而且某些細節處理比較粗糙。對於需要穩定多端同步的使用者來說基本可用,但建議先驗證所有功能是否正常再依賴它做重要備份。