A local-first Obsidian plugin for seamless vault synchronization with Google Drive. Direct integration, no server required, complete privacy and control.
- 🔄 Bi-directional Sync - Upload and download files between Obsidian and Google Drive
- 📁 Folder Preservation - Maintains complete directory hierarchy in Google Drive
- ⚡ Real-time Updates - Files sync immediately on creation or modification
- 🔐 OAuth 2.0 Auth - Secure Google Drive authentication directly from plugin
- 💻 Local-First - No external server required, runs entirely in Obsidian
- 🔍 Smart Sync - Intelligent change detection and conflict resolution
- 🗑️ Tombstone Management - Proper deletion tracking with grace periods
- 🔄 File Rename Detection - Handles file and folder renames efficiently
- Open Obsidian Settings → Community Plugins
- Search for "Vync"
- Click Install
- Enable the plugin
Use the installer script to automatically download and install from the latest GitHub release:
# Using npx (Node.js)
npx @techsavvyash/vync-installer /path/to/your/vault
# Using bunx (Bun)
bunx @techsavvyash/vync-installer /path/to/your/vaultExamples:
# Linux/macOS
npx @techsavvyash/vync-installer ~/Documents/MyVault
# Windows
npx @techsavvyash/vync-installer "C:\Users\YourName\Documents\MyVault"The installer will:
- Fetch the latest release from GitHub
- Download
main.js,manifest.json, andstyles.css - Install them to
.obsidian/plugins/vync/in your vault
# Clone and build
git clone <repository-url>
cd vync
bun install
# Build the plugin
cd packages/plugin
bun run build
# Copy to your vault's plugins folder
cp -r dist/* /path/to/your/vault/.obsidian/plugins/vync/- Open Vync settings in Obsidian
- Click "Authenticate with Google Drive"
- Complete OAuth flow
- Start syncing!
📖 Detailed guide: See Quick Start Guide
- Quick Start Guide - Complete setup walkthrough (10 minutes)
- OAuth Setup - Google Drive API configuration
- Sync Algorithm - Three-way merge and conflict detection
- Unit Tests - Test suite with examples
- Changelog - Version history and updates
- Plugin Source - Browse source code
- Contributing - How to contribute
Vync is a local-first plugin that runs entirely within Obsidian:
vync/packages/plugin/
├── src/
│ ├── main.ts # Plugin entry point
│ ├── services/
│ │ ├── googleDriveAuth.ts # OAuth authentication
│ │ ├── googleDriveService.ts# Google Drive API client
│ │ ├── syncService.ts # Sync orchestration
│ │ ├── syncState.ts # State management
│ │ ├── tombstoneManager.ts # Deletion tracking
│ │ ├── vaultWatcher.ts # File change detection
│ │ └── conflictUI.ts # Conflict resolution UI
│ └── types.ts # TypeScript definitions
├── tests/ # Unit tests
└── manifest.json # Plugin manifest
- Direct Integration - Plugin communicates directly with Google Drive API
- Local State - Sync state stored in
.obsidian/plugins/vync/ - OAuth Tokens - Encrypted and stored locally
- No Server - Zero external dependencies, completely private
-
Create Google Cloud Project
- Go to Google Cloud Console
- Create a new project
- Enable Google Drive API
-
Configure OAuth Credentials
- Create OAuth 2.0 Client ID (Desktop app type)
- Download credentials JSON
- Add to plugin settings
Settings → Vync:
├── Google OAuth
│ ├── Client ID: [from Google Cloud]
│ ├── Client Secret: [from Google Cloud]
│ └── Status: ✓ Connected
├── Sync Settings
│ ├── Auto Sync: ON
│ ├── Sync Interval: 5 minutes
│ └── Conflict Resolution: Prompt
└── Advanced
├── Tombstone Grace Period: 30 days
└── Debug Logging: OFF
When ready to publish:
-
Create Release Branch
git checkout -b release/v1.0.0 git push origin release/v1.0.0
-
Automatic Release - GitHub Actions will:
- Run tests
- Build plugin
- Create version tag
- Create GitHub release
- Attach
main.js,manifest.json,styles.css
-
Submit to Obsidian
- Fork obsidian-releases
- Add your plugin to
community-plugins.json - Submit PR
The installer package (@techsavvyash/vync-installer) can be published to NPM for easy installation via npx or bunx.
-
NPM Account - Create an account at npmjs.com
-
NPM Token - Generate an automation token:
- Go to npmjs.com → Account Settings → Access Tokens
- Generate New Token → Automation
- Copy the token
-
Add Token to GitHub Secrets
- Go to GitHub Repository → Settings → Secrets and variables → Actions
- Add new secret:
NPM_TOKENwith your token value
Option 1: Using GitHub Actions (Recommended)
- Go to Actions → "Publish Installer to NPM"
- Click "Run workflow"
- Enter the version number (e.g.,
0.0.2) - Click "Run workflow"
The workflow will:
- Update the version in
package.json - Build the installer
- Publish to NPM
- Commit the version bump
Option 2: Manual Publishing
# Navigate to installer package
cd packages/installer
# Login to NPM (first time only)
npm login
# Update version
npm version 0.0.2
# Build
bun run build
# Publish
npm publish --access publicUsers can install the plugin using:
npx @techsavvyash/vync-installer /path/to/vaultNote: It may take a few minutes for the package to be available on NPM after publishing.
📖 Detailed Publishing Guide: See PUBLISHING.md for complete step-by-step instructions.
- File Changed in Obsidian
- VaultWatcher Detects change event
- SyncService determines action (upload/download/conflict)
- Direct Upload/Download to/from Google Drive
- State Updated locally with revision IDs
- Folder Structure mirrored automatically
Three-Way Comparison
- Compares: Local file ↔ Last sync state ↔ Remote file
- Uses revision IDs (not timestamps) for accuracy
- Detects: unchanged, local-only, remote-only, conflicts
Tombstone Management
- Tracks deletions with grace periods (default 30 days)
- Syncs deletions across devices
- Prevents accidental data loss
Conflict Resolution
- Detects simultaneous changes on multiple devices
- Presents user with resolution options
- Preserves both versions if requested
- ✅ No External Server - Direct vault-to-Google Drive sync
- ✅ Local OAuth Tokens - Encrypted and stored in your vault
- ✅ No Data Collection - Zero telemetry or analytics
- ✅ Open Source - Fully auditable code
- ✅ Standard APIs - Uses official Google Drive API only
.obsidian/plugins/vync/
├── data.json # Plugin settings (no secrets)
├── sync-state.json # Sync index (file hashes, IDs)
├── tombstones.json # Deletion tracking
└── .oauth-tokens.json # Encrypted OAuth tokens (local only)
Note: OAuth tokens never leave your device and are encrypted at rest.
cd packages/plugin
# Run unit tests
bun test
# Run linter
bun run lint
# Build plugin
bun run build
# Watch mode
bun run devCmd/Ctrl + P → Search for:
├── "Vync: Full Sync" - Sync entire vault
├── "Vync: Sync Status" - View sync state
├── "Vync: Resolve Conflicts" - Handle conflicts
└── "Vync: Clear Cache" - Reset sync state
- File Sync - Create/edit files, verify in Drive
- Folder Sync - Create nested folders, check structure
- Renames - Rename files/folders, verify tracking
- Deletions - Delete files, check tombstones
- Conflicts - Edit same file on two devices simultaneously
OAuth Authentication Failed
- Verify Client ID and Secret are correct
- Check OAuth consent screen is configured
- Ensure "Desktop app" type is selected
- Try removing and re-adding credentials
Files Not Syncing
- Check sync status in plugin settings
- Verify Google Drive has sufficient space
- Look for conflicts in conflict resolution UI
- Check Obsidian Developer Console (Cmd/Ctrl + Shift + I) for errors
Sync Conflicts
- Use "Vync: Resolve Conflicts" command
- Choose which version to keep
- Or keep both versions with different names
Plugin Not Loading
- Check
.obsidian/plugins/vync/exists - Verify
manifest.json,main.js,styles.cssare present - Enable plugin in Settings → Community Plugins
- Check Obsidian console for error messages
📖 More help: Open an issue
- Delta sync for large files
- Selective sync (exclude patterns)
- Bandwidth optimization
- Sync statistics dashboard
- Mobile app support (iOS/Android)
- Alternative backends (Dropbox, OneDrive)
- End-to-end encryption option
- Shared vault collaboration
- Multi-device conflict resolution UI
- Advanced sync rules engine
- Plugin marketplace integration
- Automated backups and versioning
Contributions welcome! Please:
- Fork the repository
- Create feature branch
- Make changes
- Add tests
- Update documentation
- Submit PR
MIT License - see LICENSE file
Built with:
- Bun - Fast JavaScript runtime
- Elysia - Web framework
- Google Drive API - Storage
- Obsidian API - Plugin platform
- Documentation: See Documentation section
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Questions: GitHub Discussions Q&A
If this project helps you, consider giving it a star!
Status: Beta Testing 🚧
