A comprehensive setup script for new MacBooks optimized for developers, based on real-world usage patterns and 2025 best practices.
# Download and run the setup script
curl -fsSL https://raw.githubusercontent.com/your-username/mac-setup/main/mac-setup.sh | bash
# Or run locally
chmod +x mac-setup.sh
./mac-setup.sh
- Languages: Python 3.12/3.11, Node.js (LTS), Ruby, Rust, Go
- Version Control: Git with optimized config, GitHub CLI
- Databases: PostgreSQL, SQLite, Redis
- DevOps: Docker, Terraform, AWS CLI, kubectl
- Modern CLI: ripgrep, fzf, bat, eza, fd, zoxide
- Editors: VS Code, Cursor (AI-powered)
- Browsers: Chrome, Firefox, Arc
- Communication: Slack, Discord, Telegram, Zoom
- Productivity: Alfred, Rectangle, Dropbox
- Development: iTerm2, Docker Desktop, Postman
- Zsh with Oh My Zsh
- Powerlevel10k theme for beautiful prompts
- Optimized startup time (~0.3 seconds)
- Enhanced history (50K commands, smart deduplication)
- Useful plugins: autosuggestions, syntax highlighting
- Fast shell startup with lazy loading
- Smart completion caching (checks only once/day)
- Minimal plugin loading for speed
- Show hidden files in Finder
- Enhanced Finder with path bar and status
- Faster key repeat rates
- Optimized Dock settings
- Screenshot location and format optimization
- Rebase by default for cleaner history
- Enhanced conflict resolution with zdiff3
- Useful aliases for common operations
- Branch sorting by commit date
- Auto-pruning of remote branches
- Password-protected screensaver
- Secure SSH directory permissions
- GPG support for commit signing
~/Development/
├── Projects/
│ ├── Web/
│ ├── Mobile/
│ ├── Backend/
│ └── Scripts/
├── Playground/
└── Archive/
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
ssh-keygen -t ed25519 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
p10k configure
mas install 497799835 # Xcode
mas install 1333542190 # 1Password
Alternative installation using Homebrew Bundle:
# Install from Brewfile
brew bundle --file=Brewfile
# Generate Brewfile from current system
brew bundle dump --file=Brewfile
Edit the arrays in mac-setup.sh
:
essential_formulas[]
for CLI toolsessential_casks[]
for GUI apps
Add your preferences to the optimize_macos_defaults()
function.
Customize aliases in the .zshrc
creation section.
- Based on Real Usage: Analyzed actual installed packages and usage patterns
- Performance First: Optimized for fast shell startup and responsiveness
- 2025 Ready: Uses modern tools and current best practices
- India-Friendly: Date formats and regional considerations
- Modular Design: Easy to customize and extend
- Well Documented: Clear explanations for each choice
- Shell startup: ~0.33 seconds (vs 5+ seconds typical)
- Git operations: Faster with smart caching and pruning
- Package installation: Parallel where possible
- Minimal sudo usage: Only when necessary
- Secure defaults: Password protection, encrypted storage
- Code signing: Ready for GPG commit signing
- Permission management: Proper file permissions
- Fork the repository
- Add your improvements
- Test on a fresh Mac
- Submit a pull request
MIT License - Feel free to use and modify for your needs.
Note: This script is based on analysis of a real developer's Mac setup with 15+ years of accumulated tools and optimizations. It prioritizes performance, security, and developer productivity.