Automated macOS setup script for software engineers and DevOps professionals
A comprehensive, idempotent setup script that configures your Mac for modern software development. Supports both Intel and Apple Silicon Macs with automatic architecture detection.
- π Auto-detects architecture (Intel x86_64 vs Apple Silicon arm64)
- π Idempotent β safe to run multiple times
- π Comprehensive logging β saves output to timestamped log files
- βοΈ Customizable β CLI flags to skip components
- π― Minimal mode β install only essentials
- π‘οΈ Safe β backs up configs before modifying
- Homebrew β Package manager
- Git with SSH key generation
- Modern CLI tools β
bat,eza,fd,ripgrep,fzf,jq,yq,htop,tree - Starship β Modern shell prompt
- tmux β Terminal multiplexer
- Python (3.11 & 3.12) with
pip,virtualenv,pipenv,poetry - Node.js via
nvm(version manager) - Go β Latest stable
- Rust via
rustup - Java (OpenJDK 17)
- Docker β Container platform
- Kubernetes β
kubectl,kubectx,k9s,helm - Terraform β Infrastructure as Code
- AWS CLI β Amazon Web Services
- Google Cloud SDK β Google Cloud Platform
- Azure CLI β Microsoft Azure
- Ansible β Configuration management
- HashiCorp Tools β
packer,vault,consul,nomad,vagrant
- PostgreSQL 15
- MySQL
- Redis
- MongoDB
- Visual Studio Code
- Neovim
- JetBrains Toolbox
- iTerm2 β Better terminal
- Slack β Team communication
- Zoom β Video conferencing
- Notion β Note-taking
- Rectangle β Window management
- Postman β API testing
- Oh My Zsh β Zsh framework
- Plugins β autosuggestions, syntax highlighting
- Aliases β Convenient shortcuts
bash <(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/macbook-setup/main/setup.sh)# Clone the repository
git clone https://github.com/YOUR_USERNAME/macbook-setup.git
cd macbook-setup
# Make executable
chmod +x setup.sh
# Run the script
./setup.sh./setup.sh [OPTIONS]
Options:
--skip-cloud Skip cloud provider tools (AWS, GCP, Azure)
--skip-databases Skip database installations
--minimal Install only essential tools
--help Show help message# Full installation
./setup.sh
# Minimal installation (essentials only)
./setup.sh --minimal
# Skip cloud tools
./setup.sh --skip-cloud
# Skip databases (use Docker containers instead)
./setup.sh --skip-databases
# Combine flags
./setup.sh --skip-cloud --skip-databases| Architecture | Status | Homebrew Path |
|---|---|---|
| Apple Silicon (M1/M2/M3) | β Supported | /opt/homebrew |
| Intel (x86_64) | β Supported | /usr/local |
The script automatically detects your Mac's architecture and configures tools accordingly.
After the script completes:
-
Restart your terminal or run:
source ~/.zshrc
-
Open Docker.app to complete Docker setup
-
Add SSH key to Git providers:
cat ~/.ssh/id_ed25519.pub -
Configure cloud providers:
# AWS aws configure # Google Cloud gcloud init # Azure az login
-
Install VS Code extensions (recommended):
- Python
- Docker
- Kubernetes
- Terraform
- GitLens
- Remote - SSH
- ESLint
- Prettier
-
Restart your Mac for all system changes to take effect
The script creates:
~/Development/
βββ projects/ # Your coding projects
βββ learning/ # Learning materials
βββ tools/ # Custom tools
βββ scripts/ # Automation scripts
Edit setup.sh to:
- Add/remove tools
- Modify shell configuration
- Change directory structure
- Adjust performance settings
See CONTRIBUTING.md for guidelines.
If the script exits asking for Xcode tools:
- Complete the installation popup
- Re-run the script
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Open Docker.app manually
- Grant necessary permissions
- Wait for Docker to fully start
The script adds NVM to .zshrc. If issues persist:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"- Use
--skip-databasesand run DBs in Docker - Limit Docker resources (Settings β Resources)
- Close unused applications
- Keep 10-15% free disk space
- Disable unused services:
brew services list - Stop databases when not needed:
brew services stop <service> - Use lightweight terminal tools over GUI apps
- Enable FileVault β Full disk encryption
- Use strong passwords β For all accounts
- Enable Firewall β System Settings β Network β Firewall
- Keep software updated β
brew upgrade - Use 2FA β Enable on all cloud accounts
- Git Documentation
- Docker Documentation
- Kubernetes Documentation
- Terraform Tutorials
- Homebrew Documentation
Contributions are welcome! See CONTRIBUTING.md for guidelines.
MIT License β Free to use and modify.
If this script helped you, give it a βοΈ!
Made with β€οΈ for the developer community