One-command setup for a complete macOS development environment with automated tool management.
One-liner install:
curl -fsSL https://raw.githubusercontent.com/26zl/MacOS-Dev-Setup/main/bootstrap.sh | zshOr clone manually:
git clone https://github.com/26zl/MacOS-Dev-Setup.git
cd MacOS-Dev-Setup
./install.sh # Installs shell setup and system package managers
./dev-tools.sh # Installs language tools (optional)
source ~/.zshrcDaily usage:
update # Update all tools
verify # Check status
versions # Show versions
upgrade # Update the setup scripts themselves
install # Re-run base system setup
dev-tools # Re-run dev tools installer- One Command Updates: Update Homebrew, Python, Node.js, Ruby, Rust, Go, Swift, .NET, and more
- Beautiful Terminal: Powerlevel10k, syntax highlighting, autosuggestions
- Safe & Smart: Protects system files, graceful error handling
- Multi-Language: Python (pyenv), Node.js (nvm), Ruby (chruby), Rust (rustup), Swift (swiftly), Go, Java, .NET
- CI/CD Safe: Non-interactive mode support
./install.sh
source ~/.zshrcInstalls: Xcode CLT, Git, Homebrew, Oh My Zsh, Powerlevel10k, ZSH plugins, maintain-system script
Optional: MacPorts, mas, Nix, FZF (interactive prompts)
./dev-tools.sh # Interactive installation
./dev-tools.sh check # Dry-run
./dev-tools.sh test # Test detectionInstalls: Conda, pipx, pyenv, nvm, chruby, rustup, swiftly, Go, Java, .NET
update- Update all tools, package managers, and language runtimesverify- Check status of all installed toolsversions- Display versions of all toolsupgrade- Update the setup scripts from the latest GitHub releaseinstall- Re-run the base system setup (Homebrew, Oh My Zsh, etc.)dev-tools- Re-run the dev tools installer (Python, Node.js, Rust, etc.)
Package Managers: Homebrew, MacPorts, Nix, mas, Conda, pipx
Languages: Python (pyenv), Node.js (nvm), Ruby (chruby), Rust (rustup), Swift (swiftly), Go, Java, .NET
Global Packages: npm, Cargo, Go tools, Python packages, RubyGems
Note: Only global/system packages are updated. Project files (package.json, go.mod, etc.) are never modified.
Environment variables:
MAINTAIN_SYSTEM_CLEAN_PYENV=0- Disable Python cleanupMAINTAIN_SYSTEM_CLEAN_NVM=0- Disable Node.js cleanupMAINTAIN_SYSTEM_CLEAN_CHRUBY=0- Disable Ruby cleanupMAINTAIN_SYSTEM_PYENV_KEEP="3.11.8,3.10.14"- Keep specific Python versionsMAINTAIN_SYSTEM_NVM_KEEP="v18.19.1"- Keep specific Node.js versionsMAINTAIN_SYSTEM_CHRUBY_KEEP="ruby-3.4.6"- Keep specific Ruby versionsMAINTAIN_SYSTEM_SWIFT_SNAPSHOTS=1- Enable Swift snapshotsMACOS_DEV_SETUP_UPDATE_CHECK=0- Disable update notifications on shell start
Package Managers: Homebrew, MacPorts, Nix, mas, Conda, pipx
Languages: Python (pyenv), Node.js (nvm), Ruby (chruby), Rust (rustup), Swift (swiftly), Go, Java, .NET
Databases: MySQL, MongoDB, PostgreSQL (detection only)
Other: Docker, C/C++ (via Xcode CLT)
Pre-configured with Oh My Zsh, Powerlevel10k, syntax highlighting, autosuggestions, and FZF.
brew install --cask ghostty
mkdir -p ~/.config/ghostty
cp "Ghostty config.txt" ~/.config/ghostty/config
cp background/terminal-background.png ~/.config/ghostty/terminal-background.pngWill this modify my project files? No! Only global/system packages are updated. Project files are never modified.
Is it safe for CI/CD?
Yes! Set NONINTERACTIVE=1 or CI=1 for automated runs.
Does it work on Intel and Apple Silicon? Yes! Automatically detects architecture.
What if tools are missing?
The update command gracefully skips missing tools and shows installation instructions.
| Requirement | Details |
|---|---|
| macOS | macOS 13 Ventura or later (may work on older versions) |
| Architecture | Apple Silicon (M1/M2/M3/M4/M5) and Intel x86_64 |
| Shell | Zsh (default on macOS since Catalina) |
| Disk space | ~15-30GB free (Xcode CLT + Homebrew + dev tools) |
| Network | Required for all installations (downloads from GitHub, Homebrew, etc.) |
| Permissions | Some optional tools (MacPorts, Nix) require sudo |
- Input validation and sanitization
- Selective error handling
- Safe directory navigation
- HTTPS-only downloads with TLS verification
Note: Scripts download external content. Review scripts before running for maximum security.
- Run
./quick-test.shto verify syntax - Ensure ShellCheck passes
- Test on both Intel and Apple Silicon Macs
CI/CD: ShellCheck, Gitleaks, Trivy, syntax checks, comprehensive macOS tests.
MIT License - see LICENSE file for details.
If this project helped you, please consider giving it a star!
