Skip to content

Mirror is a lightweight, IDE-agnostic extension sync tool for VS Code–based editors like Cursor or Windsurf. It captures your extensions, stores them remotely, and auto-aligns any device by installing missing items and removing outdated ones. A simple, fire-and-forget way to keep your dev environments consistent.

License

Notifications You must be signed in to change notification settings

Ranteck/Mirror-extension-sync

Repository files navigation

Mirror – Universal Extension Sync for Any VS Code Fork

Mirror is an open-source extension designed to provide fire-and-forget extension synchronization across any VS Code-compatible IDE, including Cursor, Windsurf, VS Code OSS, VSCodium, and others.

Its goal is to replicate the simplicity of VS Code Settings Sync but in a completely IDE-agnostic, self-hostable, and privacy-friendly way.

Mirror keeps your development environment consistent by automatically synchronizing your installed extensions across multiple machines and editors through a single profile source—either local file mode or cloud mode (GitHub Gist or any raw URL).


Features

✔ Works on any VS Code fork

  • Cursor
  • Windsurf
  • Code OSS
  • VSCodium
  • Any editor exposing the VS Code API and CLI (--install-extension)

✔ Two Sync Modes

1. File Mode:

  • Profile stored locally as extensions.txt
  • User selects any save location (Google Drive, Dropbox, OneDrive, etc.)
  • Mirror remembers the path and listens for file changes

2. Cloud Mode:

  • Profile stored remotely at a raw URL
  • Supports GitHub Gist, S3, Supabase storage, or any HTTP endpoint
  • Ideal for "VS Code-like" fire-and-forget syncing

✔ Automatic Sync on Startup

Mirror silently syncs your environment when the IDE opens.

✔ Manual Sync Command

Run sync anytime using: Mirror: Sync Extensions

✔ Optional Pruning

If enabled, Mirror removes extensions not present in your profile.

✔ Push Support (Optional)

Push your current extension list to your cloud profile (Gist API).

✔ Flexible Storage

  • No proprietary backend
  • No login required
  • User owns and controls the data

Quick Start

Method 1: File Mode (Local Sync)

  1. Install Mirror
  2. Run command: Mirror: Export Extensions to File
  3. Choose a save location (e.g., inside Google Drive, Dropbox, or Syncthing folder)
  4. Mirror will save your extensions and configure itself automatically

On another machine:

  1. Install Mirror
  2. Open Settings (JSON)
  3. Set "mirror.filePath" to the same synced file path
  4. Restart the IDE – Mirror will auto-sync

Method 2: Cloud Mode (GitHub Gist)

  1. Install Mirror
  2. Create a GitHub Personal Access Token with gist scope
  3. Run command: Mirror: Initialize Cloud Profile
  4. Enter your token when prompted
  5. Mirror creates a private Gist and configures itself

On another machine:

  1. Install Mirror
  2. Open Settings (JSON)
  3. Copy the remoteUrl from your first machine
  4. Paste it into "mirror.remoteUrl"
  5. Set "mirror.source": "cloud"
  6. Restart the IDE – Mirror will auto-sync

Commands

Command Description
Mirror: Sync Extensions Pull profile → install/uninstall → sync environment
Mirror: Export Extensions to File Save local extensions to .txt and enable file mode
Mirror: Initialize Cloud Profile Create remote profile (Gist) and enable cloud mode
Mirror: Push Current Extensions to Cloud Overwrite remote list with current extensions

Configuration

Settings

{
  // Source type: "file" for local file, "cloud" for remote URL
  "mirror.source": "file",

  // Automatically sync when the IDE starts
  "mirror.autoSyncOnStartup": true,

  // Remove extensions not in the profile
  "mirror.pruneExtraExtensions": false,

  // FILE MODE
  "mirror.filePath": "/path/to/extensions.txt",
  "mirror.autoWatchFileChanges": true,

  // CLOUD MODE
  "mirror.remoteUrl": "https://gist.githubusercontent.com/.../extensions.txt",
  "mirror.githubToken": "ghp_...",  // Optional, for push
  "mirror.gistApiUrl": "https://api.github.com/gists/..."  // Auto-set by init
}

File Mode Settings

  • mirror.source – Set to "file"
  • mirror.filePath – Absolute path to your extensions file
  • mirror.autoWatchFileChanges – Auto-sync when file changes (default: true)

Cloud Mode Settings

  • mirror.source – Set to "cloud"
  • mirror.remoteUrl – Raw URL of your extension list
  • mirror.githubToken – GitHub token for pushing (optional)
  • mirror.gistApiUrl – API URL for updating Gist (auto-configured)

Use Cases

Scenario 1: Sync across multiple machines using Google Drive

  1. Install Mirror on Machine A
  2. Run Mirror: Export Extensions to File
  3. Save to ~/Google Drive/mirror/extensions.txt
  4. On Machine B, install Mirror
  5. Set mirror.filePath to the same Google Drive path
  6. Extensions sync automatically whenever the file changes

Scenario 2: Sync Cursor and Windsurf on the same machine

  1. In Cursor, run Mirror: Initialize Cloud Profile
  2. Copy the remoteUrl from Cursor's settings
  3. In Windsurf, install Mirror
  4. Set mirror.remoteUrl to the same URL
  5. Set mirror.source to "cloud"
  6. Both editors now share the same extension list

Scenario 3: Team extension sync

  1. Create a shared GitHub Gist or S3 bucket with your team's extension list
  2. Share the raw URL with your team
  3. Everyone sets mirror.remoteUrl to that URL
  4. The entire team stays in sync

How It Works

  1. Read local extensions – Using vscode.extensions.all
  2. Load profile – From file (local) or URL (cloud)
  3. Calculate differences – What to install/uninstall
  4. Apply changes – Using editor's CLI (--install-extension, --uninstall-extension)
  5. Notify user – Show progress and prompt to reload if needed

Privacy & Security

  • No telemetry – Mirror doesn't collect or send any data
  • No external services – Except GitHub API if you use Gist mode
  • Full control – You own your extension list
  • Open source – Fully auditable code

FAQ

Does Mirror sync settings?

No, Mirror only syncs extensions. Use your editor's built-in settings sync or a dotfiles repo for settings.

Can I use Mirror with private extension registries?

Yes, as long as the extension IDs are accessible via the editor's CLI.

What if I don't want to use GitHub Gist?

Use file mode with your preferred sync solution (Dropbox, Syncthing, etc.), or host your extension list anywhere that provides a raw URL (S3, Firebase Storage, etc.).

Will Mirror work offline?

File mode works offline if the file is locally accessible. Cloud mode requires internet access.

Can I exclude certain extensions?

Currently, Mirror syncs all extensions. You can manually edit your profile file to exclude extensions.


Contributing

Contributions are welcome! Please open issues or pull requests on GitHub.


License

MIT License – see LICENSE file.


Support

If you encounter issues or have questions:


Enjoy seamless extension sync across all your VS Code forks!

About

Mirror is a lightweight, IDE-agnostic extension sync tool for VS Code–based editors like Cursor or Windsurf. It captures your extensions, stores them remotely, and auto-aligns any device by installing missing items and removing outdated ones. A simple, fire-and-forget way to keep your dev environments consistent.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •