Tools · ST-04 · tool sheet

OpenCode: the open source coding agent where you pick the model

to get started
one-command install · a key from a provider of your choice (for example OpenRouter) · terminal
when to pick it
You want a terminal agent without tying yourself to a subscription or a single lab, or you want to pay only for the tokens you burn.
official site
opencode.ai

pricing

planchecked on
Softwarefree and open source; you only pay for the model you connect19/07/2026
Model via OpenRouterpay per use at the chosen model's list price; :free variants exist too19/07/2026

OpenCode does the job of a terminal coding agent (reads the project, edits files, runs commands, works in steps) with a different founding choice from the labs’ agents: it is open source and model-independent. You decide the engine, choosing among 75+ providers: the labs directly, a gateway like OpenRouter with its single key, or even a model running on your own machine.

For anyone following this site’s method the advantage is plain: the agent stays the same while the model changes, so you can compare different models on the exact same task and pay only for the tokens you consume, with no subscription. With OpenRouter’s :free variants the first experiment costs zero.

How to install it

One command, documented on the official page: the install script (curl -fsSL https://opencode.ai/install | bash) or, if you have Node, npm install -g opencode-ai. Then opencode in the project folder and, the first time, the /connect command to hook up the provider: search for OpenRouter in the list, paste the key, pick the model. You create the key as explained in the OpenRouter sheet, with the spending cap set before the money.

What to expect

The experience is that of terminal agents: multiple sessions, integration with the project’s tools, change history. The community is active and the project moves fast, which means new features all the time but also the odd rough edge: the documentation is honest and the code is public, on GitHub.

The limits, said plainly

The freedom to choose the model is also the responsibility of choosing it: an agent is as good as the model driving it, and with a weak model OpenCode disappoints like any other agent. Initial setup asks a few more minutes than a proprietary agent where everything is pre-decided. And the terminal is home here: if you avoid it, an agent in an app or in the editor serves you better.

Testing: npm installation actually performed on 19/07/2026 (version 1.18.3 working). The first full task with a real key and model was executed on the same date by the testing workflow: the walkthrough is in the guide OpenCode from zero to the first useful task.

Type to search across course, playbooks, skills, papers…