OpenCode setup: from zero to your first AI-built app in 2 minutes

Here's how to get OpenCode running 👇

1

Install it

Open your terminal and paste this:

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

That's it. One command, no setup wizard.

2

Pick your model

Run opencode to launch. On first start it'll ask which AI provider to use. You can pick:

  • ✦ Claude — best for complex coding
  • ✦ GPT or Gemini — solid all-rounders
  • ✦ Kimi — free tier, fast
  • ✦ Local model via Ollama — fully free, runs on your laptop

You'll need an API key from the provider you pick — paste it in when prompted.

3

Switch between modes

Inside OpenCode use:

  • ✦ Plan mode — AI maps out the task before touching any code
  • ✦ Build mode — AI writes and edits files directly

You can switch mid-session.

4

Add power features

Expand OpenCode's capabilities:

  • ✦ Skills — reusable instructions for repeated workflows
  • ✦ MCP — connect external tools (databases, APIs, your CRM)
  • ✦ Sub-agents — spin up specialized agents for parts of the task
Pro tip

start with a small task, like "build me a landing page for X." Watch how it plans, then approves edits. Once you trust the flow, give it bigger jobs — full apps, refactors, integrations.