Obsidian Sync icon

Can I vibecode Obsidian Sync?

price $5/moyou'd save $60/yrbuild time one sittingcategory notes-knowledgereplaced by 3 people
YES
MOATexecution polish

If you already accept local Markdown files, syncing folders across devices is a solved problem; the hard part is not the app, it is conflict-free convenience.

In-List Ad$79/30 days
promote your product in the vibecoded list

The Build Prompt

copy it and go build
ready to paste · 2,590 chars
Build me a robust, local-first sync setup for my Obsidian vault to replace the paid Obsidian Sync service. 

Requirements & Context:
- The fundamental premise is that the vault is just a folder of Markdown files. Rather than building a dedicated app or using a black-box syncing engine, we will use Git as the plumbing. While Syncthing is an option, I specifically want Git because I want a verifiable, revertable history of all my notes.
- Your task is to write a bulletproof sync watcher and provide the exact setup steps.

Core Mechanism:
- Create a lightweight background watcher (you may use a Node script with `chokidar` and `simple-git`, or a robust bash script triggered by a `systemd`/`launchd` timer—pick whichever is simpler and more reliable).
- The watcher must monitor the vault directory. When a change is detected, it should debounce for 30 seconds (to group rapid typing or bulk edits).
- After the debounce period, it must automatically commit the changes with an auto-generated timestamped message and push to a private GitHub/GitLab repository.
- On startup, and subsequently every 5 minutes, the watcher must pull remote changes using a rebase strategy.

Conflict Resolution (Critical):
- Under no circumstances should data be lost. If a git conflict occurs during the pull/rebase, do not fail silently or overwrite files.
- The script must detect the conflict, abort the rebase/merge, save the incoming remote version as `<filename>.conflict-YYYY-MM-DD.md`, keep the local version intact, and log a loud warning to a local log file. 

Configuration & Scaffolding:
- Provide a strict `.gitignore` tailored for Obsidian. It must exclude `.obsidian/workspace*`, `.obsidian/plugins/*/data.json` (if highly device-specific), and `.trash` so that device-local UI states do not ping-pong endlessly between machines.
- Include a CLI command `vaultsync status` that outputs the last successful push/pull time and lists any outstanding `.conflict` files that require manual resolution.

Documentation & Mobile:
- For mobile sync, do not write an app. Instead, explicitly document in the README how to point a Git client (like Working Copy on iOS or MGit on Android) at the same repository to achieve mobile sync.
- The repository must remain private. Ensure tokens are kept in `.env` or rely on the system git credential helper. No telemetry, no accounts other than Git.
- Out of scope: Encrypted vaults or a custom version-history UI (git log is sufficient).
- Provide a comprehensive README outlining the second-machine setup steps and explaining the conflict-file convention.
In-List Ad$79/30 days
promote your product in the vibecoded list

What you lose

  • Hosted infrastructure and managed operations from Obsidian Sync
  • The original service's mature integrations and ecosystem
In-List Ad$79/30 days
promote your product in the vibecoded list
Share on X ->Your vote helps rank the vibecoded list.

Questions

5 answers