cd /news/developer-tools/how-to-use-opencode · home topics developer-tools article
[ARTICLE · art-95102] src=augmentedswe.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

How to use OpenCode

OpenCode, an open-source coding harness, allows developers to select their preferred AI model provider without being locked into a single ecosystem, unlike Codex or Claude Code. Installation is available via curl script, npm, or Homebrew, and configuration is done through the /connect command. The tool is positioned as a flexible alternative for developers who want to switch between frontier models.

read2 min views1 publishedAug 13, 2026
How to use OpenCode
Image: Augmentedswe (auto-discovered)

Wouldn't it be great if your coding harness wasn't coupled to your model provider? I'll show you how to use OpenCode to build software.

OpenCode is the open source coding harness that most closely matches frontier lab features.

OpenCode lets you select your model without gluing yourself into one ecosystem. Codex is great, but it locks you into OpenAI models. Claude Code is great, but it locks you into Anthropic models.

I’ve written at great length about swapping back and forth between these harnesses, mostly switching when one lab releases a new frontier model.

But wouldn’t it be great if you didn’t have to? OpenCode lets you just select your preferred model. In this way, it’s like Cursor.

But it’s also open-source, which Cursor is not.

But enough telling you what OpenCode is. I’ll show you how to install and use it!

How to install OpenCode #

The recommended way to install OpenCode is by running the install script:

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

But you can also install through your package manager of choice. If you chose the above, skip these options:

Install OpenCode with NPM

npm install -g opencode-ai

Install OpenCode with Homebrew

brew install anomalyco/tap/opencode

Then, run opencode

from the directory you want to work in.

If you’re curious about open source coding harnesses, you’re obviously in the right spot. I spend dozens of hours researching each of these guides so you have a shortcut to building software with AI.

I’d love to have you join us and get notified when we share more tutorials like this.

Configuring an OpenCode AI Provider #

OpenCode is just a coding agent harness. You actually need an LLM model behind that harness, so you’ll need to configure one.

The great thing here is you get to choose.

You can choose your model in Cursor, but not your model provider. With OpenCode, you can drop in an API key for OpenAI, Anthropic, Grok, or some other provider. Choosing a frontier model is tricky, and your choice will probably change over time.

Run /connect

in the CLI to see some options:

Which should you choose? I have a few recommendations:

Keep reading with a 7-day free trial #

Subscribe to The AI-Augmented Engineer to keep reading this post and get 7 days of free access to the full post archives.

── more in #developer-tools 4 stories · sorted by recency
── more on @opencode 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-use-opencode] indexed:0 read:2min 2026-08-13 ·