Setup Guide

Code on your laptop. See it on your phone.

So far you have written p5.js in the web editor. This guide moves the same setup onto your own computer. You write the code in VS Code. You save it to GitHub. GitHub gives you a web address you can open on your phone.

VS CodeYou write and test your sketch on your laptop.
GitHubYou push your code. GitHub stores every version and publishes the page.
Your phoneYou open the web address and the sketch runs there, where it can use the phone's sensors.

What you need

  • Your laptop, and permission to install software on it.
  • Your phone.
  • Your OCAD U email address.

How to use this guide

  • Work through the parts in order. The list on the left shows every part and every step. On a phone, tap Steps at the top.
  • Choose Mac or Windows at the top of the list. The guide then only shows the steps for your computer.
  • Click any screenshot to make it bigger.

Three workflows

WorkflowWhereWhen
1. Code to phone. GitHub, GitHub Desktop, VS Code and GitHub Pages. Clone the starter project, change it, push it, open it on your phone, and check it all works.Parts 2 to 10This is the one that matters. Finish it first.
2. Agents and models. Optional. Add models to the Chat in VS Code, learn its modes, and apply for student access.Parts 11 to 13I will show it in class, but we will not work through it together. Give it a try on your own between Tuesday and Thursday.
3. OpenCode. Install OpenCode and the GitHub CLI, open your project, test it with one prompt, learn the screen and the words, and add OpenCode Go if you want it.Parts 14 to 20We work through this together in class. Finish workflow 1 first.
Optional tools. Testing on your phone without publishing.Part 21Later, if you want it.

Create your GitHub account

GitHub stores your code online and publishes your sketch as a web page. You also use this one account to sign in to VS Code and to Copilot.

  • About 10 minutes
  • Needs your phone

Sign up with your OCAD U email

If you already have a GitHub account, keep it. Add your OCAD U email to it in Settings, Emails and go to the next step.

  1. Go to github.com/signup.
  2. Enter your OCAD U email address and a strong password.
  3. Choose a username. Read the note below first.
  4. GitHub emails you a code. Enter the code to verify your email.
GitHub's sign-up page. On the right: Continue with Google, Continue with Apple, then Email, Password, Username and Your Country/Region.
Use the Email, Password and Username boxes on the right.

Turn on two-factor authentication

Two-factor authentication (2FA) means GitHub asks for a code from your phone as well as your password. GitHub requires it for anyone who publishes code. The student benefits application also requires it. Set it up now so it never blocks you later.

The most reliable method is an authenticator app. If you already use one, such as Google Authenticator, Microsoft Authenticator, 1Password or the Passwords app on an iPhone, use that.

  1. Go to github.com/settings/security. This is Settings, then Password and authentication.
  2. Click Enable two-factor authentication.
  3. Choose Authenticator app. GitHub shows a QR code.
  4. Open your authenticator app on your phone. Add a new account and scan the QR code.
  5. Type the 6 digit code from the app into GitHub.
The two-factor methods section of GitHub's security settings, listing authenticator app, SMS, security keys and GitHub Mobile.
2025 captureThe two-factor section of your security settings. You need at least one method set up.

Save your recovery codes

Recovery codes are the only way back into your account if you lose your phone. GitHub will not let you finish until you save them.

  1. Click Download. You get a small text file.
  2. Keep the file somewhere that is not only your phone. Your OCAD U OneDrive or a password manager are good places.
  3. Click I have saved my recovery codes.

Add the GitHub Mobile app

With the app installed, GitHub can send a notification to your phone and you tap to approve the sign-in. It is a useful second method. It can only be added after the authenticator app or SMS is set up.

  1. Install GitHub Mobile from the App Store or Google Play.
  2. Sign in to the app and allow notifications.

You are done with this part when

  • You can sign in at github.com with your password and a code from your phone.
  • Your recovery codes are saved somewhere safe.

Install GitHub Desktop

GitHub Desktop is GitHub's own app for your computer. In this workflow it does one important job. When you sign in, it tells Git your name and email for you, so you do not have to type commands to do it later. It is also a clear place to see the history of a project when something goes wrong.

  • About 5 minutes

Check if you already have it

Look in your Applications folder for GitHub Desktop, or press Cmd + Space and type GitHub Desktop.

Open the Start menu and type GitHub Desktop.

  1. If it is not there, go to the next step.
  2. If it is there, open it and update it. On a Mac, use the GitHub Desktop menu, then About GitHub Desktop, then Check for Updates. On Windows, use Help, then About GitHub Desktop.
  3. Then skip to step 4 and check the account and the name it is using.

Download and install

  1. Go to desktop.github.com/download. The page offers the right download for your computer.
The GitHub Desktop download page with one large download button, and smaller links for Intel Macs and for Windows.
On a Mac with an Intel chip, use the smaller link instead of the big button.
  1. Open the downloaded zip file. It unpacks to GitHub Desktop.
  2. Drag it into your Applications folder and open it from there.
  1. Run the downloaded GitHubDesktopSetup file. It installs and opens by itself.

Sign in to GitHub

  1. On the welcome screen, click Sign in to GitHub.com.
  2. Your browser opens. Sign in if asked, check the username, and click Authorize desktop.
  3. Your browser asks to open GitHub Desktop. Allow it.
GitHub Desktop's welcome screen with Sign in to GitHub.com, Sign in to GitHub Enterprise, Create your free account, and Skip this step.
Click Sign in to GitHub.com.

Let it set your name and email

Git writes a name and an email on every version you save. GitHub Desktop now offers to fill those in from your GitHub account.

  1. On the Configure Git screen, leave Use my GitHub account name and email address selected.
  2. Click Finish.
GitHub Desktop's Configure Git screen. Use my GitHub account name and email address is selected, with the name and email filled in below, a Finish button, and an example commit.
Your name and email come from your GitHub account.

That is all GitHub Desktop needs to do for now. You can close it. VS Code and every other tool on your computer will use the same name and email.

If you already had GitHub Desktop

Open GitHub Desktop, then Settings.

Open File, then Options.

  1. Under Accounts, check that it is signed in to the GitHub account you are using for this course.
  2. Under Git, check the name and email. Fix them if they are from an old account, then click Save.

You are done with this part when

  • GitHub Desktop opens and shows your GitHub account.
  • Its Git settings show your name and email.

Install VS Code and sign in

Visual Studio Code is a free code editor. It is where you will write your sketches. Signing in with GitHub connects the editor to your account, so it can copy your projects down and push your changes up.

  • About 10 minutes

Already have VS Code? Start here

If VS Code is already on your computer, do not install it again. Bring it up to date and check three things. If you have never installed it, skip this step.

1. Update it

VS Code now updates every week, and a lot has changed in a year. Copilot used to be an extension. It is now built in. This guide needs version 1.125 or newer.

  1. Open the Code menu and choose About Visual Studio Code to see your version.
  2. Open the Code menu again and choose Check for Updates...
  3. If it finds one, click Restart to Update.
  1. Open the Help menu and choose About to see your version.
  2. Open the Help menu again and choose Check for Updates...
  3. If it finds one, click Restart to Update.

2. Check which account is signed in

  1. Click the Accounts icon at the bottom left.
  2. If it shows the GitHub username you want to use for this course, followed by (GitHub), you are signed in. You can skip steps 2 to 5 of this part.
  3. If it shows a different account, such as an old GitHub account or a Microsoft account, click the account name, then Sign Out. Then sign in with the right one in step 3.
  4. If it shows no account, carry on with step 3.

3. Look at your old extensions

Click the Extensions icon and look under Installed. Nothing here will break the setup, but some of it is no longer needed.

If you haveWhat to do
GitLens, GitHub Actions, P5 Project Creator, p5js SnippetsUsed in last year's version of this course. Not needed now. Leave them or uninstall them.
p5.vscodeDisable it. It suggests p5.js 1 code, which clashes with p5.js 2.
GitHub Copilot, GitHub Copilot ChatNow built in. After you update VS Code these look after themselves.
Live ServerKeep it. It is one of the two you need.
My VS Code is full of settings and extensions from other courses

You do not need to remove anything. VS Code has profiles. A profile is a separate set of extensions and settings. Make a clean one for this course and switch between them whenever you like.

  1. Click the gear icon at the bottom left, then Profiles.
  2. Create a new profile. Call it something like Atelier.
  3. VS Code switches to it. It looks like a fresh install, and your old setup is untouched in the Default profile.
The gear menu at the bottom left of VS Code with Profiles highlighted.

Download and install VS Code

  1. Go to code.visualstudio.com/download.
  2. Click the big button for your computer.
The VS Code download page with large Windows and Mac buttons.
Use the large Windows or Mac button. You do not need the smaller links underneath.
  1. Open the downloaded file. If it is a zip, double-click it to unpack it.
  2. Drag Visual Studio Code into your Applications folder.
  3. Open it from Applications. The first time, macOS asks if you are sure. Click Open.
  1. Run the installer you downloaded. It is called something like VSCodeUserSetup-x64.exe.
  2. Accept the agreement and keep clicking Next.
  3. On the Select Additional Tasks screen, tick both Add "Open with Code" action boxes. Leave Add to PATH ticked.
  4. Click Install, then Finish.

Open VS Code and sign in with GitHub

If this is a new install

The first time VS Code opens, it shows a welcome window that asks you to sign in.

  1. Click Continue with GitHub.
The Welcome to VS Code window with a highlighted Continue with GitHub button.
The first window you see. Choose GitHub, not Google or Apple, so everything in this course uses one account.

If you have used VS Code before, or you closed that window

You will not see the welcome window. There are two other ways to sign in. They do the same thing.

  1. Click the blue Sign In button at the top right of the VS Code window.
The top right of the VS Code window with the Sign In button highlighted.
  1. Or click the Accounts icon at the bottom left, then Sign in to use GitHub Copilot...
The Accounts menu at the bottom left of VS Code with Sign in to use GitHub Copilot highlighted.
  1. Either way you get this small window. Click Continue with GitHub.
The Sign in to use GitHub Copilot window with Continue with GitHub highlighted.

Approve it in your browser

VS Code opens your web browser to finish signing in.

  1. If GitHub asks you to sign in, sign in. It may ask for your 2FA code.
  2. Check that it shows your username, then click Continue.
  3. If GitHub shows a list of permissions, click Authorize Visual-Studio-Code.
  4. Your browser asks to open Visual Studio Code. Click Open.
A GitHub page asking you to select the user to authorize Visual Studio Code, with a Continue button.
2025 captureGitHub asks which account to connect. Check the username before you continue.

Pick a theme and get started

On a new install, the welcome window now asks what it should look like. If you have used VS Code before, you will not see this. Skip to the next step.

  1. Pick any colour theme. You can change it later.
  2. Click Get Started.
The Make It Yours window showing six colour themes and a highlighted Get Started button.
The screenshots in this guide use the dark theme. A light theme works the same way.

Find your way around

You will use six places in the VS Code window. Find each one now.

The VS Code window with six labelled areas: Explorer, Source Control, Extensions, Accounts, Sign In and Chat.
The icons down the left edge are called the Activity Bar.
1 ExplorerThe files in your project.
2 Source ControlSaves versions of your work and sends them to GitHub.
3 ExtensionsAdd-ons for VS Code. You install two in part 6.
4 AccountsShows which GitHub account is signed in.
5 Sign InOnly shows while you are signed out.
6 ChatGitHub Copilot. Part 12 covers it. Close it with the X if you want more room.

Two shortcuts worth learning today

  • Cmd + Shift + P opens the Command Palette. Type what you want to do and VS Code finds the command.
  • Ctrl + ` opens the Terminal at the bottom of the window. The ` key is above Tab.
  • Ctrl + Shift + P opens the Command Palette. Type what you want to do and VS Code finds the command.
  • Ctrl + ` opens the Terminal at the bottom of the window. The ` key is above Tab.

Check you are signed in

  1. Click the Accounts icon at the bottom left.
  2. You should see your GitHub username with (GitHub) after it.
  3. The blue Sign In button at the top right should be gone.
The Accounts menu in VS Code with npuckett (GitHub) at the top.
Your username, followed by (GitHub).

You are done with this part when

  • VS Code opens from your Applications folder or Start menu.
  • The Accounts menu shows your GitHub username.

Install Git

Git is the program that records versions of your files. GitHub is the website that stores them online. VS Code uses Git behind its buttons, but Git does not come with VS Code. GitHub Desktop has its own private copy that VS Code cannot use. So you install Git once, for everything.

  • 5 to 15 minutes
  • Uses the Terminal, briefly

Check if you already have Git

  1. In VS Code, open the Terminal. Use the menu Terminal, then New Terminal.
  2. Type this and press Enter.
git --version

If it answers with a version number, such as git version 2.50.1, you have Git. Skip the next step.

Install Git

On a Mac, Git comes with Apple's Command Line Developer Tools. When you ran git --version, macOS should have offered to install them.

  1. In the window that appeared, click Install, then Agree.
  2. Wait. The download is large and can take 5 to 15 minutes.
  3. When it finishes, close the Terminal panel in VS Code and open a new one.
  4. Run git --version again. You should now see a version number.

If no window appeared, run this command to ask for the tools.

xcode-select --install
  1. Go to git-scm.com/install/windows and click Click here to download.
  2. Run the installer. It asks many questions. Keep every default and click Next each time.
  3. One exception. When it asks for the default editor, choose Use Visual Studio Code as Git's default editor.
  4. When it finishes, close VS Code completely and open it again.
  5. Open a new Terminal and run git --version. You should now see a version number.
The Git for Windows install page with a Click here to download link at the top.
Use the first link, Click here to download.

Check Git knows who you are

Git writes your name and email on every version you save, and refuses to save anything without them. GitHub Desktop set them for you in part 3. Check that it worked.

  1. Run this in the Terminal.
git config --global --list
  1. Look for two lines that start with user.name= and user.email=. If both are there, you are done.
One or both are missing

The simplest fix is in GitHub Desktop. Open its settings, choose Git, fill in your name and email, and click Save. On a Mac the settings are under the GitHub Desktop menu. On Windows they are under File, then Options.

Or set them with two commands. Change the name and the email inside the quotes to your own. Use the same email as your GitHub account.

git config --global user.name "Your Name"
git config --global user.email "you@ocadu.ca"

You are done with this part when

  • git --version prints a version number.
  • git config --global --list shows your name and email.

Add two extensions

Extensions add features to VS Code. A few years ago a setup like this needed a long list of them. Now most of what you need is built in, including Git, GitHub sign-in and Copilot. You add two.

  • About 5 minutes
ExtensionByWhat it does
p5.js 2.x Project GeneratorIrtizaNasarCode suggestions for p5.js 2. It is the one the p5.js website recommends.
Live ServerRitwick DeyRuns your sketch in a browser and reloads it every time you save.

Install p5.js 2.x Project Generator

  1. Click the Extensions icon in the Activity Bar. It looks like four squares.
  2. In the search box, type p5.js 2.x Project Generator.
  3. Find the one by IrtizaNasar. Click its blue Install button.
  4. If VS Code asks whether you trust the publisher, click Trust Publisher & Install.
The Extensions search results with p5.js 2.x Project Generator by IrtizaNasar at the top and an Install button.
Check the author name under the title. Several extensions have similar names.

Install Live Server

  1. In the Extensions search box, type Live Server.
  2. Find the one by Ritwick Dey. It has tens of millions of installs.
  3. If it shows a gear icon instead of Install, you already have it.
  4. If not, click Install.
The Extensions search results with Live Server by Ritwick Dey at the top.
Live Server by Ritwick Dey is the first result. The others are different tools.

Check your list

  1. In the Extensions search box, type @installed.
  2. You should see both. Extensions you had before will be listed too.
The Extensions panel filtered to installed extensions, listing Live Server and p5.js 2.x Project Generator.
Typing @installed in the search box shows only what you have.
Install both from the Terminal instead

This does the same thing as the steps above. Paste it into the Terminal in VS Code and press Enter.

code --install-extension Irti.p5js-project-generator --install-extension ritwickdey.LiveServer

Get the starter project

The starter is the same setup you know from the web editor. An index.html that links p5.js and p5-phone, and a blank sketch.js with only setup() and draw(). You make your own copy on GitHub, switch on its web page, then bring it down to your laptop.

  • About 10 minutes

Make your own copy of the template

  1. Make sure you are signed in to github.com in your browser.
  2. Open the template: github.com/DigitalFuturesOCADU/atelier1-f26-simpleStart-p5.
  3. Click the green Use this template button, then Create a new repository.
  4. Under Owner, choose your own account.
  5. Type a Repository name. Keep it short, lowercase, with hyphens instead of spaces. For example my-phone-sketch.
  6. Leave it set to Public. Leave Include all branches off, and ignore the Copilot box at the bottom.
  7. Click Create repository.
The template repo on GitHub with a highlighted green Use this template button at the top right.
The button only shows when you are signed in to GitHub.
GitHub's Create a new repository form, started from the template. Owner and Repository name, the Public setting and the Create repository button are highlighted.
Three things matter: the owner and name, Public, and Create repository. Leave everything else as it is.

Switch on GitHub Pages

GitHub Pages is the free web hosting that comes with GitHub. You switch it on once for each new repo. GitHub does not copy this setting from the template.

  1. In your new repo, click Settings in the row of tabs at the top.
  2. Click Pages in the list on the left.
  3. Under Build and deployment, leave Source on Deploy from a branch.
  4. Under Branch, choose main, leave the folder on / (root), and click Save.

In about a minute, the top of this page says Your site is live at, with your address. From now on, every push publishes your sketch again.

Clone it to your laptop

There are two ways to do this. They give exactly the same result, a folder on your laptop that stays connected to GitHub. Use whichever you know. If you learned Git with GitHub Desktop, use option B.

Option A: clone in VS Code

  1. In VS Code, click the Source Control icon in the Activity Bar.
  2. Click Clone Repository.
The Source Control panel with Open Folder and a highlighted Clone Repository button.
If you do not see these buttons, a folder is already open. Use File, then New Window.
  1. At the top of the window, click Clone from GitHub.
A box at the top of the VS Code window with one choice highlighted: Clone from GitHub.
  1. If VS Code says The extension 'GitHub' wants to sign in using GitHub, click Allow and approve it in your browser, as you did before.
  2. A list of your repos appears. Choose the one you just made. It looks like your-username/my-phone-sketch.
  3. Choose where to keep it. Select your Documents/GitHub folder. Make it first if it does not exist. Click Select as Repository Destination.
  4. When VS Code asks Would you like to open the cloned repository?, click Open.

Option B: clone with GitHub Desktop

  1. On your repo's page on github.com, click the green Code button, then Open with GitHub Desktop. Your browser asks to open GitHub Desktop. Allow it.
A GitHub repo page with the green Code button open and Open with GitHub Desktop highlighted.
2025 captureYou can also start inside GitHub Desktop with File, then Clone Repository, and pick the repo from the GitHub.com tab.
  1. GitHub Desktop opens a Clone a Repository window. Check the Local Path. It should end in Documents/GitHub/ followed by your repo's name. Use Choose... if it does not.
  2. Click Clone.
GitHub Desktop's Clone a Repository window. The Local Path ends in Documents, GitHub and the repo name. The Clone button is highlighted.
2025 captureThe Local Path is where the project will live on your laptop.
  1. Now open that folder in VS Code. In GitHub Desktop, use the Repository menu, then Open in Visual Studio Code. Or in VS Code, use File, then Open Folder, and choose the folder inside Documents/GitHub.

From here on the guide uses VS Code to commit and sync. GitHub Desktop can do both as well, and you can mix them. They are two windows onto the same folder.

Trust the folder

VS Code is careful with folders it has not seen before. Until you say you trust a folder, it opens in Restricted Mode, where Git and your extensions are switched off. This is your own project, so trust it.

  1. If VS Code asks Do you trust the authors of the files in this folder?, click Yes, I trust the authors. You are done.
  2. If you see a bar across the top that says Restricted Mode instead, click Manage in that bar.
A bar across the top of VS Code reading Restricted Mode, with a Manage link.
  1. Click Trust.
The Workspace Trust page with a highlighted Trust button.

You can tell it worked when the bar is gone and the bottom left corner shows a branch name, usually main.

Look at what you have

  1. Click the Explorer icon at the top of the Activity Bar.
  2. Click sketch.js to open it. Then click index.html.
VS Code with the starter project open. The Explorer lists index.html and sketch.js. The editor shows the blank sketch, with only setup and draw.
The same two files you know from the web editor. Ignore the folders that start with a dot for now.
index.htmlThe web page. It links p5.js, p5-phone and your sketch.
sketch.jsYour sketch. It starts blank, as in the web editor. This is the file you will change.
README.mdThe description shown on the repo's GitHub page.
.githubThe publishing instructions for GitHub Pages. Leave it alone.
.vscodeThe list of recommended extensions. Leave it alone.
.agentsTwo skills: notes that teach coding agents about p5.js 2.x and p5-phone. Leave it alone for now.

You are done with this part when

  • Your repo exists at github.com/your-username/your-repo-name.
  • Its Pages setting says Your site is live at, publishing from the main branch.
  • The project is in your Documents/GitHub folder, it is open in VS Code, and you can see sketch.js.

Run it on your laptop

The web editor had a play button. Here, Live Server does that job. It opens your sketch in a browser and reloads it every time you save.

  • About 5 minutes

Start Live Server

  1. In the Explorer, right-click index.html.
  2. Choose Open with Live Server.
  3. Your browser opens at an address like 127.0.0.1:5500.
  4. You should see a grey square on a dark page. That is the blank canvas, the same as a new sketch in the web editor.
The right-click menu on index.html with Open with Live Server highlighted.
2025 captureRight-click index.html, then Open with Live Server.

You can also click Go Live at the right end of the bar along the bottom of the window. While it is running, that button shows Port: 5500. Click it again to stop.

The right end of the bar along the bottom of VS Code with the Go Live button highlighted.
Go Live sits at the right end of the bottom bar.
A browser showing a grey square at the top left of a dark page.
The blank starter sketch. A 400 by 400 grey canvas, exactly like a new sketch in the web editor.

Open the browser console

In the web editor, errors and print() messages appeared below your code. Now they appear in the browser's console.

In Chrome, press Cmd + Option + J.

In Chrome, press Ctrl + Shift + J.

Or use the menu. Click the three dots at the top right of Chrome, then More Tools, then Developer Tools, and choose the Console tab.

Chrome's three-dot menu open, with More Tools and Developer Tools highlighted.
2025 captureThe menu route to the Developer Tools.
VS Code on the left and Chrome on the right with the Console panel open beside the sketch.
2025 captureA good working layout. Code on one side, the sketch and its console on the other.

Change something and save

  1. In sketch.js, find the line background(220);
  2. Change it to a colour. For example background(237, 34, 93);
  3. Save with Cmd + S on a Mac or Ctrl + S on Windows.
  4. Look at the browser. The page reloads and the square changes colour.

You are done with this part when

  • The sketch runs in your browser from VS Code.
  • Saving a change reloads the page.
  • You can find the console.

Publish it to your phone

There is no Save As here, and no sketch-final-v3.js. You save a version with a short message. That is a commit. Then you send your commits to GitHub. That is a push. Each push publishes your page again.

  • About 10 minutes
  • Needs your phone

Commit your change

  1. Click the Source Control icon. It shows a number, which is how many files have changed.
  2. Under Changes you see sketch.js. Click it if you want to see exactly what changed.
  3. Type a short message in the box that describes the change. For example Change the background colour.
  4. Click Commit.
The Source Control panel with a message typed in the box, the Commit button below it, and sketch.js listed under Changes.
Write the message for yourself in three weeks. Say what changed.

The first time, VS Code asks about staging. Click Always. It will then include all your changes every time without asking.

A window reading There are no staged changes to commit. Would you like to stage all your changes and commit them directly? The Always button is highlighted.

Sync with GitHub

The commit is saved on your laptop only. The button now reads Sync Changes with a small number and an up arrow. That is how many commits are waiting to go up.

  1. Click Sync Changes.
  2. The first time, VS Code explains that this will pull and push. Click OK. To skip this message in future, click OK, Don't Show Again instead.
The Source Control panel with a highlighted Sync Changes button showing one commit to send.
A window reading This action will pull and push commits from and to origin/main, with OK, Don't Show Again, Cancel and OK buttons.

Watch it publish

  1. Open your repo on github.com and click the Actions tab.
  2. The top row is the run your push just started. A yellow dot means it is working.
  3. Wait for a green tick. It usually takes under a minute.
The repo's Actions tab with two runs: Change the background colour with a green tick, above Initial commit with a red X.
The green tick is what you are waiting for. This capture is from the old setup: now each run is called pages build and deployment, and there is no red X at the start.

Find your web address

Every repo published with Pages gets an address in this pattern.

https://YOUR-USERNAME.github.io/YOUR-REPO-NAME/
  1. To see yours, go to Settings, then Pages in your repo. The address is at the top with a Visit site button.
  2. Open it on your laptop first to check it works.
The Pages settings showing Your site is live at, followed by the address and a Visit site button.
2025 captureSettings, then Pages, shows the live address.

Open it on your phone

Typing a long address on a phone is slow. Chrome can make a QR code for any page.

  1. With your page open in Chrome on your laptop, click the three dots at the top right.
  2. Choose Cast, save, and share, then Create QR Code.
  3. Point your phone's camera at the code and tap the link.
  4. You should see the same sketch you saw on your laptop, with your change in it.
  5. Add the page to your phone's home screen or bookmarks. The address never changes, so you only do this once per project.
Chrome's menu open to Cast, save, and share, with Create QR Code highlighted at the bottom.
2025 captureChrome's built-in QR code maker.

The loop from now on

This is the whole cycle. You will do it many times a day.

  1. Change your code and save. Check it in the browser on your laptop.
  2. When something works, commit with a message.
  3. Sync to push it to GitHub.
  4. Wait about a minute and refresh the page on your phone.

Workflow 1 is working when

  • Your sketch runs on your phone from your github.io address.
  • A change you make on your laptop shows up on your phone after commit and sync.

How do I know everything is set up?

Four ways to find out, from the quickest to the most thorough. If you set things up a while ago, or you already had VS Code, start here. Each check that fails points you to the part that fixes it.

  • 5 to 10 minutes

The real test: laptop to phone

If this works, workflow 1 is right, whatever else is going on. It uses every piece once.

  1. Open your project in VS Code. Change a colour or a size in sketch.js and save.
  2. In Source Control, type a message and click Commit, then Sync Changes.
  3. Wait a minute. Open your github.io address on your phone and refresh.
  4. Your change is there.
If it stops atGo to
There is no project to openPart 7, Get the starter project
Commit shows an error about user.nameCheck Git knows who you are
Sync asks you to sign in, or failsSign in with GitHub, then Sync fails
The phone shows a 404 pageMy web address shows 404
The phone shows the old versionWait one more minute. Check the Actions tab of your repo for a green tick.

Check by looking

No commands. Look in each place and compare.

In VS Code

Look hereYou should seeIf not
Help, then About. On a Mac, Code, then About Visual Studio CodeVersion 1.125 or newerUpdate it
Accounts icon, bottom leftYour GitHub username followed by (GitHub)Sign in
Extensions, under Installedp5.js 2.x Project Generator and Live Server. Also OpenCode for Copilot Chat if you have started workflow 2Part 6
Source Control icon, with your project openA message box and a Commit buttonA button to download Git means part 5
Bottom bar, left endA branch name, usually mainThe folder is not a Git project. Clone it again into Documents/GitHub
Bottom bar, right endA Go Live buttonNo Go Live button

In GitHub Desktop

Look hereYou should seeIf not
Settings, or Options on Windows. Then AccountsYour GitHub usernameSign in
The same window, under GitYour name and emailType them in and click Save

On github.com

Look hereYou should seeIf not
Settings, Password and authenticationTwo-factor authentication: EnabledTurn it on
Settings, EmailsYour OCAD U address, verifiedAdd it on that page
Your repo, Settings, then PagesDeploy from a branch, main, and "Your site is live at"Switch on Pages
Your repo, Actions tabA green tick on the newest runWatch it publish
Settings, CopilotYour plan. Copilot Free, or Copilot Student once approvedPart 13

On your phone

Your github.io addressYour sketch, with your latest changeMy web address shows 404

Ask the agent to check

Copilot can run the checks for you and explain the results. Open your project in VS Code. Set the Chat to Agent and paste this. It asks permission before each command. None of them change anything.

Check my setup for this course. Run these commands in the terminal one at a time: git --version, git config --global user.name, git config --global user.email, git remote -v, git status -sb, code --version, code --list-extensions, gh auth status. Do not change or install anything. Then give me a short checklist in plain language of what passed and what is missing. I need Git installed, a git name and email set, VS Code 1.125 or newer, a GitHub remote on this folder, and these two extensions: Irti.p5js-project-generator and ritwickdey.LiveServer. The extension ltmoerdani.opencode-copilot-chat and the gh command are optional, so report them but do not count them as failures.

Run the check script

One command that inspects your computer and prints a report. It only reads. It never installs or changes anything. It needs Node.js, which you will also need later in the course.

  1. Open your project in VS Code and open the Terminal.
  2. See if you have Node.js. Run node --version. A version number means yes.
  3. If not, install the LTS version from nodejs.org, then close VS Code and open it again.
  4. Run the check.
npx ocadu-vscode-setup@2

On Windows, type npx.cmd, not npx. The VS Code Terminal on Windows is PowerShell, and PowerShell blocks plain npx with an error that says running scripts is disabled on this system.

npx.cmd ocadu-vscode-setup@2

The first time, it asks Ok to proceed? Press Enter. The report looks like this.

Git
  ✓ git version 2.50.1
  ✓ Name: Sam Student
  ✗ Git does not know your email  MUST
      Run: git config --global user.email "you@ocadu.ca"

Extensions
  ✓ Live Server
  ! p5.js 2.x Project Generator is not installed  SHOULD

This folder
  ✓ Connected to GitHub: sam-student/my-phone-sketch
  ✓ .nojekyll
  · Your page: https://sam-student.github.io/my-phone-sketch/
MUSTThe core setup will not work until this is fixed. Each one prints the fix and a link to the step in this guide.
SHOULDRecommended. Things mostly work without it.
LATEROptional, or only needed for the later parts.

If you have the GitHub CLI signed in, the script also asks GitHub whether Pages is switched on for your repo.

Add models to the Chat

VS Code has a Chat built in. An extension can plug other models into it. This part installs that extension and connects it to OpenCode Go, a subscription that gives one key access to a set of strong open coding models. You choose the model yourself, and these requests do not use your Copilot credits.

  • Optional
  • About 15 minutes
  • Go costs 10 US dollars a month

How it works: all you need is a key

Three pieces connect. The Chat is already in VS Code. An extension teaches the Chat how to talk to OpenCode. An API key proves the requests are yours.

An API key is a long code that starts with sk-. For Go models it is the only thing a tool needs. There is no sign-in inside VS Code. You paste the key once and the models appear.

  • Anyone who has your key can use your account. Their requests count against your subscription. Treat a key like a password. Never put it in your code, a commit, a screenshot or a chat message.
  • Make one key for each place you use it. One called vscode, another for OpenCode later. If one leaks, you delete that one and nothing else breaks.
  • You can share on purpose. If you and a collaborator want to share one subscription, make a separate key, name it after them, and give it to them privately. Their use comes out of the same limits as yours. Delete the key when the project ends.
  • A lost key cannot be shown again. Delete it and make a new one. It takes ten seconds.

Install the OpenCode for Copilot Chat extension

  1. Click the Extensions icon in the Activity Bar.
  2. In the search box, type OpenCode for Copilot Chat.
  3. Find the one by Laksmana Tri Moerdani. Click Install.
The Extensions search results with OpenCode for Copilot Chat by Laksmana Tri Moerdani at the top.
Check the author name. Several extensions have similar names.

Sign in to OpenCode with GitHub

  1. Go to opencode.ai/auth.
  2. Click Continue with GitHub.
  3. GitHub asks you to authorize OpenCode. Check the username and approve.
  4. The OpenCode Console opens. It has a row of tabs along the top. You will use Go and Keys.
The OpenCode sign-in page with two buttons: Continue with GitHub and Continue with Google.
Use GitHub, so this is one less password to keep track of.

Subscribe to Go

  1. In the OpenCode Console, click the Go tab.
  2. Subscribe. It is 10 US dollars a month, paid by card.
  3. When you are subscribed, the Go tab shows three usage bars. Go has limits that reset every five hours, every week and every month. This is where you see how much you have used.
The Go tab of the OpenCode Console for a subscribed account, showing rolling, weekly and monthly usage bars, and a list that begins Get your API key, under Keys.
The Go tab once you are subscribed. It points you to Keys for the next step.

opencode.ai/go lists the models and limits that come with the subscription.

Make an API key

  1. Click the Keys tab.
  2. Under Service Accounts there is one entry with your email address. Click it.
The Keys tab of the OpenCode Console. One service account is listed, named with an email address.
A service account is a holder for keys. You get one automatically.
  1. Click Add API Key.
  2. Name it after where you will use it. Type vscode.
  3. Set Permissions to Inference only. The key can then use models and nothing else.
  4. Copy the key when it is shown. Keep the page open until you have pasted it into VS Code in the next step.
A service account page in the OpenCode Console with a highlighted Add API Key button above a table of keys.
Each key has a name, so you can tell them apart and delete one without touching the others.

Add OpenCode Go in VS Code

  1. Open the Command Palette. Type Chat: Manage Language Models and press Enter. You can also get here from the model menu under the chat box, with Manage Models...
  2. Click Add Models.
The Language Models window with a highlighted Add Models button at the top right.
  1. Choose OpenCode Go from the list. It is there because of the extension you installed in step 2. Do not choose OpenCode Zen.
The Add Models list with OpenCode Go highlighted, above OpenCode Zen.
  1. VS Code asks for a name for this group of models. Press Enter to accept OpenCode Go.
A box titled Group Name, already filled in with OpenCode Go.
  1. Paste your key and press Enter. It shows as dots.
A box titled OpenCode Go API Key with an empty field.
  1. The OpenCode Go models are added to the list in this window. Close it.

Find the models in the Chat

  1. Open the Chat. It is the panel on the right side of VS Code. If it is closed, press Ctrl + Cmd + I on a Mac or Ctrl + Alt + I on Windows.
  2. Click the model menu under the chat box.
  3. Go models show as OpenCode Go / and the model name. If the one you want is not in the short list, open Other Models, or type its name in the search box at the top.
  4. If one is missing, go back to Manage Models... and click the eye icon beside it to show it.
The model menu open above the chat box: a search box, Auto, a few recent models including OpenCode Go / Deepseek V4 Flash Vision Exp with a tick, and Other Models at the bottom.
The rest of the models are under Other Models.

Send a test message

Seeing a model in the list only proves that your key was accepted. Check that it answers.

  1. Choose DeepSeek V4.1 Flash, under OpenCode Go. Any Go model works for this test.
  2. Set the mode to Ask, type Say hello in five words and press Enter.
You getIt means
A replyIt works. These models also work in Agent mode.
An error about an invalid or missing keyMake a new key and repeat step 6.
An error that mentions the free tierYou added OpenCode Zen instead of OpenCode Go. Remove it in Manage Models... and add Go.
An error about a usage limitYou have reached one of Go's limits. The Go tab of the OpenCode Console shows when it resets.
The Chat in Ask mode: the message Say hello in five words, the reply Hello there, glad you're here!, and the OpenCode Go model under the chat box.
A reply means the key and the model both work.

Why should I pay for models if I can use free ones?

You have free options. Copilot gives you a monthly allowance, and OpenCode has free models inside its own app. Free models can handle many tasks, and it is possible to complete the work in this course that way. There are trade-offs.

  • A much smaller selection. Free lists are short and change without notice. The most capable free model on OpenCode right now is Muse Spark 1.3. Copilot's free and student plans pick the model for you.
  • Slower and less reliable. Free models are shared by everyone. Expect slow replies at busy times, daily limits, and sometimes no access at all.
  • Limited in where they run. OpenCode's free models only answer inside the OpenCode app.
  • Your prompts may be used for training. Several free models say so in their terms. Do not send them anything private.
  • You can combine them. A workflow does not need one model for everything. Use a free or cheap model for small edits and explanations, and save a stronger one for planning and for the problems the cheap one could not solve.

Use Copilot Chat in VS Code

The Chat is built into VS Code, and GitHub Copilot powers it. There is nothing to install. Because you signed in with GitHub, you are already on the free plan. If you added OpenCode Go models in the last part, you can use those here too.

  • Optional
  • About 10 minutes

Open the Chat

The Chat panel sits on the right side of the window. If you closed it, open it again.

Press Ctrl + Cmd + I, or click the chat icon next to the search box at the top of the window.

Press Ctrl + Alt + I, or click the chat icon next to the search box at the top of the window.

The bottom of the Chat panel: the chat box, and under it the agent menu set to Agent and the model menu.
The agent menu and the model menu sit under the chat box. Yours may say Auto for the model.

Know the three modes

The first menu under the chat box sets how much the chat is allowed to do.

AskAnswers questions. It does not change your files. Start here.
PlanWrites a step by step plan for a change and waits for you to approve it.
AgentEdits files and runs commands to get a task done. It asks before it runs anything.
The agent menu open, showing Agent, Ask, Plan, and Configure Custom Agent.
Agent, Ask and Plan.

Try Ask

  1. Open sketch.js so the chat can see it.
  2. Set the mode to Ask.
  3. Type a question and press Enter. For example:
Explain what setup and draw do in this sketch, and how often each one runs. Use plain language.

Try Agent, and read what it changed

  1. Set the mode to Agent.
  2. Ask for one small change. For example:
In sketch.js, draw a circle that follows the mouse. Change as little as possible.
  1. The changed lines are marked in the editor. Green lines were added. Red lines were removed. Read them.
  2. Check the result in your browser.
  3. Click Keep if it is what you wanted, or Undo if it is not.
VS Code after an Agent edit: in sketch.js the new ellipse line is green, with Keep and Undo at the bottom of the editor and in the Chat.
Read the green line, check it in the browser, then Keep or Undo.

Know the limits of the free plan

  • Copilot Free gives you 2,000 code suggestions a month and a small monthly allowance of AI Credits for Chat and Agent.
  • Agent mode uses credits much faster than Ask, because it reads files and works in many steps.
  • The free and student plans choose the model for you. The model menu shows Auto.
  • When the credits run out, the Chat stops until next month. Code suggestions as you type keep working.
  • Part 11 adds other models with your own key. Part 13 gets you the student plan and explains exactly what it includes.

Get GitHub student access

Verified students get GitHub Education benefits for free. That includes the GitHub Copilot Student plan. Approval takes a few days, so apply early.

  • Optional
  • About 15 minutes, then a wait of a few days
  • Needs your student ID card

What the student plan gives you

This changed during 2026. Students used to get Copilot Pro. There is now a separate student plan. This is what it includes, as of September 2026.

Copilot FreeCopilot Student
Code suggestions as you type2,000 a monthUnlimited
Chat and AgentA small monthly allowance of AI Credits200 AI Credits a month
Choosing the modelAuto onlyAuto only. Copilot picks the model for each request. You cannot choose one yourself
Agent mode, MCPYesYes
Cloud agent, full code reviewNoYes
Third-party agentsNoNo
  • Credits are spent by use, not by message. A short question in Ask costs very little. A long Agent session that reads many files and runs many steps costs a lot. Some students report using a month of credits in a few days of Agent work.
  • When the credits run out, Chat and Agent stop until the monthly reset. Code suggestions as you type keep working.
  • Models you add with your own key in part 11 do not use these credits. They are billed by whoever you got the key from.

Read it from GitHub, since this keeps changing:

Get your account ready

Most failed applications come from one of these. Check them all before you apply.

  1. School email. Your OCAD U address is added and verified in Settings, Emails.
  2. Two-factor authentication is on. You did this in part 2.
  3. Billing name. Go to Settings, Billing, Payment information. Edit Billing information and enter your name exactly as it appears on your student ID. If you have a single legal name, enter it as both first and last name. You do not need to add a payment method.
  4. Location. Turn off any VPN. Allow your browser to use your location when GitHub asks.
GitHub's payment information page with the Billing information section and its Edit button highlighted.
2025 captureOnly the name in Billing information matters. Leave the payment method empty.

Apply

  1. Go to github.com/settings/education/benefits.
  2. Click Start an application.
  3. Choose Student. Select OCAD University and your OCAD U email.
  4. For proof, take a new photo of your student ID with your camera when the form asks. A live photo is approved more often than an uploaded file. Your name, the school name and a date must be readable.
  5. Click Submit application.
The Education benefits page in GitHub settings with a highlighted button to start the application.
2025 captureThe Education benefits page. The button wording has changed since this was taken.

Switch on Copilot Student once you are approved

GitHub emails you when you are approved. Being approved and getting Copilot Student are two separate things. The benefits can take a few more days to apply, and you then switch Copilot on yourself.

  1. Go back to github.com/settings/education/benefits.
  2. Under Free GitHub developer resources for students and teachers, click Learn more.
  3. Follow the prompts to activate Copilot Student.
  4. If you cannot find it, try github.com/github-copilot/free_signup.
  5. Check Settings, Copilot. It should name your plan as Copilot Student.
  6. Restart VS Code so it picks up the new plan.

Install OpenCode

OpenCode is a coding agent. It works in the same project folder as VS Code. You describe a change, it reads and edits your files and runs commands, and you check the result. The app is free. You only pay if you choose a paid model.

  • About 15 minutes
  • Install Git first

Check if you already have it

Look for OpenCode in your Applications folder.

Look for OpenCode in the Start menu.

  1. If it is there, open it.
  2. Open Settings. Press Cmd + , on a Mac or Ctrl + , on Windows.
  3. Click About. The version should start with 2. If it starts with 1, install the new app in the next step.

Download and install

  1. Go to opencode.ai/download.
  1. Check your chip. Open the Apple menu, then About This Mac. If the chip starts with Apple, choose macOS (Apple Silicon). If it says Intel, choose macOS (Intel).
  2. Open the downloaded file. Drag OpenCode into the Applications folder.

Use the download page, not Homebrew. brew install --cask opencode-desktop still installs version 1.

  1. Choose Windows (x64). Most Windows laptops need this one.
  2. Open the downloaded file. It installs for your user account only.

The download is about 230 MB. Do it at home, not on the class Wi-Fi.

The desktop downloads on opencode.ai/download: macOS (Apple Silicon), macOS (Intel), Windows (x64), Linux (.deb) and Linux (.rpm), each with a Download button.
Pick the one for your computer.

Open it the first time

  1. Open OpenCode. On a Mac, if it asks whether you want to open an app downloaded from the internet, click Open.
  2. It opens a project called Default Project, a new empty folder in Documents. Leave it. You add your own project in part 16.
  3. Nothing else to set up yet. OpenCode comes with a few free models, so it works without an account.
OpenCode on first launch: a Session tab, the OpenCode logo, an empty prompt box with Space Bunny Free, and Default Project with No Git underneath.
First launch. Default Project and No Git mean none of your projects is open yet.

You are done with this part when

  • OpenCode opens, and Settings, About shows a version that starts with 2.

Sign in with the GitHub CLI

gh is GitHub as a Terminal command. OpenCode runs commands in its own Terminal, which does not share the sign-in of VS Code or GitHub Desktop. Signing in with gh gives that Terminal your GitHub login, so the agent can push to GitHub as you.

  • About 10 minutes
  • Install Git first

Install it

If you have Homebrew, run this in the Terminal.

brew install gh

If you do not have Homebrew, download the macOS installer from cli.github.com. macOS may block it the first time. Open System Settings, then Privacy & Security, scroll down and click Open Anyway.

Run this in the Terminal. Then close VS Code and open it again.

winget install --id GitHub.cli --source winget
The GitHub CLI home page with an install command and a Copy button.
cli.github.com has installers for every system.

Sign in

  1. Run the command below. It asks a few questions. Use the arrow keys and Enter to answer.
gh auth login
QuestionAnswer
Where do you use GitHub?GitHub.com
Preferred protocolHTTPS
Authenticate Git with your GitHub credentials?Yes. This is the part that lets agents push.
How would you like to authenticate?Login with a web browser
  1. It shows a short code. Copy it and press Enter. Your browser opens.
  2. Paste the code, check the username, and click Authorize github.
  3. Check it worked with the command below.
gh auth status

Start a new project in one go

These three commands do everything in part 7. They copy the template, clone it, and switch on Pages. Change my-next-sketch to your project's name. Run them one at a time from your Documents/GitHub folder, so the new project lands beside your others.

gh repo create my-next-sketch --template DigitalFuturesOCADU/atelier1-f26-simpleStart-p5 --public --clone
cd my-next-sketch
gh api -X POST "repos/{owner}/{repo}/pages" -f "source[branch]=main" -f "source[path]=/"

Then open the folder in VS Code with code . and carry on from part 8.

You are done with this part when

  • gh auth status says you are logged in to github.com with your own account.

Open your project in OpenCode

OpenCode works on one folder at a time. That folder is the project. Open the same repo you cloned in part 7, and OpenCode and VS Code work on the same files.

  • About 5 minutes

Add your project

  1. Click Home, the grid icon at the left end of the tab bar.
  2. Next to Projects, click the Add project button, a small folder with a plus. You can also use the File menu, then Open Project.
  3. Go to your Documents/GitHub folder and choose your repo's folder. Choose the folder itself, not a file inside it.
The Home tab with Projects on the left. The Add project button, a folder with a plus, is highlighted next to Projects.
Add project is the small folder icon next to Projects.

Check it found Git

  1. Start a new session in your project.
  2. Look under the prompt box. Next to the project name it shows a branch name, usually main.

If it says No Git instead, you chose the wrong folder, or Git is not installed. See OpenCode says No Git.

The prompt box of a new session. Underneath it: my-phone-sketch, Local, and the branch name main, highlighted.
Set up: your repo is open and the branch name main shows under the prompt box.
The same place showing Default Project and No Git, highlighted.
Not set up yet: No Git means the folder is not a Git repo. Here it is Default Project.

Use it next to VS Code

Keep VS Code open on the same folder. The agent's changes show up in VS Code and in GitHub Desktop, because all three look at the same files.

  • Save in VS Code before you send a prompt. If a file has unsaved changes and the agent changes it too, VS Code asks which version to keep.
  • Commit before you ask for a change. Then every change the agent makes is easy to see in Source Control, and easy to undo.
  • Leave Live Server running. It reloads the page when the agent saves a file, so you watch the change arrive.

You are done with this part when

  • Your repo is listed under Projects on the Home tab.
  • A new session in it shows a branch name, not No Git.

Set it up and test it

One setting, one model, and one test prompt. The test checks every piece of the setup at once.

  • About 10 minutes

Show the agent menu

OpenCode has two main agents, Plan and Build. The menu to switch between them is hidden until you turn it on. Until then everything runs as Build.

  1. Open Settings with Cmd + , on a Mac or Ctrl + , on Windows.
  2. Click Preferences.
  3. Turn on Show agent.

An agent menu now appears under the prompt box, next to the model menu.

Settings, Preferences, with the Show agent row highlighted and its switch turned on.
Show agent, switched on.

Choose a free model

  1. Click the model menu under the prompt box.
  2. Under Free models provided by OpenCode, choose MiMo-V2.6-Flash Free. It can read images. What you send to it may be used to improve the model, so do not paste anything private.

The free models change often. If MiMo-V2.6-Flash Free is gone, choose Space Bunny Free or LongCat 2.5 Preview Free. Those two do not keep your data. Or choose any free model whose details say it allows images. Hover over a model to see its details.

The Select model window. Free models provided by OpenCode lists LongCat 2.5 Preview, Space Bunny, MiMo-V2.6-Flash, Muse Spark 1.3, Ling 3.0 Flash Fin, Nemotron 3.5 Lightning, Nemotron 3 Ultra and Big Pickle, each tagged Free. Space Bunny is highlighted.
The free models in September 2026. The list changes.

Send the test prompt

  1. In the agent menu, choose Plan. Plan reads and explains. It does not change your files.
  2. Paste this and press Enter.
Check that this project is set up. Tell me: which folder you are working in, what files are here, which versions of p5.js and p5-phone index.html loads, whether this folder is a Git repository and where it pushes to, and which GitHub account gh auth status reports. Do not change anything.
  1. If it asks permission to run a command, read what it wants to run, then click Allow once. Plan often runs these read-only checks without asking.
If the answer includesThen this works
Anything at allThe model is connected.
Your repo's folder, with index.html, sketch.js and README.mdThe project is your repo, not Default Project.
p5.js 2.3.2 and p5-phone 1.15.0It can read your files.
An address like github.com/your-username/your-repoGit is installed and the repo is connected to GitHub.
Your GitHub usernameThe GitHub CLI is installed and signed in.

If one line is missing, the table tells you which part to go back to.

OpenCode's answer to the test prompt: the folder Documents/GitHub/my-phone-sketch, a table of the files including .agents/skills, p5.js 2.3.2 and p5-phone 1.15.0, the Git remote on github.com, and gh logged in as npuckett.
A good answer covers every line of the table below. Yours shows your own folder and username.

You are done with this part when

  • The agent menu shows Plan and Build.
  • The test prompt got an answer with every line in the table.

Find your way around OpenCode

What is on the screen, the commands worth knowing, and the settings. Shortcuts are shown for a Mac. On Windows, use Ctrl where it says Cmd.

  • About 10 minutes

The screen

WhereWhat it isShortcut
Tabs along the topLike a browser. Home is the grid icon at the left. Each session opens in its own tab.Cmd + T new tab
HomeProjects on the left. Sessions on the right, grouped Today, Yesterday and Older.
The prompt boxWhere you write. Type / for commands and @ to point at a file. Start with ! to run a Terminal command. You can drop an image or a file on it.
Agent menuPlan or Build.Cmd + .
Model menuWhich model answers. You can change it in the middle of a session.Cmd + '
Effort menuHow long the model thinks before it answers. Only appears when the model has more than one level.Shift + Cmd + D
The timelineWhat the agent did: what it thought, the files it read, the commands it ran, the edits it made.
Review and filesA side panel. Review shows every change as a diff: green lines added, red lines removed.Cmd + Shift + R
Context meterHow full the session's memory is, in tokens, and what it has cost. Click it for the details.
Permission requestAppears when the agent wants to do something it needs to ask about. Allow once, Allow always or Deny.
TerminalA Terminal inside OpenCode, in the project folder.Ctrl + `
A Build session on the left that added one line to sketch.js. On the right, the Review panel shows Git changes: sketch.js, with the new ellipse line in green.
The session on the left, the Review panel on the right. Green is the line the agent added.

Commands to know

Type these in the prompt box.

CommandWhat it does
/newStarts a new session. New task, new session.
/undo and /redoTakes back the last message, and the file changes it made. Needs Git.
/modelChanges the model.
/agentChanges the agent.
/connectConnects a model provider, such as OpenCode Go.
/initWrites an AGENTS.md file that describes your project for future sessions. It creates a file, so commit first.
/compactSummarizes a long session to free up its memory. Details get lost. A new session is often better.

Read and undo a change

Build changes your files without asking first. That is why you commit before each request. After it finishes:

  1. Open Review, or look at Source Control in VS Code. Read every change.
  2. Look at the result in Live Server, or on your phone.
  3. If you want to keep it, commit it. That is your "accept".
  4. If you do not, type /undo. In VS Code you can also use Discard Changes in Source Control.

Let it look at your sketch

OpenCode has its own browser, in the panel on the right. The agent can open your sketch there, take a screenshot, and read the console, the same way you would. Nothing to install.

  1. Start Live Server in VS Code, or use your Pages address.
  2. Ask: Open http://127.0.0.1:5500 in the browser. Take a screenshot, tell me what you see, and tell me if the console shows any errors. Do not change any files. Use your own address.
  3. The page opens in a tab in the right panel. Keep the OpenCode window visible while it works. Screenshots only work on a tab you can see.
OpenCode with a session on the left, where the agent reports the local preview loaded with no console errors and matches the published page. On the right, a browser tab at 127.0.0.1:5507 shows the magenta square.
The agent opened the local preview in its own browser, compared it with the Pages version, and found no errors.

Add it to your requests: "Then open it in the browser and check it." The agent can now check its own work before you do.

The settings page

Open it with Cmd + ,. These are the pages you will use.

PageWhat is there
PreferencesShow agent. Auto-accept permissions: leave it off. How much detail the timeline shows. Check for updates.
AppearanceLight or dark, and the theme.
NotificationsA sound or a notice when the agent finishes or needs you.
ShortcutsEvery keyboard shortcut. You can change them.
ProvidersWhere you connect model providers, such as OpenCode Go.
ModelsWhich models appear in the model menu. Hide the ones you do not use.
ExtensionsSkills, MCP servers and plugins.
AboutThe version number. Include it when you ask for help.
The OpenCode settings page. The list on the left: Preferences, Appearance, Notifications, Shortcuts, Pairing, Projects, Worktrees, Providers, Models, Extensions, Server, About. Preferences is open.
The settings page, open on Preferences.

Words you will see

Six words for the things on the screen, and six more that come up soon. You do not need to learn them all today.

  • About 5 minutes

The six on the screen

WordWhat it meansWhere you see it
HarnessThe program around the model. It builds each request, runs the tools the model asks for, checks permissions and keeps the sessions. The model thinks. The harness acts.OpenCode itself. The Chat in VS Code is another harness.
ProjectThe folder the agent works in. It only sees this folder.Projects on the Home tab. The branch name under the prompt.
SessionOne conversation, with its own memory. New task, new session. Your files are the memory that lasts.Sessions on the Home tab. Each opens in a tab.
AgentA role with its own permissions. Build reads, edits and runs commands. Plan reads and plans, and does not edit your files.The agent menu.
ModelThe AI that does the thinking. Models come from different makers, cost different amounts, and some can read images.The model menu. Hover for details.
EffortHow long the model thinks before it answers. OpenCode calls the levels variants. Higher is slower and uses more of your allowance, and it helps on hard problems.The effort menu, next to the model.

Six more, soon

ProviderWho supplies the model. OpenCode Go is one. There are more than 75.
ContextThe session's working memory. Everything the agent reads and writes fills it. A full context thinks worse.
CompactionThe summary OpenCode makes when the context is full. Details blur.
AGENTS.mdA file of standing instructions, read at the start of every session.
SkillA folder of notes the agent reads when it needs them. Your starter project has two, in .agents/skills: one for p5.js 2.x and one for p5-phone.
PermissionWhat the agent may do without asking you first.

Add OpenCode Go

OpenCode Go is a subscription to a set of stronger models. It is optional. The free models are enough to start.

  • Optional
  • About 10 minutes
  • Go costs 10 US dollars a month

Subscribe

If you already subscribed for VS Code in part 11, skip this step. It is the same subscription.

  1. Sign in to the OpenCode Console with GitHub, as in Sign in to OpenCode.
  2. Subscribe on the Go tab, as in Subscribe to Go.

Each account has its own subscription. You cannot share one by signing in as someone else.

Connect it in OpenCode

  1. Type /connect in the prompt box. You can also open the model menu and click OpenCode Go under Add more models, or open Settings, then Providers.
  2. Choose OpenCode Go.
  3. Your browser opens. Check that the code in the browser matches the code in OpenCode, then confirm.
  4. OpenCode shows Connected to OpenCode Go. Choose a model to start with.

If the browser sign-in does not work, click Use API key instead. Make a key in the Console as in Make an API key, name it opencode, and paste it. One key for each place you use it.

The Select model window with OpenCode Go highlighted under Add more models from popular providers.
OpenCode Go is also in the model menu, under Add more models.

Choose a model

Go has more than 30 models. They are not equal. The scarce ones are stronger, and use up your allowance much faster.

KindRequests every 5 hours, roughlyUse it forExamples in September 2026
Scarce100 to 200Planning, and problems the others could not solveKimi K3, Qwen3.8 Max, Grok 4.7
Strong900 to 2,000Harder buildingKimi K2.7 Code, DeepSeek V4 Pro, GLM-5.2
Workhorse3,000 to 6,500Most buildingMiniMax M3, GPT 6 Luna, GLM-5.3-Flash
Volume11,000 and upSmall edits and choresDeepSeek V4.1 Flash, MiMo-V2.6-Flash
  • A good everyday choice: DeepSeek V4.1 Flash. It reads images, holds a lot, and rarely runs out.
  • For a plan: Kimi K3. Spend it on the plan, not on small edits.
  • One request is not one message. The agent makes a request for every step it takes. One task can use dozens.

The list changes. opencode.ai/go has the current models and limits. Hide the ones you do not use in Settings, Models.

Know the limits

  • Limits reset every 5 hours, every week and every month.
  • The Go tab of the OpenCode Console shows how much you have used.
  • When you reach a limit, OpenCode shows Go limit reached. The free models still work until it resets.

Test on your phone without publishing

Publishing takes about a minute per change. VS Code can also give your phone a temporary secure address straight to Live Server on your laptop, so a save shows up on the phone in a second. It is called port forwarding. It needs nothing installed.

  • Optional
  • About 5 minutes

Forward Live Server's port

  1. Start Live Server and note the port number at the bottom right. It is usually 5500.
  2. Open the bottom panel with View, then Terminal. Click the Ports tab.
  3. Click Forward a Port, type 5500 and press Enter.
  4. If VS Code asks to sign in with GitHub, click Allow.
The Ports tab in the bottom panel of VS Code with a highlighted Forward a Port button.
2025 captureThe Ports tab sits beside Terminal.

Make it public

A forwarded port starts out private, which means only you, signed in to GitHub, can open it. A phone is simpler with a public address.

  1. Right-click the row for port 5500.
  2. Choose Port Visibility, then Public.
  3. VS Code warns you that anyone with the address can open it. Click Continue.
The right-click menu on a forwarded port with Port Visibility and Public highlighted.
2025 captureRight-click the port to change its visibility.
A warning window about making a port public, with Continue and Don't show again buttons.
2025 capture

Open it on your phone

  1. In the Ports tab, hover over the forwarded address and click the globe icon to open it in Chrome.
  2. Make a QR code for it, as in part 9, and scan it with your phone.
  3. The first visit shows a Microsoft page that asks you to confirm. Tap Continue.
VS Code beside Chrome, where a QR code for the forwarded address is shown.
2025 capture

Fix common problems

Find the message you are seeing in the list of steps. If yours is not here, copy the exact wording and bring it to class.

Source Control says Git is not installed

The panel shows a Download Git button instead of your files. Do part 5. Then close VS Code completely and open it again. VS Code only looks for Git when it starts.

"Make sure you configure your user.name and user.email in git"

Git does not know who you are yet. Open GitHub Desktop, go to its settings, choose Git, and fill in your name and email. Or use the two commands in Check Git knows who you are. Then click Commit again.

My github.io address shows a 404 page

  • Check the address. It needs your exact username and your exact repo name. Capital letters matter in the repo name.
  • Check Settings, then Pages. It should publish from a branch: main, / (root). If it does not, see Pages is not switched on, which has a prompt that does it for you.
  • Check the Actions tab. The newest run needs a green tick. If it has a red X, open it and click Re-run all jobs.
  • Check the repo is Public. It says so beside the repo's name.
  • A brand new site can take a few minutes to appear the first time.

Pages is not switched on

GitHub does not copy the Pages setting from the template, so a new copy has Pages off. Your github.io address shows a 404, and pushing does not publish anything.

  • By hand: Settings, then Pages. Source: Deploy from a branch. Branch: main, / (root). Click Save. This is part 7.
  • Or ask the agent. In OpenCode, or VS Code's Chat set to Agent, open your project and paste this. It needs the GitHub CLI signed in, from part 15.
Turn on GitHub Pages for this repo so it publishes from the main branch. Use the GitHub CLI. Run gh api -X POST "repos/{owner}/{repo}/pages" -f "source[branch]=main" -f "source[path]=/". If it says Pages is already enabled, run gh api -X PUT "repos/{owner}/{repo}/pages" -f build_type=legacy -f "source[branch]=main" -f "source[path]=/" instead. If the file .github/workflows/static.yml exists, delete it, then commit and push that change. Then find the newest run with gh run list --limit 1, follow it with gh run watch and its ID, and when it finishes tell me the Pages address from gh api "repos/{owner}/{repo}/pages" --jq .html_url.

In the Actions tab you may see a run marked cancelled just before the green one. That is normal. The next push replaced it.

Sync fails, or the push is rejected

This happens when GitHub has a change your laptop does not, for example if you edited a file on github.com. Click Sync Changes again. Sync pulls before it pushes, which usually fixes it. If VS Code reports a merge conflict, stop there and ask for help. Your work is safe.

VS Code is signed in as the wrong person

Click Accounts, then the username, then Sign Out. Before you sign in again, open github.com in your browser and check which account is signed in there. VS Code connects to whichever account the browser is using.

The browser never returns to VS Code after I approve

Your browser blocked the link that opens VS Code. Look for a small prompt near the address bar asking to open Visual Studio Code, and allow it. If there is none, go back to VS Code, cancel the sign-in, and start again. Chrome is the most reliable browser for this step.

There is no Go Live button

  • Live Server is not installed. See Install Live Server.
  • Or no folder is open. Go Live only appears when a project folder is open, not a single file.
  • Or the window is in Restricted Mode. Look for a bar across the top. See Trust the folder.

Live Server shows a different project, or will not start

Another VS Code window is already using port 5500. Find that window, click Port: 5500 in its bottom bar to stop it, then click Go Live in the window you want.

My sketch uses motion, but tilting the phone does nothing

  • Tap the screen once. Phones only give a page motion data after a tap and your permission.
  • The address must start with https. Your github.io address does.
  • On an iPhone, if you tapped Deny earlier, close the tab completely and open the page again to be asked once more.

Windows says "running scripts is disabled on this system"

You typed a command such as npx or npm in the VS Code Terminal on Windows. That Terminal is PowerShell. By default, PowerShell refuses to run the small script files that Node.js uses for these commands.

Quick fix for one command. Add .cmd to the command name. For example npx.cmd ocadu-vscode-setup@2 or npm.cmd install.

Fix it for good. Run this once in the Terminal. It lets PowerShell run scripts you created on your own computer, and scripts from the internet only if they are signed. It only changes the setting for your Windows account.

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

If it asks you to confirm, type Y and press Enter. Then close the Terminal, open a new one, and run your command again.

Or use Command Prompt instead of PowerShell. In the Terminal panel, click the small arrow next to the + and choose Command Prompt. Plain npx works there.

The Terminal says "code" is not found

Inside VS Code's own Terminal, code always works. In a separate Terminal app it needs one more step.

Open the Command Palette, type Shell Command: Install 'code' command in PATH and press Enter.

Close every Terminal window and open a new one. If it still fails, run the VS Code installer again and leave Add to PATH ticked.

OpenCode says No Git

Under the prompt box it says No Git instead of a branch name, and the Review panel is empty.

  • You may have opened the wrong folder, such as Default Project. Add your repo's folder from Documents/GitHub as in Add your project.
  • Git may not be installed. Do part 5, then quit OpenCode completely and open it again.

There is no Plan in OpenCode

The agent menu is hidden until you turn it on. Open Settings, then Preferences, and turn on Show agent. Pressing Tab does not switch agents in the app. That tip comes from the version 1 help pages.

The agent cannot push to GitHub

You asked the agent to push, and it failed or asked for a username and password. The agent pushes from its own Terminal, which does not share the sign-in of VS Code or GitHub Desktop. Do Sign in in the GitHub CLI part, answer Yes to "Authenticate Git with your GitHub credentials?", then ask again. You can always push yourself with Sync Changes in VS Code.

OpenCode says Free limit reached

The free models allow about 200 requests a day, counted per internet connection. On a shared network, such as the school Wi-Fi, everyone on it may share that count. It resets once a day. Try another free model, try later, or use OpenCode Go.

The OpenCode help pages do not match the app

You are probably reading the version 1 pages at opencode.ai/docs. The app is version 2. Use opencode.ai/v2/docs.

OCAD University · Digital Futures. Screenshots show VS Code 1.138, September 2026. VS Code updates every week, so a button may move or be reworded. If something here no longer matches what you see, tell your instructor.