November 18, 2025

Opencode

My preferred setup when developing something is using my terminal (currently ghostty) with tmux + neovim. One thing that has been missing from my development environment is an AI assistant with agentic capabilities. There are loads of them built into editors like Cursor; however, this requires me to change my development environment and doesn’t meet me where I’m at.

This is where a terminal-based AI assistant comes in, since I live in the terminal. There are a few of them that are popular:

All these are tied to their specific model; for example, Claude Code can only use Anthropic models, and are behind a paywall, the only one free is Gemini CLI. The best model is constantly changing; for example, a week ago it was Gemini 3, this week it’s Opus 4.5, next week it’s probably going to be something else. I would always want to experiment with the best model, but I don’t want to pay 3+ monthly subscriptions (Claude $17 + OpenAI $23 + Gemini $4) and have to change my tooling, causing constant churn.

This is where Opencode shines. It is a terminal-based AI assistant that provides agentic capabilities like Claude Code, Codex, and Gemini CLI, but it allows you to choose different models.

opencode architecture

source

Zen

Apart from a terminal AI assistant being model agnostic, it also provides Zen. It’s a unified way to access the models that are best for coding agents, and provide a pay-as-you-go billing structure. This means I don’t have to handle multiple monthly subscriptions, but pay Zen by the tokens used and still have access to the best models.

opencode Zen explanation

source

Demo

When you first launch opencode, it starts in what they call Plan mode. When in plan mode, it only has read-only access to the repository and won’t execute anything. This way, you can instruct the model on what you want to do, and it specifies a plan on how it will do something. If you see that the plan is correct, then you can change to Build mode using the <TAB> shortcut and tell it to update it.

Walking through an example of updating some CSS on this blog post to change the colors of the headers to be more monochrome.

First, we ask it to find all the colors that are used:

opencode finding the colors in CSS

Then we tell it what colors it needs to change:

opencode creating plan to change colors

Plan looks good, so we switch to build mode and let it update the files:

opencode build change colors

Other cool features