One-command setup for a fresh Mac. Installs the apps I use, symlinks my shell + Hammerspoon configs, and wires up the custom keyboard/mouse shortcuts I depend on.
git clone https://github.com/timomak/new-macbook-script.git
cd new-macbook-script
./startThat's it. Re-run ./start any time to pull latest and reload.
| Installed via | Detection | |
|---|---|---|
| Homebrew | official curl installer | command -v brew |
| Hammerspoon | brew install --cask |
brew list --cask |
| Warp | brew install --cask |
brew list --cask |
| Node.js | brew install node |
command -v node |
| Claude Code | npm install -g @anthropic-ai/claude-code |
command -v claude |
| oh-my-zsh | official curl installer | [ -d ~/.oh-my-zsh ] |
Skips anything already installed. Safe to re-run.
Symlinks ~/.hammerspoon → ./hammerspoon/. The umbrella init.lua requires two recipe repos that are cloned into ./hammerspoon/:
- warp-claude-hotkey — Cmd+Shift+D in Warp splits the current pane (same cwd) and runs
claude. Cmd+Shift+A does the same, then submits/address-code-review-comments ultrathinkonce Claude is up. - mx-mouse-fix — Logitech MX Master side buttons switch desktops; thumb-rest button opens Mission Control.
To add a new recipe later:
- Add its repo name to
RECIPES=(...)in./start. - Add an ignore line for it in
.gitignore. - Add
_G.myThing = require("my-thing")tohammerspoon/init.lua. - Commit + re-run
./start.
Symlinks ~/.zshrc → ./shell/zshrc and ~/.zprofile → ./shell/zprofile.
.zshrc sets up oh-my-zsh with the git plugin (which provides gaa, gc, gp, gst, and friends), plus personal aliases:
alias ..='cd ..'
alias ...='cd ../..'
alias claude="claude --dangerously-skip-permissions --remote-control --effort max"Optional integrations (uv's env, OpenClaw completions) are sourced only if present.
.zprofile sets up Homebrew on PATH and OrbStack if installed.
macOS security doesn't let a script grant these:
- Accessibility (System Settings → Privacy & Security → Accessibility) — enable Hammerspoon. The script opens this pane for you.
- Automation → System Events (same pane, Automation section) — enable Hammerspoon. Needed for the Warp Cmd+Shift+D hotkey (it uses AppleScript to drive Warp).
- Launch at login for Hammerspoon — Hammerspoon menu bar → Preferences → "Launch Hammerspoon at login".
If ~/.zshrc, ~/.zprofile, or ~/.hammerspoon already exist as real files (not symlinks), ./start moves them to ~/*.bak.<timestamp> before symlinking. Nothing is destroyed.
rm ~/.hammerspoon ~/.zshrc ~/.zprofile # remove the symlinks
# restore ~/*.bak.<timestamp> if you want the originals backApps installed via brew can be removed with brew uninstall --cask hammerspoon warp.
MIT