Skip to main content
AIDiveForge AIDiveForge

OpenCode

FreeFree (MIT). Optional Zen models pay as you go; Go $10/mo, Go Plus $40/moOpen SourceAPISelf-HostedAgentic

An open-source terminal coding agent you point at any model, from a hosted API to a model on your own machine.

Free (MIT). Optional Zen models pay as you go; Go $10/mo, Go Plus $40/mo · Checked Oct 19, 2026

Similar tools

Get This Tool

License: MIT
Local-run terms: Install and run via provided curl, npm, bun, brew, or paru commands; desktop beta available for download; open source with no vendor-hosted requirement.

Pricing

Model
Free
Price
Free (MIT). Optional Zen models pay as you go; Go $10/mo, Go Plus $40/mo

Summary

OpenCode is an MIT-licensed coding agent for the terminal, with a desktop app (in beta) and an IDE extension. You choose the model provider, including a local model behind an OpenAI-compatible server such as Ollama. We installed version 1.19.2 with its one-line script, which took 3 seconds, and gave it the same three jobs as Goose and Hermes Agent. With Claude Opus 5.5 it passed all 9 runs for $0.19, between Goose ($0.14) and Hermes Agent ($0.27), and it was the fastest of the three on the CSV task. With a 3B local model it passed 3 of 9: the create-file task every time, but none of the report summaries or CSV counts. On every run it tried to reach models.opencode.ai and registry.npmjs.org. It kept working when we blocked them, but it downloads provider packages on first use, so pre-install them if you run it offline.

Bottom line: Pick it if you want an open-source terminal agent and plan to use a capable model; a 3B local model was not enough in our test. Offline, pre-install its provider packages.

We installed and ran it

Tested October 16, 2026 by ForgeBench, our automated test bench · version 1.19.2 · MIT license

How we installed it
Vendor one-line install script
Install script run time
3.1 s
Docker image size on disk
0.57 GB
Local model we used
qwen2.5:3b via Ollama
Agent tasks passed with the local model
3 of 9
Outside hosts it tried to reach (we blocked them)
models.opencode.ai, registry.npmjs.org
Task (qwen2.5:3b)PassedMedian time
Create a file with given text3 / 320.8 s
Read a report and write a 2-sentence summary0 / 337.7 s
Count the data rows in a CSV with a shell command0 / 326.2 s

With Claude Opus 5.5 (Anthropic API)

Tested October 16, 2026 by ForgeBench, our automated test bench, same three tasks and grading as above, model reached only through a proxy that allows api.anthropic.com.

Model
Claude Opus 5.5 (claude-opus-5-5)
Agent tasks passed
9 of 9
API cost for all 9 runs (list price)
$0.19
Tokens per task (input + output)
~29,200
Tokens per model call
~10,500
Model calls, all 9 runs
25
Input tokens read from the prompt cache
95%
Other hosts it tried to reach (the proxy refused them)
models.opencode.ai, registry.npmjs.org
Task (Claude Opus 5.5)PassedMedian time
Create a file with given text3 / 311 s
Read a report and write a 2-sentence summary3 / 316.3 s
Count the data rows in a CSV with a shell command3 / 310.9 s

Same three tasks, Claude Opus 5.5 driving each agent

MeasuredOpenCodeGooseHermes Agent
Tasks passed with Claude Opus 5.5 (of 9)999
Median time: Create a file with given text (s)118.118.8
Median time: Read a report and write a 2-sentence summary (s)16.310.324.8
Median time: Count the data rows in a CSV with a shell command (s)10.911.622.3
Model calls, all 9 runs252624
Tokens per task, input + output (approx.)29,2007,80047,100
API cost, all 9 runs (US$, list price)0.190.140.27
Outside hosts it tried to reach besides the API (blocked)210
For reference: tasks passed with qwen2.5:3b on 3 CPU cores (of 9)350

All three ran on October 16, 2026, one after another, with Claude Opus 5.5 (claude-opus-5-5) through Anthropic's API and each agent's default settings: three runs per task, each in a fresh container, graded on the files left behind. The containers had no internet; a proxy let them reach api.anthropic.com and nothing else. Times include the round trips to Anthropic's API, so they show the agent and the API together, not this machine's speed. Tokens come from each agent's own output (Hermes Agent's model-call count is approximate); cost is those tokens at Anthropic's list price. The qwen2.5:3b row is from the earlier local-model runs (Goose and Hermes Agent on October 15, OpenCode on October 16).

What we noticed

  • Its qwen2.5:3b run was on October 16, a day after Goose's and Hermes Agent's, so read that row of the comparison table as a reference, not a same-day result. All three Claude Opus 5.5 runs were on the same day. With Claude Opus 5.5, OpenCode passed all 9 tasks.
  • It tried to reach models.opencode.ai and registry.npmjs.org with both models (102 lookups over 9 runs with the local model). We blocked both and OpenCode kept working. For the Claude run we pre-fetched its Anthropic provider package into the image, which OpenCode otherwise downloads on first use.
  • In the 3B test Ollama capped the context at 32,768 tokens (we asked for 65,536).

Test machine: 8-vCPU AMD EPYC 9354P cloud VM, each test limited to 3 cores and 10 GB RAM, no GPU, no internet (isolated Docker network). Times in seconds are from this CPU-only machine; a desktop with a GPU will be much faster. The VM is shared, so text-generation speed is shown only as a ratio between tools run back to back, not as tokens per second. Docker image size is the on-disk size from docker image ls for every tool. How we test · raw data

Find your fit

Before you choose OpenCode

More options in CLI Coding Agents. Compare pricing, platforms, and features side by side.

Browse CLI Coding Agents

Pros

  • Passed all 9 of our agent tasks with Claude Opus 5.5.
  • Works with the provider you choose, including a local model behind an OpenAI-compatible server.
  • Open source under the MIT license.

Cons

  • With a 3B local model it passed 3 of 9 tasks (only the simplest one), so plan on a larger model.
  • It reaches out to models.opencode.ai and registry.npmjs.org, and downloads provider packages on first use, so offline setups need those pre-installed.
  • The vendor lists its desktop app as beta.

About

Platforms
Terminal, Desktop (beta macOS/Windows/Linux), IDE extension
API Available
Yes
Self-Hosted
Yes
Last Updated
June 11, 2026

Best For

Who it's for

  • Developers who want an open-source coding agent in the terminal
  • Teams that want to choose their own model provider

What it does well

  • Write and edit code from the terminal or your IDE
  • Run several agents on one project at once
  • Share a session with a link
  • Sign in with an existing GitHub Copilot or ChatGPT plan

Integrations

AnthropicOpenAI-compatible servers (for example Ollama)LSP

Frequently Asked Questions

Is OpenCode free?
OpenCode offers a free option. Hosting, model usage, or optional services may have separate costs; check the pricing details and official terms.
Is OpenCode open source?
Yes. OpenCode is open source — the source repository is at https://github.com/sst/opencode.
Does OpenCode have an API?
Yes. OpenCode exposes a developer API. See the official documentation at https://opencode.ai for details.
Can I self-host OpenCode?
Yes. OpenCode supports self-hosting on your own infrastructure.
What platforms does OpenCode support?
OpenCode is available on: Terminal, Desktop (beta macOS/Windows/Linux), IDE extension.

OpenCode is an open-source AI coding agent that works in your terminal. It is MIT-licensed. You connect it to a model provider of your choice, including a local model through an OpenAI-compatible server such as Ollama, and it reads, edits and runs code in your project. The vendor also offers a desktop app and an IDE extension.

We installed version 1.19.2 with the vendor’s one-line install script in an isolated container and gave it the same three tasks as goose and Hermes Agent: create a file, summarize a report, and count rows in a CSV with a shell command. With Claude Opus 5.5 through Anthropic’s API it passed all 9 runs. With a small local model (qwen2.5:3b on 3 CPU cores) it passed 3 of 9: the create-file task every time, but none of the report summaries or CSV counts, where the small model’s answers were wrong. Goose and Hermes Agent also struggled with that model, so read it as a limit of the 3B model.

On every run it tried to reach models.opencode.ai and registry.npmjs.org. We blocked both and it kept working. For the Claude run we added its Anthropic provider package to the image in advance, because OpenCode otherwise downloads it the first time you use that provider. Expect that if you run it on a network without internet access.

Share This Tool

Back to comparison
Contribute

Related Listings

Coding AssistantsFreemium

ShipCheck

ShipCheck connects to GitHub, requires no configuration, and maps behaviors already encoded in your codebase — authorization logic…

VerifiedFreemium
View ShipCheck
Coding AssistantsFreemium

git-lrc

LlamaPReview attaches to your Git workflow and runs automated code reviews on every commit, surfacing potential bugs, generating PR…

VerifiedOSSFreemium
View git-lrc