Skip to content
ENT208TC Industry Readiness

OpenCode Desktop + GitHub Copilot


RequirementWhy
GitHub accountRequired for Copilot access β€” create one free at github.com
GitHub Copilot accessFree for verified students via GitHub Education
OpenCode DesktopThe AI coding application β€” download below
10 minutesFull setup from scratch

OpenCode Desktop needs Git to access your repositories. You have two options:

GitHub CLI (gh) includes Git functionality plus GitHub-specific commands. It is simpler to use and has fewer edge cases.

Windows:

Terminal window
winget install GitHub.cli

Or download from: cli.github.com

macOS:

Terminal window
brew install gh

Linux:

Terminal window
sudo apt install gh # Debian/Ubuntu
sudo dnf install gh # Fedora

Verify installation:

Terminal window
gh --version

Authenticate with GitHub:

Terminal window
gh auth login

Follow the prompts:

  1. Choose GitHub.com
  2. Choose HTTPS as protocol
  3. Choose Login with a web browser
  4. Copy the one-time code, press Enter to open browser
  5. Authorize GitHub CLI
  6. Return to terminal β€” it should confirm success

Install Git if you want the complete version control system β€” this is what professionals use.

Windows:

  • Download from: git-scm.com
  • Run installer, accept defaults
  • Git Bash will be available in your right-click menu

macOS:

Terminal window
xcode-select --install

Or: brew install git

Linux:

Terminal window
sudo apt install git # Debian/Ubuntu
sudo dnf install git # Fedora

Verify installation:

Terminal window
git --version

Configure your identity (required):

Terminal window
git config --global user.name "Your Name"
git config --global user.email "your.email@xjtlu.edu.cn"

Authenticate with GitHub:

Terminal window
gh auth login # GitHub CLI works for Git auth too

Download: Go to opencode.ai and download the desktop application for your OS.

Install:

  • Windows: Run the .exe installer
  • macOS: Drag to Applications folder
  • Linux: Use the .AppImage or package manager

First launch: Open OpenCode Desktop. You will see a clean interface with a chat panel and project browser.

[Screenshot placeholder β€” OpenCode Desktop initial screen]


This is where OpenCode Desktop becomes powerful β€” you get access to premium AI models through Copilot.

In OpenCode Desktop:

  1. Click the Settings icon (βš™οΈ) in the bottom-left
  2. Go to AI Providers or Models tab
  3. Find GitHub Copilot in the list
  4. Click Connect or Authenticate
  5. A browser window opens β€” sign in to GitHub if prompted
  6. Authorize OpenCode to access Copilot
  7. Return to OpenCode β€” you should see β€œConnected”

[Screenshot placeholder β€” Settings β†’ AI Providers with GitHub Copilot connected]

Select your model:

  • Claude 3.5 Sonnet β€” excellent for complex reasoning, architecture, and explanations
  • GPT-4o β€” strong all-rounder, good for code generation
  • Copilot default β€” uses GitHub’s optimized model

If your repository exists on GitHub:

  1. Click Clone Repository in OpenCode Desktop
  2. Paste your repository URL (e.g., https://github.com/yourteam/yourproject)
  3. Choose a local folder
  4. Click Clone

OpenCode will use your GitHub authentication automatically.

If starting fresh:

  1. Click New Project
  2. Choose a folder on your machine
  3. OpenCode will initialize a Git repository

OpenCode Desktop works through conversation. You describe what you want, it writes the code.

Good prompt patterns:

I am building a cat diary PWA for XJTLU volunteers.
User story: As a volunteer feeder, I want to record
that I fed Xiaobai at 7pm with 100g of dry food,
so that other volunteers can see she has been fed.
Stack: React + Vite + Supabase
Create a form component with:
- Cat selector dropdown (fetch from /api/cats)
- Time picker (default to now)
- Food type and amount fields
- Submit button
Include input validation and error handling.

What OpenCode will do:

  1. Analyze your request
  2. Show a plan (optional β€” you can ask it to think first)
  3. Write the code across multiple files if needed
  4. Explain what it wrote
  5. Wait for your approval before saving

[Screenshot placeholder β€” OpenCode Desktop showing code generation]


If you have GitHub Copilot Pro (free for students), OpenCode Desktop can access the Coding Agent β€” an autonomous AI that works on entire features.

How to use:

  1. Open your project in OpenCode Desktop
  2. In the chat, type: @agent or click the agent icon
  3. Describe the full task with acceptance criteria
  4. The agent will:
    • Create a plan
    • Edit multiple files
    • Run terminal commands
    • Test the output
    • Report back when done

Example agent prompt:

@agent Build a feeding log feature for our cat diary app.
Acceptance criteria:
- Volunteer can select a cat from dropdown
- Form records: cat name, time, food type, amount (grams)
- After submit, confirmation message appears
- Entry appears in the cat's feeding log immediately
Stack: React + Supabase
Database table 'feeding_logs' already exists.
Do not change: the cat profile page or existing styles.

TaskOpenCode DesktopGitHub Copilot in VS CodeBrowser-based (Claude, ChatGPT)
Inline completionsβœ— Chat-basedβœ“ As you typeβœ— Paste/copy
Multi-file editingβœ“ Full agent modeβœ“ Agent modeβœ— Manual
Model choiceβœ“ Multiple providersβœ“ Copilot models onlyβœ“ Any model
Standalone appβœ“ No IDE neededβœ— Requires VS Codeβœ“ Browser only
Works in Chinaβœ“ With Copilotβœ“ Via VS CodeVaries

ProblemSolution
Copilot not showing in providersMake sure you have Copilot Pro (free for students) β€” check at github.com/settings/copilot
”Not authenticated” errorRun gh auth login in terminal, then restart OpenCode
Model responses are slowTry switching to Copilot default model β€” Claude 3.5 Sonnet is powerful but can be slower during peak times
Code does not workRewrite your prompt with more specific acceptance criteria β€” vague tasks produce vague code
Cannot clone repositoryCheck that you are logged in to GitHub in OpenCode Settings β†’ Accounts

Good fits:

  • You want a clean, focused AI coding interface without IDE complexity
  • You need access to multiple AI models (Claude, GPT-4) through one tool
  • You are working on well-defined features with clear acceptance criteria
  • You want autonomous agent mode for scaffolding new features

Consider alternatives if:

  • You already love VS Code and want inline completions β†’ use GitHub Copilot extension
  • You need heavy refactoring across many files β†’ try Cursor (excellent multi-file editing)
  • You are prototyping UI from images β†’ try TRAE (image-to-code specialist)

See AI Coding Tools for the full comparison.


This site uses anonymous analytics (Microsoft Clarity) to improve course content. No personal data is collected.
Current page
πŸ€–