Last active
August 24, 2026 09:13
-
-
Save sam1am/98e42806f208f15521e8536cbb675946 to your computer and use it in GitHub Desktop.
Mac Quick Setup
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 | |
| echo "π Starting Mac Setup..." | |
| # 1. Install Homebrew if not already installed | |
| if ! command -v brew &> /dev/null; then | |
| echo "πΊ Installing Homebrew..." | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| else | |
| echo "πΊ Homebrew is already installed. Updating..." | |
| brew update | |
| fi | |
| # Ensure Homebrew is available in the current session | |
| if [[ $(uname -m) == 'arm64' ]]; then | |
| eval "$(/opt/homebrew/bin/brew shellenv)" | |
| else | |
| eval "$(/usr/local/bin/brew shellenv)" | |
| fi | |
| # 2. Configure .zshrc Paths | |
| echo "π Configuring PATHs in ~/.zshrc..." | |
| # Create .zshrc if it doesn't exist | |
| touch ~/.zshrc | |
| # Add Homebrew to .zshrc (checks to prevent duplicates) | |
| if ! grep -q "brew shellenv" ~/.zshrc; then | |
| echo -e "\n# Homebrew" >> ~/.zshrc | |
| if [[ $(uname -m) == 'arm64' ]]; then | |
| echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc | |
| else | |
| echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zshrc | |
| fi | |
| fi | |
| # Add Android SDK and Tools to .zshrc | |
| if ! grep -q "ANDROID_HOME" ~/.zshrc; then | |
| cat << 'EOF' >> ~/.zshrc | |
| # Android Development Paths | |
| export ANDROID_HOME=$HOME/Library/Android/sdk | |
| export PATH=$PATH:$ANDROID_HOME/emulator | |
| export PATH=$PATH:$ANDROID_HOME/platform-tools | |
| export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin | |
| EOF | |
| fi | |
| # Add pnpm to .zshrc | |
| if ! grep -q "PNPM_HOME" ~/.zshrc; then | |
| cat << 'EOF' >> ~/.zshrc | |
| # pnpm | |
| export PNPM_HOME="$HOME/Library/pnpm" | |
| case ":$PATH:" in | |
| *":$PNPM_HOME:"*) ;; | |
| *) export PATH="$PNPM_HOME:$PATH" ;; | |
| esac | |
| EOF | |
| fi | |
| # 3. Install Node.js LTS (which includes npm and npx) | |
| echo "π¦ Installing Node.js LTS (includes npm & npx)..." | |
| brew install node@24 | |
| brew link --overwrite node@24 | |
| # 4. Install Global NPM Packages (npq, pnpm) | |
| echo "π¦ Installing global npm packages: npq and pnpm..." | |
| npm install -g pnpm npq | |
| # 5. Install Dev Tools (GUI) | |
| echo "π οΈ Installing Dev Tools..." | |
| brew install --cask android-studio | |
| brew install --cask android-commandlinetools | |
| brew install --cask visual-studio-code | |
| brew install --cask docker | |
| brew install --cask iterm2 | |
| brew install gh | |
| # 6. Install Other Apps | |
| echo "π± Installing Other Apps..." | |
| brew install --cask microsoft-edge | |
| brew install --cask 1password | |
| brew install --cask obsidian | |
| brew install --cask slack | |
| brew install --cask resilio-sync | |
| brew install --cask claude | |
| brew install --cask claude-code | |
| brew install --cask cursor | |
| brew install --cask cursor-cli | |
| brew install --cask affinity | |
| brew install --cask logi-options+ | |
| brew install --cask parsec | |
| brew install --cask stremio | |
| brew install --cask keka | |
| brew install --cask steam | |
| brew install --cask lm-studio | |
| brew install --cask localsend | |
| brew install ffmpeg | |
| brew install --cask vlc | |
| brew install --cask ultimaker-cura | |
| brew install --cask balenaetcher | |
| gh config set git_protocol ssh | |
| gh auth setup-git | |
| echo "β Script execution complete!" | |
| echo "β οΈ IMPORTANT: Run 'source ~/.zshrc' or restart your terminal to apply the PATH changes." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment