win-sync
v1.0.0
Published
CLI tool to backup and restore Windows development environment (Winget, NPM, PIP)
Maintainers
Readme
⚡ win-sync
Backup and restore your entire Windows development environment in one command — never lose your setup again.
📖 Introduction
Switching Windows machines means reinstalling everything from memory — and forgetting half of it. win-sync scans your machine for everything you have installed, flags the apps that can't be restored automatically, and saves it all to a JSON snapshot you can restore with a single command.
✨ Features
- 🚀 Instant full scan — detects Winget packages, NPM global packages, PIP packages, and registry-installed apps in seconds.
- 🎨 Beautiful interactive tables — color-coded terminal tables with live spinners and a clean, modern UI (courtesy of
chalk,ora, andcli-table3). - ⚠️ Smart manual-app detection — apps installed outside Winget are flagged as "Manual" so you know exactly what you'll need to re-download by hand.
- 📦 JSON & Markdown export — save a machine-readable backup for 1-click restores, or a human-readable document for sharing and documentation.
- 🔄 One-command restore — reinstall everything automatically via
winget import,npm i -g, andpip install. - 🎯 Works with what you already have — NPM, PIP, Winget, and PowerShell are all standard on a modern Windows dev box.
📦 Installation
Install globally via npm:
npm install -g win-syncOr run from source during development:
git clone https://github.com/barigalasunil/win-sync.git
cd win-sync
npm install
npm linkAfter that, the win-sync command is available anywhere on your machine.
🚀 Usage & Commands
Backup
Just run win-sync — the scan starts automatically (this is the same as win-sync backup):
win-sync
# or
win-sync backupThis detects:
- Winget packages (Windows Package Manager)
- NPM global packages
- PIP packages (Python)
- Manual apps — installed outside Winget (found via Windows Registry)
When the scan finishes, choose what to do with your setup:
| Option | Action |
|--------|--------|
| (B) Backup (JSON) | Save everything, including manual apps, to win-sync-setup.json |
| (M) Save as Markdown only | Generate a human-readable win-sync-setup.md |
| (A) Save as Both (JSON + Markdown) | Write both files |
| (S) Save Auto-Restorable Only | JSON backup without manual apps |
| (D) Discard and exit | Save nothing |
Note: Apps not available in Winget are listed under
manual_appsand must be downloaded manually after restore.
How the backup files look
win-sync-setup.json captures everything needed for a full restore:
{
"winget": ["Microsoft.VisualStudioCode", "Git.Git"],
"npm": ["typescript", "eslint"],
"pip": [{ "name": "requests", "version": "2.31.0" }],
"manual_apps": [
{ "name": "SomeApp", "version": "1.0.0", "publisher": "SomePublisher" }
],
"exportedAt": "2026-09-23T10:30:00.000Z"
}The Markdown export (win-sync-setup.md) is a polished, human-readable snapshot with a summary table and per-category sections for Winget, NPM, PIP, and manual apps — perfect for committing to your repo or sharing in docs.
Restore
Installs all packages from the backup JSON:
win-sync restore- Winget packages are reinstalled in bulk via
winget import - NPM and PIP packages are installed individually with a progress bar
- Manual apps are listed again so you remember to download them
🖥️ Output Example
Here's what running win-sync looks like:
_ _ _ _____ _ _
| | | | | | / ___(_) |
| | | | ___ ___| | \ `--. _| |_
| |/\| |/ _ \/ __| | `--. \ | __|
\ /\ / __/\__ \_| /\__/ / | |_
\/ \/ \___||___(_) \____/|_|\__|
Windows Development Environment Backup & Restore
✔ Scanning Winget packages...
✔ Scanning NPM global packages...
✔ Scanning PIP packages...
✔ Checking for manual apps...
Scan complete — here's what was found:
┌──────────────────┬───────┬──────────────────────────────┐
│ Category │ Count │ Status │
├──────────────────┼───────┼──────────────────────────────┤
│ Winget Apps │ 48 │ ✅ Ready to backup │
│ NPM Globals │ 15 │ ✅ Ready to backup │
│ PIP Packages │ 71 │ ✅ Ready to backup │
│ Manual Apps │ 4 │ ⚠️ Needs re-download │
└──────────────────┴───────┴──────────────────────────────┘
Manual apps — must be downloaded after restore:
┌──────────────────────────────────────────┬────────────┬────────────────────────────┐
│ App │ Version │ Publisher │
├──────────────────────────────────────────┼────────────┼────────────────────────────┤
│ Some Proprietary Tool │ 2.3.1 │ SomeCompany │
│ Another GUI App │ 1.0.0 │ AnotherPublisher │
└──────────────────────────────────────────┴────────────┴────────────────────────────┘
? What would you like to do with this setup?
(B) Backup (JSON)
(M) Save as Markdown only
(A) Save as Both (JSON + Markdown)
(S) Save Auto-Restorable Only (exclude manual apps)
(D) Discard and exitDuring win-sync restore, a real-time progress bar tracks each package as it's installed:
installing ████████████████████░░░░░░░░░░░░ 58% | 170/292 | [email protected]📁 Project Structure
win-sync/
├── index.js # CLI entry point & command registration
├── package.json # dependencies, metadata & bin config
├── src/
│ ├── backup.js # backup scan + B/M/A/S/D save flow
│ ├── banner.js # ASCII art banner + terminal maximize
│ ├── markdown-generator.js # human-readable .md export builder
│ ├── restore.js # restore flow (winget/npm/pip + progress)
│ ├── ui.js # tables, spinners & interactive prompts
│ └── utils.js # shared command runner helpers
└── test/
├── backup.test.js
├── banner.test.js
├── markdown-generator.test.js
└── ui.test.js🤝 Contributing
Contributions, issues, and feature requests are all welcome! Here's how to get started:
Fork the repo and create your feature branch:
git checkout -b feat/amazing-featureMake your changes, keeping code style consistent (CommonJS, existing utilities/patterns).
Add tests for your changes and make sure the suite passes:
npm testCommit with a clear message, push to your fork, and open a Pull Request.
Please make sure your PR is focused, well-documented, and passes all existing tests.
📄 License
Distributed under the MIT License. See LICENSE for more information.
Made for Windows developers who hate reinstalling everything twice. ⚡
