Skip to content

OpenCode Quick Start Guide

Get up and running with OpenCode in minutes.

Choose your version

OpenCode 2 (current)OpenCode 1 (legacy)
Latest versionv2.3.2 (2026-11-18)v1.19.6 (2026-11-17)
Install scriptcurl -fsSL https://opencode.ai/v2/install | bashcurl -fsSL https://opencode.ai/install | bash
npm package@opencode/cliopencode-ai
Sign in/connect in the TUI/connect in the TUI, or opencode auth login (CLI)
Project initNot documented for V2 — use V1’s /init or write AGENTS.md yourself/init in the TUI
Docsopencode.ai/docsopencode.ai/v1/docs

Install

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

Or with a package manager: npm install -g @opencode/cli, brew install anomalyco/tap/opencode-v2, or paru -S opencode-beta (Arch). Windows package managers are not supported for V2 — use the install script (native Windows) or WSL2.

Launch

opencode

Sign in

Connect your provider directly in the TUI:

/connect

Select the OpenCode provider to use the built-in Console catalog (formerly Zen — free models included, pay-as-you-go or Go subscription), or pick any other provider and paste your own API key. See also the official V2 Providers docs.

Your first task

Type your prompt and press enter, e.g. “Explain how the authentication flow works in this project”.

For customizing V2 (config, agents, permissions), see the official V2 config docs. Note: the V2 docs do not document an /init project-initialization command; if you want to generate an AGENTS.md, use OpenCode 1’s /init or write it yourself.

Multi-session support

You can run multiple agents in parallel within the same project — just start opencode again in another terminal. Each session operates independently.

Verification

  1. Run opencode models to see the available models from your configured provider
  2. Run opencode stats to check your usage statistics
  3. Try a simple query like “Explain how to use promises in JavaScript”

Next Steps

Happy coding!