Skip to content

OpenCode Deployment Guide

ResourceURL
Official docsOpenCode Docs
Windows WSLOpenCode Windows WSL

OpenCode is a terminal-based AI coding tool. Running opencode starts its TUI for code reading, editing, and project automation.

macOS / Linux

Official install script:

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

Using npm:

sh
npm install -g opencode-ai

Using Homebrew:

sh
brew install anomalyco/tap/opencode

Arch Linux:

sh
sudo pacman -S opencode
paru -S opencode-bin

Windows

OpenCode recommends WSL on Windows. After installing WSL, run this in the WSL terminal:

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

For native Windows installs, choose one of these paths:

powershell
choco install opencode
scoop install opencode
npm install -g opencode-ai

Verify And Start

sh
opencode --version
cd /path/to/your/project
opencode

Once inside the TUI, initialize the project with:

txt
/init

This lets OpenCode analyze the project and create a project instruction file for future sessions.

Next Steps