GuideAugust 5, 20257 min read

How to Clone Your Development Environment to a New Computer

Your dev environment is more than files on disk. It is packages, configs, secrets, repos, and settings across dozens of tools. Here is how to clone all of it.

What Cloning Actually Means

When people talk about "cloning" a development environment, they usually mean copying dotfiles. But your development environment is far more than a handful of config files. It is a complex stack of interconnected layers, each depending on the others. Copy just the dotfiles and you will still spend hours installing packages, cloning repos, and hunting down credentials.

True environment cloning means replicating every layer: the system packages that provide your tools, the shell configuration that makes you fast, the editor setup that matches your workflow, the project configs and secrets that let your code run, and the git repositories you actively work in. Miss any layer and the clone is incomplete.

The 5 Layers of a Dev Environment

Every development environment consists of five distinct layers. Understanding them helps you see why traditional dotfile management only solves part of the problem:

LayerExamplesTraditional Approach
1. System Packagesgit, node, python, docker, ripgrep, jqBrewfile or manual install list
2. Shell Config.zshrc, .zprofile, aliases, PATH, promptDotfiles repo with symlinks
3. Editor / IDEVS Code settings, extensions, keybindingsSettings Sync (partial)
4. Project Configs & Secrets.env files, API keys, registry tokensPassword manager or Slack messages
5. Git RepositoriesActive project repos, their branches and stateManual clone from memory

Each layer typically requires a different tool or approach. Homebrew Bundle for packages, a dotfiles repo for shell config, VS Code Settings Sync for editor settings, a password manager for secrets, and manual effort for repos. ConfigSync handles all five layers with a single tool.

Capturing Your Environment

On your current machine — the source of the clone — ConfigSync scans and captures all five layers in one command:

Push from your current machine
$ configsync push Scanning environment... ✓ packages 47 Homebrew formulae, 12 casks ✓ shell ~/.zshrc, ~/.zprofile, ~/.zsh/ (5 files) ✓ git ~/.gitconfig, ~/.gitignore_global ✓ ssh ~/.ssh/config, 2 key pairs (encrypted) ✓ vscode settings.json, keybindings.json, 23 extensions ✓ node ~/.npmrc (encrypted), 8 global packages ✓ python pip.conf, 4 global packages ✓ env ~/projects/app/.env (encrypted) ~/projects/api/.env.local (encrypted) ~/projects/web/.env (encrypted) ✓ repos 12 git repositories tracked ✓ aws ~/.aws/config, ~/.aws/credentials (encrypted) Snapshot created: 2026-03-24T10:00:00Z (3.1 MB, encrypted) Pushed to cloud.
All sensitive data — SSH keys, .env files, AWS credentials, registry tokens — is encrypted with AES-256-GCM on your machine before it leaves. ConfigSync uses zero-knowledge encryption, meaning the server never sees your plaintext secrets.

Cloning to Your New Machine

On your new computer, the entire cloning process is three commands:

Pull to your new machine
# Install ConfigSync $ npm install -g @inventivehq/configsync # Authenticate $ configsync setup --token cs_abc123 # Clone your environment $ configsync pull --install Pulling snapshot 2026-03-24T10:00:00Z... Restoring 5 layers: ✓ Layer 1: Installing 47 formulae, 12 casks via Homebrew... ✓ Layer 2: Shell config restored (5 files) ✓ Layer 3: VS Code settings + 23 extensions installed ✓ Layer 4: 3 .env files + credentials restored (decrypted) ✓ Layer 5: Cloning 12 repositories... Environment cloned in 8m 14s.

The --install flag tells ConfigSync to not just restore config files but also install packages, extensions, and clone repositories. Without it, ConfigSync only restores configuration files, which is useful when you want to review before installing.

Preview Before Applying

If you want to see exactly what will change before applying anything, use the dry run flag:

Dry run to preview changes
$ configsync pull --dry-run Would restore from snapshot 2026-03-24T10:00:00Z: shell: + ~/.zshrc (new file) + ~/.zprofile (new file) git: ~ ~/.gitconfig (would overwrite existing) ssh: + ~/.ssh/config (new file) + ~/.ssh/id_ed25519 (new file, encrypted) + ~/.ssh/id_ed25519.pub (new file) vscode: ~ settings.json (3 changes) + 18 extensions to install packages: + 34 packages to install No changes made. Run without --dry-run to apply.

The dry run shows you every file that would be created, modified, or overwritten. The tilde (~) prefix indicates files that already exist and would be updated. This is especially useful when pulling to a machine that already has some configuration in place.

Verifying the Clone

After pulling, you can verify that your new machine matches your source machine using the diff command:

Verify with configsync diff
$ configsync diff Comparing local environment to latest snapshot... ✓ shell Matches snapshot ✓ git Matches snapshot ✓ ssh Matches snapshot ✓ vscode Matches snapshot ✓ node Matches snapshot ✓ packages Matches snapshot (47 formulae, 12 casks) ✓ env Matches snapshot (3 files) ✓ repos Matches snapshot (12 repos) All modules in sync. No differences found.

If there are differences — maybe you made a local change or a package failed to install — the diff command shows exactly what diverges. You can then decide whether to push the local changes or pull again to fix the discrepancy.

Beyond One-Time Cloning

Cloning is not a one-time event. As you work across multiple machines, your environments naturally drift apart. You install a new tool on your work laptop, add an alias on your home desktop, or update VS Code extensions on one machine but not the other.

ConfigSync keeps your machines in sync over time. Push from whichever machine you made changes on, pull on the others. The diff command tells you when machines have diverged. It is not just a clone — it is a continuous sync that keeps every machine identical.

Ongoing sync workflow
# On your work laptop (after installing new tools) $ configsync push # On your home desktop (to pick up the changes) $ configsync pull --install # Check for drift anytime $ configsync diff

Ready to try ConfigSync?

Sync your entire dev environment across machines in minutes. Free forever for up to 3 devices.