Skip to content

Optional: set up your own computer ​

You don't need this page to complete the course. Everything runs in GitHub Codespaces. Use it if you want to work offline, have run out of Codespaces hours, or want to keep working after the course ends.

Setting up takes 30–60 minutes. You'll install three things:

ToolWhat it isWhy you need it
VS CodeThe code editor, the same one you use in CodespacesEditing, Source Control, GitHub Copilot
GitThe version-control tool behind GitHubCommits, history, push and pull
Node.js (22 LTS; minimum 20.12)Runs JavaScript outside the browser, plus npm, its package managerRunning the week 5+ starters and their tests

LTS means "long-term support": the stable version most people should use. The course uses Node.js 22 LTS. The starters need at least version 20.12, and Node 20 no longer gets security updates, so install 22 or a newer LTS. Some AI command-line tools need a recent version too.

WARNING

On your own computer, an AI agent can reach your own files. Agents have overwritten real users' files and, in one case, wiped a whole drive (AI Incident Database #1178; Tom's Hardware). Keep course projects in one dedicated folder, open only a single project in the editor, and do agent work (weeks 6–8) in a Codespace unless your instructor says otherwise. Wherever you run an agent, approvals stay on and you never use autopilot or skip-permissions modes (safety contract rule 9). See When to stay in Codespaces.

macOS ​

  1. Git. Open the Terminal app and run:

    bash
    xcode-select --install

    Click Install in the window that appears. This installs Apple's command-line tools, which include Git and Python 3. If it says they're already installed, you're done.

  2. VS Code. Download it from code.visualstudio.com, open the downloaded file, and drag Visual Studio Code into Applications. Open it once, then open the Command Palette (Cmd+Shift+P) and run Shell Command: Install 'code' command in PATH. You can then type code . in Terminal to open a folder.

  3. Node.js. Choose one:

    • Official installer (simplest): download the LTS macOS installer from nodejs.org and run it.
    • A version manager (flexible): tools such as nvm or fnm let you switch Node versions per project. Follow their install instructions, then run nvm install 22 (or fnm install 22).

Windows ​

  1. Git. Download Git for Windows from git-scm.com and run the installer. The default options are fine. When asked for a default editor, you can pick Visual Studio Code. The installer includes Git Credential Manager, which handles signing in to GitHub, and Git Bash, a terminal that understands the same commands as Codespaces.

  2. VS Code. Download the User Installer from code.visualstudio.com and run it. Tick Add "Open with Code" action and Add to PATH when offered.

  3. Node.js. Download the LTS Windows installer (.msi) from nodejs.org and run it with the default options. Or, in PowerShell:

    bash
    winget install OpenJS.NodeJS.LTS
  4. Python (only for previewing static sites). Install it from python.org and tick Add python.exe to PATH. On Windows the command is usually py or python rather than python3.

Windows notes ​

  • Which terminal? VS Code's built-in terminal opens PowerShell by default. Most commands in this course work there. A few differ: to copy a file, use Copy-Item .env.example .env instead of cp .env.example .env. To get the same commands as in Codespaces, switch the terminal to Git Bash (the ⌄ next to the + in the terminal panel).
  • WSL (optional). The Windows Subsystem for Linux runs a real Linux system inside Windows. You don't need it for this course. Some open-source AI terminal tools recommend it, though, so if you try those later, see Microsoft's WSL install guide.
  • Line endings. If git warns about LF will be replaced by CRLF, that's normal on Windows and harmless for this course.

Linux ​

Instructions for Ubuntu and Debian; other distributions have equivalents.

  1. Git and Python:

    bash
    sudo apt update
    sudo apt install git python3
  2. VS Code. Download the .deb package from code.visualstudio.com and install it, for example with sudo apt install ./code_*.deb from the download folder.

  3. Node.js. Your distribution's own nodejs package is often too old. Use a version manager such as nvm, then:

    bash
    nvm install 22

Check your installation ​

Close and reopen your terminal, then run:

bash
git --version
node --version
npm --version

✅ Checkpoint: each command prints a version number, and node --version prints v22 or higher (anything from v20.12 works).

Tell git who you are ​

Git records a name and email address with every commit. Use the private noreply address GitHub gives you, so your real email doesn't appear in public repositories. Find it under GitHub Settings → Emails; it ends in @users.noreply.github.com.

bash
git config --global user.name "[Your Name]"
git config --global user.email "[12345678+yourusername]@users.noreply.github.com"

Replace both values in square brackets with your own, and delete the brackets.

Sign in to GitHub in VS Code ​

  1. In VS Code, click the Accounts icon (the person, bottom left) → Sign in with GitHub.
  2. Your browser opens. Sign in to GitHub and approve the request, then allow the browser to return to VS Code.
  3. The first time you push, Git may open the browser again to sign you in. That's expected.

IMPORTANT

Never type your GitHub password into a terminal. GitHub doesn't accept passwords there. Sign-in always happens in the browser.

GitHub Copilot on your computer ​

Copilot is built into VS Code. Once you're signed in with GitHub, click the Copilot icon in the status bar, or Use AI Features if it's offered. It uses the same plan (Free or Student) and the same monthly allowance as in Codespaces. The modes and approvals work the same way: see GitHub Codespaces: Turn on GitHub Copilot Free.

  • Your privacy setting on github.com applies here too (Privacy settings: GitHub Copilot).
  • To stop VS Code sending usage statistics: Settings → search telemetry → set Telemetry Level to off.
  • To turn AI off for AI-off activities: Settings → search disable AI features → tick Chat: Disable AI Features.

Get a project onto your computer ​

Cloning means downloading a repository, with its full history, so you can work on it locally.

  1. Make a folder for all your course work, for example vc101 inside your Documents folder. Keep course projects only there.

  2. On github.com, open your repository, click Code → Local tab, and copy the HTTPS address.

  3. In a terminal (use cd to go into your vc101 folder first):

    bash
    git clone https://github.com/[your-username]/[your-repo].git
    cd [your-repo]
    code .

    Replace the parts in square brackets, and delete the brackets.

    Or, in VS Code: Command Palette → Git: Clone → paste the address → choose your vc101 folder.

To start a new project from a course starter, first create a new, empty repository on GitHub and clone it, then run the degit command from GitHub Codespaces: Start a project from a starter inside that freshly cloned folder. The same command works on your computer.

WARNING

degit's --force option overwrites files with the same names without asking. Run it only in a brand-new, empty repository's folder, never in an existing project such as your Project 1 or capstone. Check first: git log --oneline should show a single commit.

Run the starters ​

Static sites (weeks 1–4):

bash
python3 -m http.server 8000

Then open http://localhost:8000 in your browser. (localhost means "this computer". On Windows, use py -m http.server 8000.)

Node starters (week 5 onward):

bash
npm install
npm test
cp .env.example .env
npm run dev

Then open http://localhost:3000. Fill in .env as the week 5 lab explains. On Windows PowerShell, replace the cp line with Copy-Item .env.example .env. Codespaces secrets don't reach your computer, so locally you always use .env.

Stop a running server with Ctrl+C.

Keep your laptop and Codespaces in step ​

Your repository on GitHub is the single source of truth. Before you start work in one place, pull. When you stop, commit and push.

bash
git pull

If you edit the same file in a codespace and on your laptop without pushing and pulling in between, git will report a conflict. That's fixable, but it's easier to avoid.

When to stay in Codespaces ​

Stay in Codespaces (or come back to it) when:

  • You're doing agent work (weeks 6–8). A codespace is a sandbox: an agent there can't reach your personal files, passwords or other projects. That's safety contract rule 4.
  • Your computer is managed by work or school, or you can't install software on it.
  • Your computer is low on memory or disk space, or it's a Chromebook.
  • You're stuck and need help. Your instructor can reproduce problems in a codespace exactly; a local setup has endless small differences.
  • It's an oral walkthrough or an in-class activity, unless your instructor says otherwise.

Local setup is a good choice when you have no reliable internet, when your Codespaces hours are used up for the month, when you want to try running AI models on your own machine (see the Ollama row in Tool Handout; it needs a lot of memory), or after the course, to keep building.

Back to Week 0 pre-work · Codespaces guide

Materials CC BY 4.0 · Code MIT