One Source. Multiple Replicas. Zero Hassle.
Continuously synchronize a single source directory with multiple target directories in real time.
SOURCE (Authoritative)
β
βββββββββββββββΌββββββββββββββ
β β β
βΌ βΌ βΌ
Replica 1 Replica 2 Replica 3
# Download standalone dev-sync.exe
Invoke-WebRequest -Uri "https://github.com/devsync/dev-sync/releases/latest/download/dev-sync.exe" -OutFile "$HOME\dev-sync.exe"
# (Optional) Add to PATH so you can use it in any folder:
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$HOME", "User")# Option A: One-line install (auto-detects x64 / ARM64):
curl -fsSL https://raw.githubusercontent.com/devsync/dev-sync/main/scripts/install.sh | bash
# Option B: Self-extracting .run package from GitHub Releases:
chmod +x dev-sync-linux-*.run && sudo ./dev-sync-linux-*.runcurl -sSL https://github.com/devsync/dev-sync/releases/latest/download/dev-sync-darwin-arm64 -o dev-sync
sudo install -m 755 dev-sync /usr/local/bin/dev-syncNavigate into your source code directory and initialize:
cd /path/to/my-project
dev-sync init- Source: Press Enter (defaults to current folder
.) - Add replica: Type
y, then paste your replica destination path (e.g.C:\Servers\test-envor/opt/staging) - Done! Sensible ignore rules (
.git/,node_modules/, logs, and temp files) are configured automatically.
dev-sync watchThat's it! Whenever you edit or delete files in your source directory, Dev-Sync immediately mirrors them to all your replicas.
(Need a one-time sync instead? Just run dev-sync sync)
Dev-Sync has been hands-on verified and tested across physical and virtual production targets:
| Command | Action |
|---|---|
dev-sync watch |
Continuously mirrors source changes to replicas in real time |
dev-sync sync |
Performs a one-time synchronization pass |
dev-sync sync --dry-run |
Previews planned changes without touching any files on disk |
dev-sync status |
Checks if replicas are in sync, missing files, or drifted |
dev-sync add |
Adds an additional replica folder to an existing project |
dev-sync remove |
Removes a replica from sync config (never touches your files) |
dev-sync list |
Displays all configured source and replica destinations |
dev-sync verify |
Deep cryptographic SHA-256 verification across all files |
dev-sync doctor |
Runs health diagnostics on permissions, paths, and watchers |
dev-sync config |
Prints current configuration settings |
Dev-Sync is built for developer workflows where code must physically exist in multiple places:
- Game / Server Development (FiveM, Minecraft servers, game engines requiring scripts placed directly in runtime directories)
- Multi-Environment Testing (Simultaneously testing local, staging, and container mounts)
- Local Deployment Clusters (Multiple microservice instances without slow build/copy loops)
The source directory is always authoritative. Changes in replicas are classified as drift and are never copied back into your source code.
Files are never partially written or locked. Dev-Sync streams to temporary staging files (.devsync-tmp.*), flushes storage buffers to disk (fsync), verifies integrity, and executes an atomic replace.
Target paths are validated to stay strictly inside replica boundaries (SafeResolvePath). Dangerous directory traversals (../), overlapping source/replica loops, and system roots (/, C:\, C:\Windows) are actively blocked.
Modern code editors (VS Code, JetBrains, Vim) generate multiple rapid events per save (temp write β rename β modify). Dev-Sync debounces events (default 150ms) into a single logical update.
If a replica is modified externally or extra files are added:
dev-sync statusmy-replica
β OUT OF SYNC
Modified: src/main.js
Extra: debug.log
To restore the replica from authoritative source:
# Manual repair:
dev-sync sync --replica my-replica
# Or auto-repair on the fly during watch mode:
dev-sync watch --auto-repairdev-sync doctor: Pre-flight diagnostic tool checking disk access, write permissions, watcher availability, and configuration integrity.dev-sync verify: Performs deep byte-by-byte SHA-256 hashing across source and replicas to ensure exact parity.
{
"version": 1,
"source": "/path/to/source",
"replicas": [
{
"id": "staging-env",
"path": "/path/to/replica",
"enabled": true
}
],
"sync": {
"deleteExtraneous": true,
"verifyAfterSync": true,
"atomicWrites": true,
"preserveTimestamps": true,
"preservePermissions": true
},
"drift": {
"autoRepair": false,
"detectOnWatch": true
},
"watch": {
"debounceMs": 150,
"source": true,
"replicas": false
},
"filesystem": {
"symlinkMode": "skip",
"bufferSizeKB": 64
},
"discord": {
"enabled": false,
"webhookUrl": ""
}
}Send sync alerts and drift notifications to a Discord channel:
- In
.devsync/config.json, set"discord": { "enabled": true }. - Provide your webhook URL via config or environment variable:
export DEVSYNC_DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."
(Webhook URLs are always masked in logs as https://discord.com/api/webhooks/.../******** to protect credentials).
Requires Go 1.22+:
git clone https://github.com/devsync/dev-sync.git
cd dev-sync
go build -o dev-sync ./cmd/dev-syncReleased under the MIT License.