Created
March 3, 2026 10:18
-
-
Save vitorcalvi/b606ec323bed2afc5dd146b676e01f51 to your computer and use it in GitHub Desktop.
configure Macbook
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
| 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. | |
| # ============================================ | |
| # Homebrew Formulae | |
| # ============================================ | |
| FORMULAE=( | |
| # Core Development | |
| git | |
| git-lfs | |
| gh | |
| tmux | |
| # Python | |
| python@3.12 | |
| python@3.13 | |
| pipx | |
| pyenv | |
| # Database | |
| postgresql@14 | |
| # Node.js Version Manager | |
| nvm | |
| # AI/LLM Tools | |
| ollama | |
| # Headless Browser for AI Agents (Vercel Labs) | |
| agent-browser | |
| # Media | |
| ffmpeg | |
| scrcpy | |
| # Cloud & DevOps | |
| vercel-cli | |
| cloudflare-wrangler | |
| stripe-cli | |
| # Utilities | |
| wget | |
| mas | |
| transmission-cli | |
| asitop | |
| ) | |
| echo "Installing Homebrew formulae..." | |
| brew install "${FORMULAE[@]}" || true | |
| # crush — requires charmbracelet tap | |
| echo "Installing Crush AI coding agent..." | |
| brew tap charmbracelet/tap | |
| brew install charmbracelet/tap/crush || true | |
| # agent-browser — download Chromium after binary install (one-time, ~700MB) | |
| echo "Setting up agent-browser (downloading Chromium)..." | |
| agent-browser install || true | |
| # ============================================ | |
| # Homebrew Casks (GUI Applications) | |
| # ============================================ | |
| CASKS=( | |
| # Terminals & Editors | |
| iterm2 | |
| visual-studio-code | |
| sublime-text | |
| # AI Applications | |
| claude-code | |
| trae | |
| jan | |
| lm-studio | |
| # Browsers | |
| google-chrome | |
| # Development Tools | |
| android-platform-tools | |
| android-file-transfer | |
| balenaetcher | |
| # Productivity | |
| miro | |
| rectangle | |
| mark-text | |
| # Communication | |
| discord | |
| # System Utilities | |
| macs-fan-control | |
| tailscale | |
| # Finance / Trading | |
| tradingview | |
| ) | |
| echo "Installing Homebrew casks..." | |
| brew install --cask "${CASKS[@]}" || true | |
| # ============================================ | |
| # GitHub CLI Extensions | |
| # ============================================ | |
| gh extension install github/gh-copilot 2>/dev/null || true | |
| # ============================================ | |
| # Claude CLI (Native Binary) | |
| # ============================================ | |
| if ! command -v claude &> /dev/null; then | |
| echo "Installing Claude CLI..." | |
| curl -fsSL https://claude.ai/install.sh | bash | |
| fi | |
| # ============================================ | |
| # Bun | |
| # ============================================ | |
| if ! command -v bun &> /dev/null; then | |
| echo "Installing Bun..." | |
| curl -fsSL https://bun.sh/install | bash | |
| fi | |
| # ============================================ | |
| # Oh My Zsh & Terminal Setup | |
| # ============================================ | |
| if [ ! -d "$HOME/.oh-my-zsh" ]; then | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended | |
| fi | |
| if [ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" ]; then | |
| git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \ | |
| "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" | |
| fi | |
| sed -i '' 's/^ZSH_THEME=.*/ZSH_THEME="powerlevel10k\/powerlevel10k"/' ~/.zshrc | |
| grep -q 'ZSH_THEME="powerlevel10k/powerlevel10k"' ~/.zshrc || \ | |
| echo 'ZSH_THEME="powerlevel10k/powerlevel10k"' >> ~/.zshrc | |
| 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" | |
| nvm install 18 | |
| nvm install 20 | |
| nvm install node | |
| nvm alias default node | |
| # Global npm packages | |
| npm install -g \ | |
| typescript \ | |
| ts-node \ | |
| yarn \ | |
| cloudflare-cli \ | |
| @anthropic-ai/claude-code | |
| # ============================================ | |
| # Python / Pipx | |
| # ============================================ | |
| pipx ensurepath | |
| # ============================================ | |
| # Mac App Store Apps | |
| # ============================================ | |
| mas install 937984704 # Amphetamine | |
| mas install 497799835 # Xcode | |
| # ============================================ | |
| # Git Configuration | |
| # ============================================ | |
| git lfs install | |
| git config --global init.defaultBranch main | |
| git config --global pull.rebase false | |
| # git config --global user.name "Your Name" | |
| # git config --global user.email "your@email.com" | |
| # ============================================ | |
| # .zshrc Configuration | |
| # ============================================ | |
| cat >> ~/.zshrc << 'ZSHRC' | |
| # --- Homebrew (Apple Silicon) --- | |
| eval "$(/opt/homebrew/bin/brew shellenv)" | |
| # --- 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" | |
| # --- Bun --- | |
| export BUN_INSTALL="$HOME/.bun" | |
| export PATH="$BUN_INSTALL/bin:$PATH" | |
| # --- Pyenv --- | |
| export PYENV_ROOT="$HOME/.pyenv" | |
| export PATH="$PYENV_ROOT/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| # --- Pipx --- | |
| export PATH="$HOME/.local/bin:$PATH" | |
| # --- PostgreSQL --- | |
| export PATH="/opt/homebrew/opt/postgresql@14/bin:$PATH" | |
| # --- Git --- | |
| 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 gl="git log --oneline --graph --decorate" | |
| # --- Node / npm / Yarn --- | |
| alias y="yarn" | |
| alias yd="yarn dev" | |
| alias yb="yarn build" | |
| alias n="npm" | |
| alias nd="npm run dev" | |
| alias nb="npm run build" | |
| # --- Bun --- | |
| alias bd="bun dev" | |
| alias bb="bun build" | |
| alias br="bun run" | |
| # --- Python --- | |
| alias py="python3" | |
| alias pip="pip3" | |
| # --- Docker --- | |
| alias dc="docker compose" | |
| alias dps="docker ps" | |
| alias dlg="docker logs" | |
| # --- Misc --- | |
| alias ll="ls -lAh" | |
| alias reload="source ~/.zshrc" | |
| ZSHRC | |
| # ============================================ | |
| # Final Notes | |
| # ============================================ | |
| echo "" | |
| echo "=== Setup Complete! ===" | |
| echo "" | |
| echo "1. Authenticate tools:" | |
| echo " claude # Claude CLI auth" | |
| echo " crush # configure model on first run" | |
| echo "" | |
| echo "2. Set Git identity:" | |
| echo " git config --global user.name 'Your Name'" | |
| echo " git config --global user.email 'your@email.com'" | |
| echo "" | |
| echo "3. Start PostgreSQL:" | |
| echo " brew services start postgresql@14" | |
| echo "" | |
| echo "4. Install manually:" | |
| echo " - PrivadoVPN : https://privadovpn.com" | |
| echo " - Comet : https://comet.sh" | |
| echo "" | |
| echo "5. Activate prompt:" | |
| echo " source ~/.zshrc && p10k configure" | |
| echo "" | |
| echo "6. Restart terminal or: source ~/.zshrc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment