OpenCode: the open-source AI coding agent
1 min readAI · Developer Tools · Open Source0 views
OpenCode is the open-source coding agent that's eating the 'but can I run it with my own key / provider / local model?' question. Built by the SST team, it runs in your terminal as a proper TUI, speaks the same agent harness language (plan/build agents), and plugs into every provider the AI SDK supports — including your own hardware via Ollama.
What it actually is
- MIT-licensed, open source, npm-distributed (
npm install -g opencode-ai) — and yes, the repo is very readable. - Terminal-native agent UI — sessions, plan/build agents, diffs, permissions and inline review — no editor required.
- Provider-agnostic — Anthropic, OpenAI, Google, Groq, local Ollama/vLLM — swap with one config line; your keys, your control.
- Designed for pairing: reads your project, edits files, runs commands, asks permission at the risky boundaries.
Why it matters
The agent-harness design space exploded after Claude Code popularized the pattern, and OpenCode is the most serious open answer to it: same UX pattern, none of the vendor lock. For anyone uncomfortable sending a proprietary codebase through someone else's black box — or who just wants to own the stack — this is the clean path.
Who it's for
- Developers who want an agent in the terminal with the model of their choice.
- Teams that want to self-host or audit their agent stack (open source — read the code).
- Anyone pairing an agent with a local Ollama model for zero marginal cost.
What to check
- The
opencode auth loginflow supports provider keys AND subscription logins where available — check docs for your harness of choice. - Local models work, but set expectations: small models wobble on long multi-file tasks — that's a model property, not a tool property.
- It's young; watch releases and read the changelog — this project moves weekly.
If you're choosing one open coding agent to learn this quarter, OpenCode is it. Repository: github.com/sst/opencode.

Written by
Shihab Hossain — Full-Stack Developer
I build fast, thoughtful products end-to-end — web experiences with React & Next.js, Android apps with Flutter, and the infrastructure behind them.
Work with me