An automated script to set up a new MacBook with development tools, essential applications, and useful configurations.
curl -fsSL https://raw.githubusercontent.com/AlexLoar/macbook-setup/refs/heads/main/setup.sh | bashOr clone and run locally:
git clone https://github.com/AlexLoar/macos-setup.git
cd macos-setup
chmod +x setup.sh
./setup.sh- Package managers: Homebrew, Poetry, uv
- Development: Python 3.12, Node.js 18+, Git, Docker (CLI), GitHub CLI, Claude Code CLI
- Databases: PostgreSQL 16, Redis
- Utilities: htop, wget, tree, jq, git-delta
- Shell: Zsh with Oh My Zsh and plugins
- Browsers: Brave, Chrome
- Productivity: Rectangle, Raycast, Stats, Google Drive
- Communication: Slack, WhatsApp, Telegram
- Development: VS Code, iTerm2, Sublime Text, Postman
- Multimedia: VLC, Spotify, NoTunes
- Others: KeePassXC, Calibre, LibreOffice, ChatGPT, The Unarchiver
- Python, Pylance
- Django support
- Ruff formatter
- Default branch:
main - Aliases:
st,ci,co,br,last,unstage,lg,undo,amend - Uses delta for improved diffs if installed
- Generates Ed25519 key
- Configures SSH agent with Keychain
- Copies public key to clipboard
- Timestamped history
- Enhanced directory navigation
- No duplicates in history
- Aliases:
ll,la,py,pip - Adds
update-mac()helper to update and clean Homebrew in one command
- Screenshots saved to
~/Screenshots - Shows path bar in Finder
- Custom profile with optimized settings
- Enhanced color scheme and transparency
- Disables Spotlight shortcuts
- Opens Raycast Preferences so you can set ⌘ + Space as hotkey
The following applications are added to System Settings → General → Login Items:
- DisplayLink Manager
- Google Drive
- KeePassXC
- Rectangle
- Raycast
- macOS (Intel or Apple Silicon)
- Internet connection
- Administrator permissions
- Apple Silicon: Installs Rosetta 2 automatically if needed
- Services: PostgreSQL (port 5432) and Redis (port 6379) start automatically
- SSH: If an SSH key already exists, it's preserved and just copied to clipboard
- Idempotent: The script can be run multiple times without duplicating configurations
- Permissions: Adding login items may require confirming macOS privacy (TCC) prompts
- Restart terminal or run
source ~/.zshrc - Configure your apps: Sign in to Slack, Google Drive, etc.
- VS Code: If the
codecommand doesn't work, install it from VS Code:Cmd+Shift+P→ "Shell Command: Install 'code' command in PATH"
- Claude Code: Run
claude loginto configure the CLI - Raycast: Assign ⌘ + Space as its hotkey in Preferences
- Rectangle: Configure your preferred keyboard shortcuts
brew services restart postgresql@16
brew services restart redisbrew services listbrew cleanup -s && brew autoremoveMIT License - Feel free to modify and share
Author: Álex López