Summary
Async sync of wiki pages to an online git store (e.g. GitHub Wiki repo) so a single wiki can span multiple machines.
Why it works
- Pages are plain
.md files — git is the natural sync transport
- The SQLite index (
.mind-map.db) is disposable — rebuilt by Reindex() from the filesystem
- Per-page MCP boundaries mean conflicts are rare: each mutation targets a single path
Proposed approach
- New
internal/sync/ package with GitSync struct
- Track dirty pages after each MCP write via an
onChange callback on the wiki engine
- Background goroutine:
git pull → check conflicts → reindex → git push on an interval
- Conflict resolution: keep both versions (
page.CONFLICT.md), log a warning
- CLI flags:
--sync-remote <url>, --sync-interval <duration>
Design doc
See the wiki page: projects/mind-map-sync
Summary
Async sync of wiki pages to an online git store (e.g. GitHub Wiki repo) so a single wiki can span multiple machines.
Why it works
.mdfiles — git is the natural sync transport.mind-map.db) is disposable — rebuilt byReindex()from the filesystemProposed approach
internal/sync/package withGitSyncstructonChangecallback on the wiki enginegit pull → check conflicts → reindex → git pushon an intervalpage.CONFLICT.md), log a warning--sync-remote <url>,--sync-interval <duration>Design doc
See the wiki page:
projects/mind-map-sync