Set up a new Mac from scratch.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/marginal-builder/bootstrap/main/install.sh)"The installer opens a browser twice for a GitHub device-code prompt: once to log in and upload this machine's SSH key, and once to hand the key-management scopes back afterwards so the everyday token keeps only the default permissions.
The script is idempotent, so you can re-run it as often as you want once it's installed.
The installer asks for your password once at the start, then installs a temporary
/etc/sudoers.d/bootstrap-nopasswd rule so the rest of the run you never have to
enter your password again. The rule is removed when the script exits.
- Desktops: create the Desktops listed in
spaces-items.txtin Mission Control (four, by default).spaces-setup.shpauses until they exist. - Mail: off by default. Add Gmail, iCloud, or Exchange accounts in
System Settings → Internet Accounts. For custom IMAP accounts, create a
Bitwarden folder called
bootstrap-mailwith one login per account (username = email address, custom fieldhost= mail server), uncomment the mail block ininstall.sh, and run withSETUP_MAIL=1. - Bitwarden: only needed if you enable the custom IMAP mail step.
- Homebrew packages from
Brewfile(a lean dev set plus Firefox, Ghostty, Figma, Bitwarden and skhd) - SSH key and signed Git commits
- macOS preferences, Dock layout, Space assignments
- Firefox
user.jsanduserChrome.css - FigmaAgent login-item block
- Your
dotfilesrepo, linked into~/.config
- Restart the Mac to load the key remapping and Firefox settings.
- Open a new terminal window so the new shell config loads.
- Add Gmail, iCloud, or Exchange accounts in System Settings → Internet Accounts.
- Optional: add more packages to
Brewfileand runbrew bundle --file ~/git/bootstrap/Brewfile.
The files worth editing for your own needs:
Brewfileinstall.sh's settings at the top of the filespaces-items.txt(Desktop number and bundle ID)dock-items.txtfirefox/user.jsandfirefox/userChrome.css
Each step can be turned off with an environment variable when running the installer:
RUN_SOFTWAREUPDATE=0 SETUP_SPACES=0 \
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/marginal-builder/bootstrap/main/install.sh)"Available flags: RUN_SOFTWAREUPDATE, SETUP_DOTFILES, SETUP_PREFERENCES,
SETUP_DOCK, SETUP_SPACES, SETUP_FIREFOX, SETUP_FIGMA, SETUP_MAIL
(off by default), SETUP_SKHD (on by default).