Automated macOS setup script that installs Homebrew, apps, fonts, and configures system defaults.
curl -fsSL https://raw.githubusercontent.com/samsoeapp/macos/refs/heads/main/macos-setup-client/prep.sh | sudo bash
Use --client NAME or a positional NAME.
curl -fsSL https://raw.githubusercontent.com/samsoeapp/macos/refs/heads/main/macos-setup-client/prep.sh | sudo bash -s -- --client RD curl -fsSL https://raw.githubusercontent.com/samsoeapp/macos/refs/heads/main/macos-setup-client/prep.sh | sudo bash -s -- RD
- Copy the
macos-setupfolder to your Mac - Open Terminal and navigate to the folder
- Run:
./prep.command - Enter your admin password when prompted
Main executable script. Run this to set up your Mac.
Homebrew packages (formulae, casks, fonts). Contains brief editing instructions at the top of the file.
Mac App Store apps. One app per line: app_id|App Name. Contains brief editing instructions at the top of the file.
Hidden log file with detailed output from script runs. Appends if run multiple times on the same day.
- Obtains admin privileges (password stored securely)
- Installs Homebrew (if needed)
- Prepares Homebrew (updates, configures)
- Installs Rosetta 2 (Apple Silicon only)
- Installs packages from
.Brewfile - Sets default browser from
prep.command - Configures Dock from
prep.command - Applies macOS defaults from
prep.command - Cleans up Homebrew locks
- Installs App Store apps from
.Masfile(optional, requires Apple ID)
Each file (.Brewfile, .Masfile) contains brief editing instructions at the top. Open the file to see how to add/remove items.
- macOS (tested on macOS Sonoma+)
- Admin account
- Internet connection
- Script fails: Check that
prep.commandis executable:chmod +x prep.command - Gatekeeper prompt on double-click: Remove quarantine once:
xattr -dr com.apple.quarantine prep.command(or run it from Terminal) - Homebrew fails: Check internet connection or install manually from https://brew.sh
- App Store apps: Sign in to Mac App Store first:
open -a "App Store" - Dock fails: Grant Terminal.app Full Disk Access in System Settings
- Full log: Check
.prep-YYYYMMDD.logfor detailed output
Most settings are user-only (apply only to the current user). Only 2 settings are system-wide:
/Volumesfolder visibility (affects all users)- Login window hostname display (affects all users)
All other settings (Finder, Safari, Dock, screenshots, etc.) are user-specific. See SETTINGS_SCOPE.md for details.
Password is stored securely in a temporary file, cleared from memory immediately, and deleted on script exit.