Pilaton
MacSync
Shell

CLI tool to sync dotfiles, configurations, and folders across multiple Macs using your favorite cloud storage (Dropbox, iCloud, etc.).

Last updated Jun 15, 2026
42
Stars
3
Forks
5
Issues
0
Stars/day
Attention Score
42
Language breakdown
Shell 100.0%
โ–ธ Files click to expand
README

MacSync

Easy sync for macOS. Dotfiles, folders, configs โ€” anything.

License Release macOS Homebrew Zsh


Sync files and folders across Macs using Dropbox, iCloud, Google Drive, OneDrive, Yandex.Disk, NAS, or any folder that syncs between devices.

MacSync moves files to a sync folder and creates symlinks in their place. Edit on one Mac โ€” changes appear on all others. Works with dotfiles, app configs, scripts, projects โ€” anything.

Contents

Quick Start

1. Install

brew install pilaton/tap/macsync

Manual installation

git clone https://github.com/Pilaton/MacSync.git ~/.macsync-app
ln -s ~/.macsync-app/bin/macsync /usr/local/bin/macsync

2. Configure โ€” edit ~/.macsync/config.cfg (created on first run):

# Where to store synced files (must be accessible from all your Macs)
SYNC_FOLDER=~/Dropbox/MacSync

What to sync (paths relative to ~)

BACKUP_FILES=( .zshrc .gitconfig .config/nvim .ssh/config )

3. Run

macsync

That's it. Your files are now in the sync folder, symlinked locally.

Sync Modes

flowchart TD
    A["$ macsync"] --> B{"What do we do?"}
    B --> C["Synchronize my files"]
    B --> D["Disable sync"]
    
    C --> E{"dotfiles/ folder exists?"}
    E -->|No| F["First sync"]
    E -->|Yes| G{"Choose mode"}
    
    G --> H["Replace all files"]
    G --> I["Update obsolete files"]
    G --> J["Connect only"]
    
    D --> K["Restore files locally"]

Connection options (when dotfiles/ folder exists):

| Option | What happens | When to use | | :----- | :------------ | :---------- | | Replace all files | Deletes the dotfiles/ folder, then uploads your local files fresh | Starting fresh, or when local files are the source of truth | | Update obsolete files | Uploads your local files, overwriting any existing files in sync folder | When you want to add or update files in sync folder | | Connect only | Just creates symlinks to existing files without uploading anything | When sync folder already has the correct files and you just need to link them |

Disabling Sync

Select "Disable sync" in the menu. MacSync will:

  • Copy files back from sync folder to their original locations
  • Remove symlinks
  • Files in sync folder remain unchanged

CLI Reference

macsync                              # Interactive mode
macsync --dry-run                    # Preview without changes
macsync --sync-folder ~/path         # Override sync folder
macsync --files ".zshrc,.gitconfig"  # Override file list
macsync --verbose                    # Detailed output
macsync --quiet                      # Minimal output
macsync --help                       # Show help

How It Works

~/.zshrc (symlink) โ†’ ~/Dropbox/MacSync/dotfiles/.zshrc (real file)
  • Backup โ€” original files saved to Backupdefaultconfig/<device><date>_<timestamp>/
  • Move โ€” files relocated to <SYNC_FOLDER>/dotfiles/
  • Link โ€” symlinks created at original paths
Your sync service keeps the dotfiles/ folder updated across devices.

Folder structure:

๐Ÿ“‚ SYNC_FOLDER
โ”œโ”€โ”€ ๐Ÿ“‚ Backupdefault_config
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ iMac01-12-20251733011200
โ”‚   โ”‚   โ”œโ”€โ”€ _config.cfg
โ”‚   โ”‚   โ”œโ”€โ”€ .gitconfig
โ”‚   โ”‚   โ”œโ”€โ”€ .otherconfig
โ”‚   โ”‚   โ””โ”€โ”€ .zshrc
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ MacBook04-01-20261735948800
โ”‚       โ”œโ”€โ”€ ๐Ÿ“‚ .oh-my-zsh
โ”‚       โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ custom
โ”‚       โ”œโ”€โ”€ ๐Ÿ“‚ Sites
โ”‚       โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ My-site
โ”‚       โ”œโ”€โ”€ _config.cfg
โ”‚       โ”œโ”€โ”€ .gitconfig
โ”‚       โ”œโ”€โ”€ .npmrc
โ”‚       โ””โ”€โ”€ .zshrc
โ”‚
โ””โ”€โ”€ ๐Ÿ“‚ dotfiles
    โ”œโ”€โ”€ ๐Ÿ“‚ .oh-my-zsh
    โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ custom
    โ”œโ”€โ”€ ๐Ÿ“‚ Sites
    โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ My-site
    โ”œโ”€โ”€ .gitconfig
    โ”œโ”€โ”€ .otherconfig
    โ”œโ”€โ”€ .npmrc
    โ””โ”€โ”€ .zshrc
  • Backupdefault_config/ โ€” backups of original files (created before each sync)
  • dotfiles/ โ€” synced files, symlinked on all connected Macs

Security Considerations

  • Sensitive files: Avoid syncing private keys (.ssh/idrsa, .ssh/ided25519) or files with passwords. Use .ssh/config with caution.
  • Cloud encryption: Ensure your cloud service encrypts data at rest and in transit.
  • Permissions: MacSync preserves file permissions, but verify them after syncing sensitive files.
  • Backup location: Backups are stored in your sync folder and will be synced across devices.

Troubleshooting

Sync folder not found โ€” verify path in ~/.macsync/config.cfg and ensure folder exists.

Broken symlinks โ€” run macsync --dry-run to diagnose; check that files exist in <SYNC_FOLDER>/dotfiles/.

Changes not syncing โ€” verify your sync service is running; check symlinks with ls -la ~/.zshrc.

Restore from backup โ€” find backups in Backupdefault_config/, or use "Disable sync" to restore automatically.

FAQ

Q: Can I sync files outside ~? A: No, MacSync only works with paths relative to home directory.

Q: What if I delete a file from the sync folder? A: Symlink breaks. Use "Disable sync" or restore from backup.

Q: Can I exclude files? A: Yes โ€” simply don't add them to BACKUP_FILES.

Requirements

  • macOS 10.15+ (Catalina or newer)
  • zsh (default since Catalina)
  • rsync

Changelog

See CHANGELOG.md for a list of changes.


Website ยท GitHub ยท Issues ยท Contributing ยท MIT License

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท Pilaton/MacSync ยท Updated daily from GitHub