Skip to content

Instantly share code, notes, and snippets.

@nevanscott
Last active February 1, 2026 15:28
Show Gist options
  • Select an option

  • Save nevanscott/5d88a5d75e49336f3d2eb763c112b512 to your computer and use it in GitHub Desktop.

Select an option

Save nevanscott/5d88a5d75e49336f3d2eb763c112b512 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Making Your Own Apps - Development Environment Setup
# This script installs the tools you'll need for the course
set -e # Exit on any error
echo "==================================="
echo "Making Your Own Apps - Setup Script"
echo "==================================="
echo ""
echo "This script will install:"
echo " • Xcode Command Line Tools (required for everything else)"
echo " • Homebrew (package manager for macOS)"
echo " • Git (version control)"
echo " • Node.js (JavaScript runtime)"
echo " • pnpm (fast package manager)"
echo " • GitHub CLI (gh)"
echo " • Netlify CLI"
echo " • Supabase CLI"
echo " • Cursor (AI-powered code editor)"
echo " • Figma (design tool)"
echo ""
read -p "Press Return to continue or Ctrl+C to cancel..."
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Install Xcode Command Line Tools
echo ""
echo "→ Checking for Xcode Command Line Tools..."
if xcode-select -p &>/dev/null; then
echo "✓ Xcode Command Line Tools already installed"
else
echo "Installing Xcode Command Line Tools..."
echo "(This will open a dialog - click 'Install' and wait for it to complete)"
xcode-select --install
echo ""
read -p "Press Enter once the installation is complete..."
echo "✓ Xcode Command Line Tools installed"
fi
# Install Homebrew
echo ""
echo "→ Checking for Homebrew..."
if command_exists brew; then
echo "✓ Homebrew already installed"
else
echo "Installing Homebrew (this may take a few minutes)..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "✓ Homebrew installed"
fi
# Install Git (brew-managed)
echo ""
echo "→ Checking for Git..."
if brew list git &>/dev/null; then
echo "✓ Git (Homebrew) already installed (version $(git --version | cut -d' ' -f3))"
else
echo "Installing Git via Homebrew..."
brew install git
echo "✓ Git installed"
fi
# Install Node.js
echo ""
echo "→ Checking for Node.js..."
if brew list node &>/dev/null; then
echo "✓ Node.js (Homebrew) already installed (version $(node --version))"
else
echo "Installing Node.js..."
brew install node
echo "✓ Node.js installed"
fi
# Install pnpm
echo ""
echo "→ Checking for pnpm..."
if brew list pnpm &>/dev/null; then
echo "✓ pnpm (Homebrew) already installed (version $(pnpm --version))"
else
echo "Installing pnpm..."
brew install pnpm
echo "✓ pnpm installed"
fi
# Install GitHub CLI
echo ""
echo "→ Checking for GitHub CLI..."
if brew list gh &>/dev/null; then
echo "✓ GitHub CLI (Homebrew) already installed (version $(gh --version | head -n1))"
else
echo "Installing GitHub CLI..."
brew install gh
echo "✓ GitHub CLI installed"
fi
# Install Netlify CLI
echo ""
echo "→ Checking for Netlify CLI..."
if command_exists netlify; then
echo "✓ Netlify CLI already installed"
else
echo "Installing Netlify CLI..."
pnpm install -g netlify-cli
echo "✓ Netlify CLI installed"
fi
# Install Supabase CLI
echo ""
echo "→ Checking for Supabase CLI..."
if brew list supabase &>/dev/null; then
echo "✓ Supabase CLI (Homebrew) already installed"
else
echo "Installing Supabase CLI..."
brew install supabase/tap/supabase
echo "✓ Supabase CLI installed"
fi
# Install Cursor
echo ""
echo "→ Checking for Cursor..."
if brew list --cask cursor &>/dev/null; then
echo "✓ Cursor (Homebrew) already installed"
else
echo "Installing Cursor..."
brew install --cask cursor
echo "✓ Cursor installed"
fi
# Install Figma
echo ""
echo "→ Checking for Figma..."
if brew list --cask figma &>/dev/null; then
echo "✓ Figma (Homebrew) already installed"
else
echo "Installing Figma..."
brew install --cask figma
echo "✓ Figma installed"
fi
# Configure Git
echo ""
echo "=================================="
echo "Git Configuration"
echo "=================================="
echo ""
echo "Let's set up Git with your information."
echo "You can change these later if needed."
echo ""
# Check if git user.name is already set
if git config --global user.name > /dev/null 2>&1; then
current_name=$(git config --global user.name)
echo "Git is already configured with name: $current_name"
read -p "Keep this name? (y/n): " keep_name
if [[ $keep_name != "y" ]]; then
read -p "Enter your name: " git_name
git config --global user.name "$git_name"
fi
else
read -p "Enter your name: " git_name
git config --global user.name "$git_name"
fi
# Check if git user.email is already set
if git config --global user.email > /dev/null 2>&1; then
current_email=$(git config --global user.email)
echo "Git is already configured with email: $current_email"
read -p "Keep this email? (y/n): " keep_email
if [[ $keep_email != "y" ]]; then
read -p "Enter your email: " git_email
git config --global user.email "$git_email"
fi
else
read -p "Enter your email: " git_email
git config --global user.email "$git_email"
fi
echo ""
echo "✓ Git configured with:"
echo " Name: $(git config --global user.name)"
echo " Email: $(git config --global user.email)"
echo ""
echo "=================================="
echo "✓ Setup complete!"
echo "=================================="
echo ""
echo "All tools are installed. You're ready to start coding!"
echo ""
echo "Next steps:"
echo " 1. Open Cursor and sign in (or create an account)"
echo " 2. Open Figma and sign in (or create an account)"
echo " 3. When you're ready to use GitHub, run: gh auth login"
echo " 4. When you're ready to deploy, run: netlify login"
echo " 5. When you're ready to use Supabase, run: supabase login"
echo ""
echo "Don't worry if you don't have accounts yet - we'll set those up as needed during the course!"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment