Skip to content

Intro

OpenCode is an AI coding agent built natively for the terminal. It features:

  • Native TUI for a smoother, snappier experience
  • Uses LSPs to help the LLM make fewer mistakes
  • Opening multiple conversations with the same project
  • Use of any model through the AI SDK
  • Tracks and visualizes all the file changes
  • Editing longer messages with Vim

Installation

Terminal window
npm i -g opencode

If you don’t have NPM installed, you can also install the OpenCode binary through the following.

Using the install script

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

Or install a specific version.

Terminal window
curl -fsSL https://opencode.ai/install | VERSION=0.1.0 bash

Using Homebrew on macOS and Linux

Terminal window
brew install sst/tap/opencode

Using AUR in Arch Linux

With yay.

Terminal window
yay -S opencode-bin

Or with paru.

Terminal window
paru -S opencode-bin

Using Go

Terminal window
go install github.com/sst/opencode@latest