Effortlessly sync your Cursor IDE settings across multiple macOS machines with real-time monitoring, smart debouncing, and intelligent file comparison.
Keep your Cursor IDE configuration, keybindings, snippets, and all User settings perfectly synchronized across all your development machines automatically.
Cursor Sync automatically keeps your Cursor IDE settings synchronized across multiple machines by:
- π Watching your Cursor User configuration files in real-time with smart debouncing
- π Syncing changes to your private Git repository instantly
- π₯ Pulling updates from other machines automatically
- π§ Resolving conflicts intelligently based on content hashes
- π Protecting your sensitive data with private-only repositories
- ποΈ Handling file deletions in both directions automatically
Perfect for developers who work on multiple machines and want consistent Cursor IDE experience everywhere.
- β‘ Dual Architecture: Real-time fsnotify (primary) + periodic intervals (fallback)
- π§ Smart Debouncing: Configurable 10s+ debounce prevents sync storms
- π€ Automatic Everything: Set once, sync everywhere automatically
- π Hash-Based Comparison: SHA256 content hashing prevents unnecessary syncs
- π Auto Repository Creation: Automatically creates private repositories if they don't exist
- π Rsync-like Sync: Only copies changed files to prevent unnecessary IDE reactions
- ποΈ Deletion Sync: Automatically syncs file deletions in both directions
- π‘οΈ Private Repository Only: Automatically blocks public repos
- π GitHub Token Auth: Secure token-based authentication
- π Privacy Validation: Real-time repository privacy checking
- π Cursor Detection: Validates Cursor installation before setup
- π Auto-Created Repos: All automatically created repositories are private by default
- π One-Command Setup:
cursor-sync bootstrapdoes everything - π Interactive Wizards: Guided setup with smart defaults
- π± Rich CLI: Intuitive commands with helpful output
- π Comprehensive Logging: Detailed logs with daily rotation
- β
Settings (
settings.json) - All your preferences - β
Keybindings (
keybindings.json) - Custom shortcuts - β
Snippets (
snippets/) - Code templates - β
Tasks & Launch (
tasks.json,launch.json) - Debug configs - β
Extensions (
extensions.json) - Your installed extensions - β Workspace Settings - Project-specific configurations
- β All User Files - Everything in the User folder except excluded paths
Note: Only the /User folder is synced. Other Cursor folders are excluded to prevent conflicts and infinite loops.
- macOS (currently supported platform)
- Cursor IDE installed and launched at least once
- Git installed on your system
- GitHub account with a private repository
- GitHub Personal Access Token (the setup wizard helps create this)
cursor-sync checkJust run this one command and follow the prompts:
cursor-sync bootstrapThat's it! The bootstrap wizard will:
- π Validate your Cursor IDE installation
- π Help you set up your GitHub Personal Access Token
- π¦ Configure your private repository (
cursor-sync-bucket) - βοΈ Create all necessary configuration files
- π§ Install the background daemon
- π Start the sync service
- β Verify everything is working
No multiple commands, no confusion - just one command that does everything!
If you prefer manual control:
git clone <this-repository-url>
cd cursor-sync
go build -o bin/cursor-sync .- Just provide any repository URL in the setup - cursor-sync will create it automatically as private
- No manual repository creation needed!
- Go to GitHub β Create new private repository
- Name it:
cursor-sync-bucket(recommended) β οΈ Must be private to protect your settings
- Go to GitHub Settings
- Generate new token (classic) with
reposcope - Copy the token (starts with
ghp_)
./bin/cursor-sync setup
# Follow the prompts to configure token and repository./bin/cursor-sync install
./bin/cursor-sync start# Check everything is working
cursor-sync status
# Manual sync (if needed)
cursor-sync sync
# View logs
cursor-sync logs
# Pause/resume syncing
cursor-sync pause
cursor-sync resume# Validate configuration
cursor-sync validate
# Check Cursor installation
cursor-sync check
# Control daemon
cursor-sync start
cursor-sync stop
cursor-sync restartCursor-sync can automatically create your settings repository if it doesn't exist:
# Just provide any repository URL - it will be created automatically!
cursor-sync setup
# Enter: https://github.com/yourusername/cursor-settings.git
# β
Repository created automatically as private- π Detection: Cursor-sync detects when a repository doesn't exist
- π Creation: Uses GitHub API to create the repository as private
- β³ Retry Logic: Implements smart retry with exponential backoff (max 10s)
- π Security: Always creates private repositories to protect your data
- π Always Private: No risk of accidentally creating public repositories
- π§ Smart Retries: Handles GitHub API delays with exponential backoff
- π Auto-Initialization: Creates README and proper repository structure
- π’ Organization Support: Works with user and organization repositories
- GitHub Personal Access Token with
reposcope - For organization repos:
org:writescope - Valid repository URL format
Cursor-sync uses SHA256 content hashing to only sync files that have actually changed:
# Only changed files are copied - no unnecessary IDE reactions!
cursor-sync sync
# Output: π Repository sync completed: 2 files copied, 15 files skipped- Content Hashing: SHA256 hashes of file contents are compared
- Hash Caching: Calculated hashes are cached for performance
- Throttled Calculation: Hash calculations are throttled to prevent CPU stress
- Polling Mechanism: Waits for hash calculations to complete with timeout
- Smart Skipping: Identical files are skipped entirely
- β Faster Sync: Only changed files are processed
- β Less Disruption: Minimal IDE reactions and reloads
- β Better Performance: Reduced I/O operations and CPU usage
- β Accurate: Content-based change detection eliminates false positives
- β Throttled: Prevents CPU stress during bulk operations
Cursor-sync automatically handles file deletions in both directions:
# Local deletion β Remote deletion
rm ~/Library/Application\ Support/Cursor/User/some-file.json
# β
File automatically removed from repository
# Remote deletion β Local deletion
git rm repository/User/some-file.json && git push
# β
File automatically removed from local Cursor settings- Real-time Detection: File watcher detects local file deletions
- Periodic Detection: Remote deletions detected during periodic syncs
- Automatic Cleanup: Deleted files are removed from target locations
- Logging: All deletion operations are logged with file counts
- β Real-time Local Deletions: Immediate sync of local file deletions
- β Periodic Remote Deletions: Remote deletions synced during periodic intervals
- β Safe Operations: Only synced files are considered for deletion
- β Detailed Logging: Clear logs show deletion operations
The bootstrap command creates optimal defaults. Your config lives at:
~/.cursor-sync/config.yamlsync:
pull_interval: "5m" # How often to check for remote changes
push_interval: "5m" # How often to push local changes
debounce_time: "10s" # Minimum 10s debounce for real-time sync
watch_enabled: true # Enable real-time file watching
conflict_resolve: "newer" # newer|local|remote
hash_throttle_delay: "100ms" # Delay between hash calculations
hash_polling_timeout: "10s" # Max time to wait for hash calculation
cursor:
config_path: "~/Library/Application Support/Cursor"
exclude_paths:
- "User/globalStorage/" # Cursor's internal data (causes infinite loops)
- "logs/"
- "CachedExtensions/"
- "**/node_modules/"
# ... performance-optimized exclusions- π Startup Sync: Always syncs on daemon start/restart
- β‘ Real-time Sync: Detects changes within 10+ seconds (configurable)
- π Periodic Backup: Regular intervals ensure nothing is missed
- π Fresh Install Logic: Overwrites local settings if never synced before
- π§ Smart Conflicts: Prefers newer commits automatically
- ποΈ Deletion Sync: Handles file deletions in both directions
- Purpose: Indicates if local settings have been synced before
- Location:
~/Library/Application Support/Cursor/.custom.sync - Behavior: Missing marker = fresh install (overwrite local files)
- π‘οΈ Private Repository Enforcement: Blocks public repositories automatically
- π Token-based Auth: No passwords or SSH keys needed
- π Real-time Privacy Checks: Validates repository privacy before every sync
- π Local Validation: Ensures Cursor is installed and accessible
- Scope: Only the
/Userfolder within Cursor settings is synced - Rationale: Prevents conflicts with Cursor's internal data and other folders
- Exclusions:
globalStorageand other system folders are excluded - Benefits: Clean, focused sync without infinite loops or conflicts
cursor-sync status # Check daemon status
cursor-sync logs # View detailed logs
cursor-sync validate # Verify configurationcursor-sync token show # Check token status
# Ensure token has 'repo' scopecursor-sync check # Verify Cursor installation
ls ~/Library/Application\ Support/Cursor/.custom.sync # Check sync marker# Check if globalStorage is excluded
cat ~/.cursor-sync/config.yaml | grep globalStorage
# Restart daemon if needed
cursor-sync restartcursor-sync stop
rm -rf ~/.cursor-sync
cursor-sync bootstrap # Start fresh- Tool:
cursor-sync(this repository) - Storage:
cursor-sync-bucket(your settings repository)
Clear separation makes organization simple!
Prevents excessive syncs during rapid changes:
- Minimum: 10 seconds (enforced)
- Default: 10 seconds (good for most users)
- Configurable: Up to minutes for heavy development
Prevents CPU stress during bulk operations:
- Throttle Delay: 100ms between hash calculations (configurable)
- Polling Timeout: 10s maximum wait for hash completion
- Caching: Hash results are cached for performance
cursor-sync logs # Today's activity
cursor-sync logs --tail # Real-time monitoring
cursor-sync logs --date 2024-01-15 # Specific dateRun cursor-sync bootstrap on each machine with the same GitHub token and repository. Settings sync automatically!
- π Check Status:
cursor-sync status - π View Logs:
cursor-sync logs --tail - β
Validate Setup:
cursor-sync validate - π Debug Mode:
cursor-sync --verbose <command>
After running cursor-sync bootstrap:
- β Make changes in Cursor β They sync within 10 seconds
- ποΈ Delete files β Deletions sync automatically
- π₯οΈ Work on another machine β Run bootstrap there too
- π Monitor activity β
cursor-sync statusandcursor-sync logs - βΈοΈ Pause when needed β
cursor-sync pauseduring major changes
Your Cursor IDE settings are now protected and synchronized across all your machines! π
cursor-sync stores its configuration in several locations. Here's where everything is located:
~/.cursor-sync/config.yaml # Main configuration file
~/.cursor-sync/.github # GitHub Personal Access Token (secure)./config/sync.example.yaml # Template configuration file
./bin/cursor-sync # Built binary (ignored by git)
./logs/ # Application logs (ignored by git)
βββ 2024-01-15/ # Daily log folders
β βββ cursor-sync.log # Main application logs
β βββ cursor-sync.error.log # Error logs only~/Library/LaunchAgents/com.cursor-sync.plist # macOS daemon configuration<your-repo>/User/ # Your cursor-sync-bucket repository (User folder only)
βββ settings.json # Cursor IDE settings
βββ keybindings.json # Keyboard shortcuts
βββ snippets/ # Code snippets
βββ tasks.json # VS Code tasks
βββ launch.json # Debug configurations
βββ extensions.json # Extension recommendations# Show all configuration details
cursor-sync validate
# Show only config file validation
cursor-sync config-validate
# Check GitHub token status
cursor-sync token show# Edit main configuration file
nano ~/.cursor-sync/config.yaml
# View example configuration
cat ./config/sync.example.yaml# Update GitHub token
cursor-sync token <new-token>
# Restart daemon to apply changes
cursor-sync stop
cursor-sync start# Tail live logs
cursor-sync logs tail
# View recent logs
cursor-sync logs view
# Open logs directory
cursor-sync logs openTo completely remove cursor-sync from your system:
# 1. Stop the daemon
cursor-sync stop
# 2. Remove system integration
rm ~/Library/LaunchAgents/com.cursor-sync.plist
# 3. Remove configuration directory
rm -rf ~/.cursor-sync
# 4. Remove project directory (optional)
cd .. && rm -rf cursor-sync
# 5. Your sync repository remains untouched (your data is safe)Note: Your cursor-sync-bucket repository and Cursor settings are NOT deleted during uninstall - they remain safe in your GitHub repository.
The main configuration file (~/.cursor-sync/config.yaml) contains:
repository:
url: "https://github.com/username/cursor-sync-bucket.git"
branch: "main"
local_path: "~/.cursor-sync/settings"
cursor:
config_path: "~/Library/Application Support/Cursor"
exclude_paths:
- "User/globalStorage/" # Cursor's internal data
- "logs/"
- "CachedExtensions/"
- "**/node_modules/"
# ... other exclusions
sync:
pull_interval: "5m" # How often to pull from remote
push_interval: "5m" # How often to push local changes
debounce_time: "10s" # Minimum time between real-time syncs
watch_enabled: true # Enable real-time file watching
conflict_resolve: "newer" # Conflict resolution strategy
hash_throttle_delay: "100ms" # Delay between hash calculations
hash_polling_timeout: "10s" # Max time to wait for hash calculation
logging:
level: "info" # Log level: debug, info, warn, error
log_dir: "~/.cursor-sync/logs" # Log directory
max_size: 10 # Max size per log file (MB)
max_days: 30 # Days to keep logs
compress: true # Compress old logs# Make sure you built the binary
go build -o bin/cursor-sync .
# Or use full path
./bin/cursor-sync --help- Make sure Cursor IDE is installed and has been run at least once
- Check that settings directory exists:
~/Library/Application Support/Cursor/User/
- Your sync repository MUST be private for security
- Go to repository Settings β Change visibility β Make private
# Set a new token
cursor-sync token your-new-token
# Check token status
cursor-sync token show# Check daemon status
cursor-sync status
# Restart daemon
cursor-sync stop
cursor-sync start- cursor-sync automatically resolves conflicts by timestamp (newer wins)
- Check logs for details:
cursor-sync logs tail
# Check if globalStorage is excluded
cat ~/.cursor-sync/config.yaml | grep globalStorage
# Restart daemon
cursor-sync restart# Validate configuration
cursor-sync validate
# Reset to defaults (backup your settings first!)
rm ~/.cursor-sync/config.yaml
cursor-sync setup # ReconfigureMIT License - see LICENSE file for details.
Built with β€οΈ for developers who value consistency and automation.