Skip to main content

macOS Setup Guide

Complete setup guide for Claude Code, VS Code, and Git/GitHub on macOS

60 minutes
7 min read
mac

This guide will walk you through setting up your Mac for development with Claude Code, VS Code, and Git/GitHub.

What You'll Install

  • VS Code
  • Claude Code CLI and Extension
  • Git
  • GitHub account and SSH keys
  • Node.js (for this project and others)
  • Python or R (for data analysis)

Prerequisites

  • macOS 10.15 (Catalina) or later
  • Administrator access to your Mac
  • Internet connection
  • About 60 minutes

Step 1: Install VS Code

  1. 1

    Download VS Code

    1. Visit https://code.visualstudio.com
    2. Click "Download for Mac"
    3. Open the downloaded .zip file
    4. Drag Visual Studio Code.app to your Applications folder
  2. 2

    Open VS Code from Terminal

    To open VS Code from the command line:

    1. Open VS Code
    2. Press + + P to open the Command Palette
    3. Type "shell command"
    4. Select "Shell Command: Install 'code' command in PATH"

    Test it:

    Bash
    code --version

    You should see the VS Code version number.


Step 2: Install Homebrew (Package Manager)

Homebrew makes it easy to install development tools on Mac.

  1. 1

    Install Homebrew

    Open Terminal (Applications → Utilities → Terminal) and run:

    Bash
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    Follow the prompts. You may need to enter your password.

  2. 2

    Add Homebrew to PATH

    After installation, run the commands Homebrew suggests (they'll look like this):

    Bash
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"

    Test it:

    Bash
    brew --version

Step 3: Install Git

Git is the version control system you'll use to track changes and collaborate.

  1. 1

    Install Git via Homebrew

    Bash
    brew install git
  2. 2

    Configure Git

    Set your name and email (use the email you'll use for GitHub):

    Bash
    git config --global user.name "Your Name"
    git config --global user.email "your.email@example.com"

    Set VS Code as your default editor:

    Bash
    git config --global core.editor "code --wait"

    Set default branch name to main:

    Bash
    git config --global init.defaultBranch main
  3. 3

    Create Useful Aliases

    Bash
    git config --global alias.st status
    git config --global alias.co checkout
    git config --global alias.br branch
    git config --global alias.cm commit

    Test it:

    Bash
    git --version
    git config --list

Step 4: Set Up GitHub

  1. 1

    Create GitHub Account

    1. Go to https://github.com
    2. Click "Sign up"
    3. Follow the prompts to create your account
  2. 2

    Generate SSH Key

    SSH keys let you connect to GitHub securely without entering your password every time.

    Generate a new SSH key:

    Bash
    ssh-keygen -t ed25519 -C "your.email@example.com"

    When prompted:

    • Press to accept the default file location
    • Enter a passphrase (optional but recommended)
    • Press again to confirm

    Start the SSH agent:

    Bash
    eval "$(ssh-agent -s)"

    Add your key to the agent:

    Bash
    ssh-add ~/.ssh/id_ed25519
  3. 3

    Add SSH Key to GitHub

    Copy your public key:

    Bash
    pbcopy < ~/.ssh/id_ed25519.pub

    This copies your key to the clipboard.

    Add to GitHub:

    1. Go to https://github.com/settings/keys
    2. Click "New SSH key"
    3. Title: "My Mac" (or any descriptive name)
    4. Key type: Authentication Key
    5. Paste your key ( + V)
    6. Click "Add SSH key"

    Test your connection:

    Bash
    ssh -T git@github.com

Step 5: Install Node.js

Node.js is needed for many modern development tools.

Bash
brew install node

Test it:

Bash
node --version
npm --version

Step 6: Install Claude Code

Install the Extension

  1. Open VS Code
  2. Click the Extensions icon (or press + + X)
  3. Search for "Claude Code"
  4. Click "Install" on the official Anthropic extension

Sign In to Claude

  1. In VS Code, click the Claude icon in the sidebar
  2. Click "Sign in to Claude"
  3. Follow the prompts to authenticate with your Anthropic account

Step 7: Install Python (For Data Analysis)

If you plan to do data analysis with Python:

  1. 1

    Install Python via Homebrew

    Bash
    brew install python@3.11
  2. 2

    Create a Virtual Environment

    For your first project:

    Bash
    mkdir ~/my-first-project
    cd ~/my-first-project
    python3 -m venv venv
    source venv/bin/activate

    You'll see (venv) in your prompt when activated.

  3. 3

    Install Common Data Science Packages

    Bash
    pip install pandas numpy matplotlib jupyter

    Deactivate when done:

    Bash
    deactivate

Step 8: Install R (Optional - For R Users)

  1. 1

    Install R

    Bash
    brew install r
  2. 2

    Install RStudio (Optional)

  3. 3

    Install R Extension for VS Code

    1. Open VS Code Extensions
    2. Search for "R"
    3. Install the official R extension

Step 9: Clone Your First Project

Let's clone a starter project with Claude templates.

  1. 1

    Create a Projects Folder

    Bash
    mkdir ~/projects
    cd ~/projects
  2. 2

    Clone This Repository

    Bash
    git clone git@github.com:yourusername/claude-code-integration.git
    cd claude-code-integration
  3. 3

    Open in VS Code

    Bash
    code .
  4. 4

    Explore the Templates

    Check out these files:

      • CLAUDE.md
      • .claudeignore
        • settings.json
      • package.json
      • README.md

Step 10: Verify Your Setup

Run these commands to verify everything is installed:

Bash
# VS Code
code --version
# Git
git --version
# Node.js
node --version
npm --version
# Python
python3 --version
# SSH to GitHub
ssh -T git@github.com

Next Steps

You're all set! Here's what to do next:

  1. Learn Git Basics: Go to the Git & GitHub track
  2. Start a Data Project: Try the Data Analysis track
  3. Build an App: Check out the App Builder track
  4. Automate Tasks: Explore the Automation track

Troubleshooting

Command Not Found

If you get "command not found" errors:

  1. Close and reopen Terminal
  2. Check your PATH:
Bash
echo $PATH
  1. Ensure Homebrew is in your PATH (Step 2.2)

Tips for Mac Users

  • Use + + P frequently in VS Code for the Command Palette
  • Terminal shortcuts:
    • + T: New tab
    • + K: Clear screen
    • Ctrl + C: Cancel current command
  • Keep your system updated: Check for macOS updates regularly
  • Use Time Machine for backups before major changes

Additional Resources


Ready to code! Proceed to the Git & GitHub Basics to learn version control.