Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.95 KB

File metadata and controls

73 lines (48 loc) · 1.95 KB

Setup — Windows

WSL2 is strongly recommended. opencode's TUI and tooling assume a Unix-like shell. The native Windows install works for most tasks, but a few features and many terminal emulators behave better inside WSL2 Ubuntu.

1. Prerequisites

  • Terminal: Windows Terminal (built-in on Win11). Inside it, prefer a WSL Ubuntu profile.
  • WSL2 (recommended): open PowerShell as admin and run wsl --install. Reboot, then launch Ubuntu and create a user.
  • git: inside WSL run sudo apt install git -y; on native Windows install Git for Windows.
  • Node.js 20+ (only for the npm install path): inside WSL use nvm; on native Windows use Volta or the Node.js MSI.

2. Install opencode

Inside WSL2 (recommended)

Open your Ubuntu shell and follow the Linux instructions — universal installer is easiest:

curl -fsSL https://opencode.ai/install | bash

Or:

npm install -g opencode-ai

Native Windows (PowerShell)

Scoop:

scoop install opencode

Chocolatey:

choco install opencode

npm:

npm install -g opencode-ai

3. Verify

opencode --version

If WSL says command not found, restart the shell so the updated PATH is picked up. On native Windows, open a new PowerShell window.

4. First run

opencode

In the TUI, connect to opencode zen to access free models:

  1. Type /connect and pick opencode zen.
  2. Complete the browser auth flow.
  3. Press f2 (or type /models) and select a free model — big-pickle is a good default.
  4. Send a test prompt: what files are in this folder?.

5. Next steps