Jens Eldering49 downloadsSync Obsidian folders to external directories. Supports multiple folder pairs.
A plugin that syncs vault folders to external directories, one-way or two-way per folder pair.
Clone or copy this project anywhere (it does not need to live inside your vault):
git clone <repo> local-folder-sync
Install dependencies and build:
cd local-folder-sync
npm install
npm run build
This produces a single bundled dist/main.js, plus dist/manifest.json and dist/styles.css.
(Obsidian's plugin loader requires one bundled file — it can't require() between separate
plugin files — so npm run dev/npm run build always emit one bundle, not the raw TypeScript output.)
Copy dist/'s contents into your vault's plugin folder:
mkdir -p "<vault>/.obsidian/plugins/local-folder-sync"
cp dist/main.js dist/manifest.json dist/styles.css "<vault>/.obsidian/plugins/local-folder-sync/"
Enable the plugin in Obsidian under Settings > Community plugins, then fully restart Obsidian if you're updating an already-loaded plugin (module load failures can be cached for the running session).
Same as above: build, then copy dist/main.js, dist/manifest.json, and dist/styles.css
into <vault>/.obsidian/plugins/local-folder-sync/.
Open the plugin settings to:
Interval (sync every N minutes) or On Change (sync as soon as a file changes)Interval triggerNotes/Project)/Users/Jens/Documents/Backup)One-way (source → destination, deletes extra destination files) or
Newer file wins (two-way, never deletes)Folder Sync: Sync all folders nowlocal-folder-sync/
├── src/
│ ├── main.ts # Main plugin class, auto-sync, watchers, status bar
│ ├── settings.ts # Settings UI
│ ├── sync.ts # Sync logic (one-way and newer-wins)
│ ├── types.ts # TypeScript types
│ ├── manifest.json # Plugin metadata
│ └── styles.css # Custom styles
├── esbuild.config.mjs # Bundles src/ into a single dist/main.js
├── package.json # Node dependencies
└── tsconfig.json # TypeScript config (type-checking only)
# Development mode (watches for changes)
npm run dev
# Production build
npm run build
MIT