Step 1 — Get a GitHub Copilot licence
OpenCode uses GitHub Copilot as its AI model provider. You need an active licence before you can connect — there are two ways to get one:
If you're using OpenCode at work:
- Check whether your organisation already has a Copilot Business or Enterprise subscription — ask IT, your manager, or check internal docs
- If yes, request a seat through your usual software request process
- Once granted, the licence is activated on your work GitHub account
If you're using OpenCode personally:
- Go to github.com/features/copilot
- Click Get Copilot and choose the Individual plan (free trial available)
- Sign in with your personal GitHub account and complete checkout
Step 2 — Download OpenCode
Go to opencode.ai/download and download the OpenCode Desktop app for your system:
- Mac (Apple Silicon) — most Macs from 2020 onwards (M1, M2, M3, M4 chips)
- Mac (Intel) — older Macs
- Windows (x64) — most Windows laptops
Not sure which Mac you have? Click the Apple menu → About This Mac. If it says "Apple M1" (or M2, M3, M4) choose Apple Silicon. If it says "Intel" choose Intel.
Step 3 — Open OpenCode
There are two ways to use OpenCode — pick whichever feels right for you. Both do the same thing.
Option A: OpenCode Desktop app (recommended if you're new)
Just open it like any other app on your Mac or Windows machine. It installs to your Applications folder and launches with a clean interface. No terminal needed.
Option B: Terminal (macOS)
Some people prefer to run OpenCode directly from the Mac Terminal — it gives you a bit more control and is worth trying once you're comfortable. To do this:
- Open Terminal (search for it in Spotlight with
Cmd+Space) - Navigate to your working folder — e.g.
cd ~/Desktop/OpenCode - Type
opencodeand hit Enter
Step 4 — Connect GitHub Copilot
When you open OpenCode for the first time you need to connect it to your Copilot licence.
In the Desktop app:
- Open OpenCode Desktop
- Go to Settings → Providers
- Find GitHub Copilot and click Connect
- OpenCode will show you a short code and a URL — go to github.com/login/device and enter the code
- Sign in with your GitHub account and authorise
- GitHub Copilot will now appear as connected — you can select your model from the model toggle at the bottom of the screen
In the Terminal:
- Type
/connectand hit Enter - Search for and select GitHub Copilot
- Go to github.com/login/device and enter the code shown
- Sign in with your GitHub account and authorise
- Run
/modelsto confirm it's connected and select a model
Step 5 — Start your first session
OpenCode works from a folder on your computer — everything in that folder becomes available as context for your session.
- Create a folder for your OpenCode work — e.g. a folder on your Desktop called
OpenCode - Open OpenCode and navigate to that folder, or open the folder first and launch OpenCode from there
- Type
/init— this analyses the folder and sets up OpenCode for it - Ask it something — you're ready to go
Ctrl+P — open the command palette (shows everything OpenCode can do)/models — switch AI model/undo — revert the last change OpenCode made/share — generate a shareable link to your current conversation
Where your settings live
OpenCode reads its settings from two places: a global file that applies to everything you do, and an optional project file inside a specific folder that only applies when you're working in that folder.
Global settings live in:
~/.config/opencode/opencode.jsonc (Mac & Linux)
%USERPROFILE%\.config\opencode\opencode.jsonc (Windows)
This is where things like your connected tools (MCPs), your default permissions, and any plugins you install are kept. New sessions inherit these settings automatically — you don't need to set them up again per project.
Project settings (optional) live in:
<your project folder>/.opencode/opencode.jsonc
If a project folder has its own config file, OpenCode reads the global one and then the project one — project settings override or extend global ones where they overlap. Most people don't need a project config at all; it's only useful if a specific project needs different tools or rules.
One useful habit: have a dedicated session or project (some people use one called "Assistant" or "Setup") for asking OpenCode about itself — config changes, plugin questions, "how does X work". Keep your actual work sessions focused on the work.
What's next
- Building Context Packs — the single biggest thing you can do to improve output quality MCPs / APIs for Context (Read) — connect OpenCode to live tools like your wiki, ticket system, or chat platform