dual-side-sync

Mirror a macOS working tree to a Windows repo via rsync over SSH.

1.6k|73|Updated Mar 13, 2025
One-click install
npx skills add https://github.com/UniClipboard/UniClipboard --skill dual-side-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dual-side-sync
Source: https://github.com/UniClipboard/UniClipboard/tree/main/.agents/skills/dual-side-sync
Command: npx skills add https://github.com/UniClipboard/UniClipboard --skill dual-side-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cross-platform development of UniClipboard requires the same uncommitted changes to run on both a macOS host and a Windows peer at once. Manually copying files with scp or SMB mounts loses deletions, ignores exclude rules, and risks overwriting a different commit on the Windows side.

Core Features & Use Cases

  • Working-tree mirroring: rsyncs the set of files git considers tracked plus untracked-not-ignored from the Mac to the Windows repo, and removes files deleted on the Mac via a remote rm pass.
  • Safety checks: Verifies SSH login, remote rsync availability, and that the Windows path is a valid git repo before any push; supports dry-run previews of the rsync plan.
  • Remote diagnostics and setup: Probes the Windows side for its default shell, rsync, git, winget, and scoop, and can install rsync user-scope without admin rights.
  • Use Case: A developer edits UniClipboard source on a Mac, runs the status and diff commands to confirm both repos are aligned, then pushes the working tree to the Windows machine to test cross-platform clipboard sync behavior immediately.

Quick Start

Ask the assistant to sync your current uncommitted changes to the Windows machine, and it will run the sync-to-win script's status, diff, and push commands in sequence.

Frequently Asked Questions about dual-side-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync uncommitted changes from macOS to Windows over SSH?

Use rsync over SSH to mirror the working tree, driven by git's file lists so only tracked and untracked-not-ignored files transfer. This skill's sync-to-win.sh script handles the file selection, deletions, and excludes automatically.

How to test cross-platform code on macOS and Windows simultaneously?

Keep a git checkout of the same repo on both machines at the same HEAD, then push working-tree changes from one side with rsync. This lets you build and run identical uncommitted edits on both platforms without committing.

Does rsync work on Windows for SSH file transfers?

Yes, Windows supports rsync when installed via Git for Windows, MSYS2, Cygwin, or WSL, combined with the built-in OpenSSH server. The script can also install a portable rsync build user-scope without admin rights.

Why does rsync over SSH fail with rsync not found on Windows?

The failure means rsync is not on the PATH of the SSH login user on the Windows side. Fix it by adding the directory containing rsync.exe to that user's PATH, or run the script's install-rsync command and open a new SSH session.

When should I not use working-tree mirroring instead of git push?

Use git push and pull for committed work, since mirroring only copies uncommitted file states and never moves HEAD. Mirroring is also one-way, so pulling changes from Windows back to macOS requires git.