Last active
January 21, 2026 15:36
-
-
Save vitorcalvi/7be5b480dd57e8228b713c0f882eb298 to your computer and use it in GitHub Desktop.
Comprehensive Bash script to automate macOS developer setup: installs essential apps with Homebrew, sets up Zsh with Oh My Zsh and Powerlevel10k, downloads FlutterFlow, updates /etc/hosts, sets up a conda environment, and installs Anaconda.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # macOS Developer Setup Script | |
| # Updated: 2025-12-29 | |
| # Author: vitorcalvi | |
| set -e | |
| echo "=== macOS Developer Environment Setup ===" | |
| # ============================================ | |
| # Homebrew Installation | |
| # ============================================ | |
| if ! command -v brew &> /dev/null; then | |
| echo "Installing Homebrew..." | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| eval "$(/opt/homebrew/bin/brew shellenv)" | |
| fi | |
| echo "Updating Homebrew..." | |
| brew update | |
| # ============================================ | |
| # Homebrew Formulae | |
| # ============================================ | |
| FORMULAE=( | |
| # Core Development | |
| git | |
| git-lfs | |
| gh | |
| node | |
| nvm | |
| yarn | |
| # Python | |
| python@3.12 | |
| python@3.13 | |
| pipx | |
| pyenv | |
| # AI/LLM Tools | |
| ollama | |
| llm | |
| qwen-code | |
| agent-browser | |
| # Media/FFmpeg | |
| ffmpeg | |
| scrcpy | |
| # Cloud & DevOps | |
| vercel-cli | |
| cloudflare-cli4 | |
| stripe | |
| render | |
| # Utilities | |
| wget | |
| mas | |
| transmission-cli | |
| asitop | |
| ) | |
| echo "Installing Homebrew formulae..." | |
| brew install "${FORMULAE[@]}" || true | |
| # ============================================ | |
| # Homebrew Casks (GUI Applications) | |
| # ============================================ | |
| CASKS=( | |
| # Terminals & Editors | |
| visual-studio-code | |
| sublime-text | |
| # AI Applications | |
| claude-code | |
| jan | |
| lm-studio | |
| copilot-cli | |
| # Browsers | |
| google-chrome | |
| opera | |
| # Development Tools | |
| android-platform-tools | |
| android-file-transfer | |
| balenaetcher | |
| # Productivity | |
| rectangle | |
| macdown | |
| # Communication | |
| discord | |
| # System Utilities | |
| macs-fan-control | |
| tailscale-app | |
| # Finance | |
| tradingview | |
| ) | |
| echo "Installing Homebrew casks..." | |
| brew install --cask "${CASKS[@]}" || true | |
| # ============================================ | |
| # Oh My Zsh & Terminal Setup | |
| # ============================================ | |
| if [ ! -d "$HOME/.oh-my-zsh" ]; then | |
| echo "Installing Oh My Zsh..." | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended | |
| fi | |
| # Powerlevel10k theme | |
| if [ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" ]; then | |
| echo "Installing Powerlevel10k theme..." | |
| git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k | |
| fi | |
| # Zsh plugins | |
| ZSH_CUSTOM=${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom} | |
| [ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ] && \ | |
| git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions | |
| [ ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ] && \ | |
| git clone https://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting | |
| # ============================================ | |
| # Node.js via NVM | |
| # ============================================ | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh" | |
| echo "Installing Node.js versions..." | |
| nvm install 18 | |
| nvm install 20 | |
| nvm install node # Latest (currently v25) | |
| nvm alias default node | |
| # Global npm packages | |
| npm install -g playwright puppeteer | |
| # ============================================ | |
| # Mac App Store Apps (requires mas) | |
| # ============================================ | |
| echo "Installing Mac App Store apps..." | |
| mas install 937984704 # Amphetamine | |
| mas install 1590273176 # Bee | |
| mas install 497799835 # Xcode | |
| # ============================================ | |
| # Git Configuration | |
| # ============================================ | |
| git lfs install | |
| # ============================================ | |
| # .zshrc Configuration | |
| # ============================================ | |
| cat >> ~/.zshrc << 'ZSHRC' | |
| # NVM | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" | |
| [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" | |
| # Aliases | |
| alias g="git" | |
| alias gst="git status" | |
| alias gco="git checkout" | |
| alias gcm="git commit -m" | |
| alias gp="git push" | |
| alias gpl="git pull" | |
| alias y="yarn" | |
| alias yd="yarn dev" | |
| alias yb="yarn build" | |
| alias n="npm" | |
| alias nd="npm run dev" | |
| alias nb="npm run build" | |
| # Path additions | |
| export PATH="/opt/homebrew/opt/postgresql@14/bin:$PATH" | |
| ZSHRC | |
| # ============================================ | |
| # Final Notes | |
| # ============================================ | |
| echo "" | |
| echo "=== Setup Complete! ===" | |
| echo "" | |
| echo "Manual steps required:" | |
| echo "1. Configure API keys:" | |
| echo " - llm keys set gemini" | |
| echo " - llm keys set openai" | |
| echo " - llm keys set anthropic" | |
| echo "" | |
| echo "2. Install manually (not available via brew/mas):" | |
| echo " - PrivadoVPN: https://privadovpn.com" | |
| echo " - Comet: https://comet.sh" | |
| echo "" | |
| echo "3. Configure Powerlevel10k: p10k configure" | |
| echo "" | |
| echo "4. Restart your terminal or run: source ~/.zshrc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment