-
-
Save denniswon/584283a34ef44f493d297c153bede47e to your computer and use it in GitHub Desktop.
| MacBook migration is a surprisingly deep problem — it's not just copying files. You have layered state: dotfiles, package managers, | |
| language runtimes, auth tokens (which can't just be copied), MCP server configs, IDE state, and agent memories scattered across | |
| ~/.claude/, ~/.config/, keychains, and more. Getting this right upfront saves days of "why doesn't X work on my new machine." | |
| ★ Insight ───────────────────────────────────── | |
| Your environment is substantial — 176 Homebrew formulae, 74 casks, 5 language version managers, blockchain toolchains (Foundry, SP1, | |
| RISC0), Claude Code with 9 plugins, 6 MCP servers, and API keys hardcoded in .zshrc. The biggest risk areas are: (1) secrets | |
| management (API keys in plaintext), (2) auth tokens that can't be copied (need re-auth), and (3) the order of installation (version | |
| managers before languages before tools). | |
| ───────────────────────────────────────────────── | |
| Great — I've done a thorough audit of your current machine. Here's what I found at a high level: | |
| Current Environment Summary | |
| ┌─────────────────┬──────────────────────────────────────────────────────────────────────────────────────┐ | |
| │ Category │ What's There │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Shell │ Zsh + Zprezto (wikimatze theme), 5 config files, extensive aliases │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Terminal │ WezTerm with custom Lua config │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Git │ 65+ custom aliases, delta pager, LFS, interactive rebase tool │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Package Manager │ Homebrew: 176 formulae + 74 casks (no Brewfile exists yet) │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Languages │ fnm (Node), pyenv (Python), rbenv (Ruby), rustup (Rust + ZK toolchains), Go (system) │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Blockchain/ZK │ Foundry, SP1, RISC0, Wasmer, Circom │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Claude Code │ 9 plugins (OMC, superpowers, supermemory, etc.), 6 MCP servers, custom HUD │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ IDEs │ Cursor (primary), Windsurf, VS Code Insiders │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Cloud │ gcloud SDK, Azure CLI, GitHub CLI, Granted (AWS) │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Keys/Auth │ SSH (ed25519 + GCP + PEM keys), 1Password integration │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Secrets │ ~12 API keys hardcoded in .zshrc │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Dotfile mgmt │ stow installed but not configured; no active dotfile repo │ | |
| ├─────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ Projects │ ~15 repos in ~/projects/, plus ~/magic/ │ | |
| └─────────────────┴──────────────────────────────────────────────────────────────────────────────────────┘ |
Here's the condensed step-by-step for migration day:
Phase 2: Migration Assistant
- Unbox, power on, select "Transfer from another Mac" during setup
- Connect via Thunderbolt cable (fastest) or Wi-Fi
- Transfer everything — wait 1-3 hours
- Verify: 1Password, Raycast, Karabiner, Cursor, Docker Desktop all launch
- Back up and remove old Homebrew: sudo mv /opt/homebrew /opt/homebrew.bak
Phase 3: Dev Environment (run in Terminal)
Foundation:
6. xcode-select --install
7. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
8. eval "$(/opt/homebrew/bin/brew shellenv)"
SSH + Secrets (before cloning repo):
9. Download .ssh/ and .zsh_secrets from Google Drive
10. Place them: mkdir -p ~/.ssh && cp -r ~/Downloads/.ssh/* ~/.ssh/ && mv ~/Downloads/.zsh_secrets ~/
11. Fix permissions: chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_ed25519 ~/.ssh/google_compute_engine ~/.ssh/.pem && chmod 644
~/.ssh/.pub
12. Test: ssh -T git@github.com
Dotfiles + Packages:
13. git clone git@github.com:denniswon/mbp-migrate.git /.dotfiles/.dotfiles/homebrew/Brewfile (15-30 min)
14. brew bundle install --file=
15. Remove conflicting files: rm -f ~/.zshrc ~/.zpreztorc ~/.zprofile ~/.zshenv ~/.zlogin ~/.gitconfig ~/.wezterm.lua
16. cd ~/.dotfiles && stow zsh git wezterm ssh karabiner claude bin gh
17. Verify SSH paths: grep '/Users/' ~/.ssh/config (update if username differs)
Zprezto:
18. git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto
19. exec zsh — verify prompt renders
Languages:
20. fnm install 22.22.0 && fnm default 22.22.0 && fnm install 20.10.0 && fnm install 24.11.1
21. pyenv install 3.13.11 && pyenv global 3.13.11
22. rbenv install 3.3.5 && rbenv global 3.3.5
23. rustup-init -y && source ~/.cargo/env && rustup toolchain install stable nightly
Global packages:
24. npm install -g openclaw corepack && corepack enable
25. mkdir -p ~/.openclaw/completions && openclaw completions zsh > ~/.openclaw/completions/openclaw.zsh
26. pipx install poetry && pipx install jupyter-lab && pipx install towncrier
27. cat ~/.dotfiles/setup/cargo-packages.txt | grep -E '^\w' | awk '{print $1}' | tr -d ':' | xargs cargo install
Blockchain:
28. curl -L https://foundry.paradigm.xyz | bash && source ~/.zshrc && foundryup
29. curl -L https://sp1.succinct.xyz | bash && source ~/.zshrc && sp1up
30. curl -L https://risczero.com/install | bash && source ~/.zshrc && rzup install
31. curl https://get.wasmer.io -sSfL | sh
32. Check if installers modified .zshrc: cd ~/.dotfiles && git diff — commit if so
Claude Code:
33. curl -fsSL https://claude.ai/install.sh | sh
34. Install plugins (9 commands — see plan file)
35. claude mcp list — verify 6 servers
Google Cloud + Auth:
36. curl https://sdk.cloud.google.com | bash && exec zsh && gcloud init && gcloud auth login
37. gh auth login
38. az login
39. Launch Docker Desktop, then docker login
Phase 4: rsync Projects
- Enable Remote Login on old MacBook (System Settings → General → Sharing)
- From new MacBook:
rsync -aH --progress dennis.won@<OLD_IP>:~/projects//projects//magic/
rsync -aH --progress dennis.won@<OLD_IP>:/magic//go/ ~/go/
rsync -aH --progress dennis.won@<OLD_IP>:
Phase 5: Verify
- Run through the verification checklist in the plan file
- Clean up: sudo rm -rf /opt/homebrew.bak
⏺ ★ Insight ─────────────────────────────────────
The bootstrapping problem: Claude Code needs Homebrew, Node.js, and shell config to run — but those are what you're trying to install.
You need to do a minimal manual bootstrap first, then let Claude Code handle the rest.
─────────────────────────────────────────────────
Here's the minimum you need to do manually before Claude Code can take over:
Manual Bootstrap (10-15 min)
1. Migration Assistant (already done at this point)
2. Back up old Homebrew
sudo mv /opt/homebrew /opt/homebrew.bak
3. Xcode CLI tools
xcode-select --install
4. Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
5. SSH keys + secrets from Google Drive
Download from: https://drive.google.com/drive/u/0/folders/1yZ4vZSQ7IH6zVTjtLyvMMYikKaPQm1Iq
mkdir -p ~/.ssh
cp -r ~/Downloads/.ssh/* ~/.ssh/
mv ~/Downloads/.zsh_secrets ~/
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_ed25519 ~/.ssh/google_compute_engine ~/.ssh/.pem && chmod 644 ~/.ssh/.pub
6. Clone dotfiles (needs SSH key in place)
git clone git@github.com:denniswon/mbp-migrate.git ~/.dotfiles
7. Install Claude Code
curl -fsSL https://claude.ai/install.sh | sh
Then Hand It Off to Claude Code
claude
Once inside Claude, say:
▎ Follow the migration plan at ~/.dotfiles/../docs/superpowers/plans/2026-03-18-macbook-migration.md — start from Task 10 Step 2 (brew
bundle install). I've already done Tasks 7-10 Step 1 manually. Execute the remaining tasks through Phase 5.
Claude Code will then handle: Brewfile install, stow, Zprezto, all language runtimes, global packages, blockchain toolchains, plugin
installs, MCP server verification, Google Cloud SDK, re-authentication prompts, and the full verification checklist.
Note: A few steps will still need your manual input:
- gh auth login, az login, gcloud auth login — browser-based OAuth flows
- Docker Desktop — needs to be launched from Applications
- rsync from old machine — needs the old MacBook's IP
But Claude Code can orchestrate everything else and prompt you when it hits those steps.
On old MacBook: System Settings → General → Sharing → Remote Login → ON
On old machine:
ifconfig | grep "inet " | grep -v 127.0.0.1
MacBook Migration Implementation Plan
Goal: Migrate full development environment from MacBook Pro (M1 Pro, 16GB) to MacBook Pro (M1 Max, 64GB, 16") with zero data loss and a working dev environment on day one.
Architecture: Hybrid approach — Migration Assistant for macOS layer (apps, prefs, documents), scripted Homebrew + stow for dev tools, rsync for project repos.
Spec:
docs/superpowers/specs/2026-03-18-macbook-migration-design.mdPhase 1: Prepare Old Machine
All tasks in Phase 1 run on the current (old) MacBook.
Task 1: Generate Brewfile
Machine: Old MacBook
Files:
Create:
~/.dotfiles/homebrew/BrewfileStep 1: Create dotfiles directory structure
brew bundle dump --file=~/.dotfiles/homebrew/Brewfile --forceExpected: File created with
brew,cask, andtapentries.Expected: ~250+ lines, ~176 brew entries, ~74 cask entries.
Expected: A line with
brew "vfox"or similar. If missing, add it manually:Open in editor and remove any packages you no longer use:
cursor ~/.dotfiles/homebrew/BrewfileTask 2: Split Secrets from .zshrc
Machine: Old MacBook
Files:
Create:
~/.zsh_secretsModify:
~/.zshrcStep 1: Identify all secret exports in .zshrc
Expected: ~12 lines with API keys, tokens, and secrets.
Extract all secret lines from
.zshrcinto~/.zsh_secrets. The file should look like:Remove the individual export lines from
.zshrcand add this in their place:Expected: Key prints correctly, no errors on source.
Task 3: Fix Known .zshrc Issues
Machine: Old MacBook
Files:
Modify:
~/.zshrcStep 1: Fix duplicate LDFLAGS/CPPFLAGS
Find the two conflicting sets (postgresql@16 and llvm) and combine them into one:
Find and remove one of the two identical lines adding
~/.codeium/windsurf/binto PATH.Expected: No errors.
Task 4: Create Dotfiles Repo with Stow
Machine: Old MacBook
Files:
Create:
~/.dotfiles/(entire stow structure)Step 1: Initialize git repo
Expected: Files organized under package directories matching home directory structure.
Task 5: Export Language Runtime State
Machine: Old MacBook
Files:
Create:
~/.dotfiles/setup/(version snapshots)Step 1: Export Node.js state
Expected: 7+ files in setup directory, Node versions listed.
Task 6: Commit and Push Dotfiles
Machine: Old MacBook
The repo
denniswon/mbp-migratealready exists (private).Expected: Commit hash shown, remote points to GitHub.
Phase 2: Migration Assistant
Task 7: Run Migration Assistant
Machine: New MacBook (first boot)
During initial macOS setup, select "Transfer Information to This Mac" when prompted.
Options (in order of speed):
Transfer everything — Migration Assistant handles: apps, system preferences, documents, photos, keychain, 1Password, Raycast, Karabiner, fonts, user account.
Expected: 1-3 hours depending on data size and connection method.
ls /opt/homebrew/ # check what Migration Assistant copied sudo mv /opt/homebrew /opt/homebrew.bakExpected: Old Homebrew directory moved to backup. Will delete after Phase 3 succeeds.
Phase 3: Dev Environment Setup
All tasks in Phase 3 run on the new MacBook.
Task 8: Install Foundation (Xcode + Homebrew)
Machine: New MacBook
Expected: Dialog appears, click Install. Wait for completion (~5 min).
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Expected: Homebrew version printed, path is
/opt/homebrew/bin/brew.Task 9: Transfer SSH Keys and Secrets
Machine: New MacBook (receiving from old MacBook)
SSH keys must be transferred before cloning the dotfiles repo (which requires SSH auth).
From old MacBook, AirDrop these files:
~/.ssh/id_ed25519~/.ssh/id_ed25519.pub~/.ssh/google_compute_engine~/.ssh/google_compute_engine.pub~/.ssh/newton.pem~/.ssh/tdx-prover-temp.pemStep 2: AirDrop secrets file
From old MacBook, AirDrop:
~/.zsh_secrets(rename tozsh_secretsbefore sending — macOS Finder hides dot-prefixed files)Note: If dot-files don't appear in Finder, use terminal:
ls -la ~/Downloads/or check Finder > Go > AirDrop.Expected:
Hi dennis-won! You've successfully authenticated...Task 10: Clone Dotfiles and Install Homebrew Packages
Machine: New MacBook
git clone git@github.com:denniswon/mbp-migrate.git ~/.dotfilesbrew bundle install --file=~/.dotfiles/homebrew/BrewfileExpected: All 176 formulae + 74 casks install. Some casks may prompt for password. This step takes 15-30 minutes.
Expected: All listed packages appear.
Task 11: Stow Dotfiles
Machine: New MacBook
Stow will refuse to create symlinks if real files already exist. Clean them up first:
Expected: No errors. Symlinks created in home directory.
Expected: All files are symlinks to
~/.dotfiles/....Expected: All paths reference
/Users/dennis.won/. If the username is different on the new machine, update the paths.Task 12: Install Zprezto
Machine: New MacBook
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"Close and reopen terminal (or run
exec zsh).Expected: Zprezto wikimatze theme renders with git info, colored prompt.
Expected: Alias definitions printed.
Task 13: Install Language Runtimes
Machine: New MacBook
Expected:
v22.22.0Expected:
Python 3.13.11Expected:
ruby 3.3.5Review
~/.dotfiles/setup/rust-toolchains.txtfor specialized toolchains (risc0, succinct) and install as needed.Expected: Stable toolchain version printed.
Expected:
go1.23.x darwin/arm64or newer.Task 14: Install Global Packages
Machine: New MacBook
corepack enableExpected: Version string.
Or install manually if the parsing is tricky:
Expected: Each tool compiles and installs. This step takes 10-20 minutes.
Task 15: Install Blockchain Toolchains
Machine: New MacBook
Expected: Version strings for all three tools.
curl https://get.wasmer.io -sSfL | shNote: Any Wasmer packages from the old machine need to be reinstalled separately.
Foundry, SP1, and RISC0 installers may append lines to
.zshrc. Since.zshrcis a symlink to the dotfiles repo, these changes modify the stowed file directly. Check and commit:Task 16: Install Claude Code
Machine: New MacBook
curl -fsSL https://claude.ai/install.sh | shExpected: Both are symlinks to
~/.dotfiles/claude/.claude/....Expected: 6 servers listed (context7, exa, github, slack, cloudflare, recall).
Expected: Version 2.x.
Task 17: Install Google Cloud SDK
Machine: New MacBook
curl https://sdk.cloud.google.com | bashFollow prompts. Install to
~/google-cloud-sdk/(default).exec zshTask 18: Re-Authenticate Services
Machine: New MacBook
Select: GitHub.com → SSH → existing key.
Open Docker Desktop from Applications. Wait for it to fully start (whale icon in menu bar stops animating). This regenerates
~/.docker/completions/which was lost when Homebrew was wiped.ls ~/.docker/completions/Expected: Completion files present (created by Docker Desktop on launch).
Re-authenticate via Claude Code — the OAuth token doesn't transfer.
Phase 4: rsync Projects
Task 19: Transfer Project Repos
Machine: Both (old provides, new receives)
On old MacBook: System Settings → General → Sharing → Remote Login → ON
On old MacBook:
Note the IP address (e.g.,
192.168.1.xxx).Expected: All repos transfer with git state intact. Time depends on total size.
Expected: Working tree, history, and stashes all intact.
Phase 5: Verification
Task 20: Full Verification Checklist
Machine: New MacBook
type cpushecho $ANTHROPIC_API_KEYcdinto project with.envrcvfox --versionnode -vpnpm --versionpython --versionruby -vrustc --versiongo versiongit config user.emailgit log --oneline -5(in any repo)ssh -T git@github.comforge --versiondocker --versionclaude --versionclaude mcp listclaude plugins listwindsurf --versiongh auth statusls ~/.openclaw/completions/ls ~/.docker/completions/Once everything is verified working:
Summary
Rollback: Old machine remains untouched. If anything fails, the old MacBook is still fully functional and you can re-run any phase independently.