Choose My Stack
Join free

OpenCode

Open SourceMITSelf-hostable

The open-source AI coding agent for your terminal, IDE or desktop — works with 75+ LLM providers so you're never locked to one model. A Claude Code alternative you fully control.

ReplacesClaude Code
Stars
★ 190k
+16k this year
Forks
24k
+1k this year
Commit
Active now
just now
Age
1 yrs
License
MIT
Hosted
Yes
one command
96
Health score
Excellent
Top 3% of OSS projects

About OpenCode

OpenCode is what you reach for when you love Claude Code's terminal-native, agentic workflow but not being tied to a single vendor's models. It's an open-source AI coding agent that runs in your terminal, editor or a desktop app, and it speaks to 75+ LLM providers — so you decide which model writes your code and what you pay.

The design is client/server, which means the same agent can drive a slick terminal UI, an IDE extension or a remote session, and you can bring your own API keys or point it at local models. Nothing about your workflow is locked to one company's cloud.

It's MIT-licensed and moving fast, with a large and active community. For developers who want Claude Code's shape — an agent that reads, edits and runs your project from the command line — without the lock-in, OpenCode is the leading open answer.

Filed underDeveloper Tools

What makes it different

75+ LLM providers

Use Anthropic, OpenAI, Google, local models and dozens more — swap the model behind the same agent anytime.

Terminal-native agent

A fast TUI that reads, edits and runs your codebase from the command line, the way Claude Code does.

Client/server design

Drive the same agent from a terminal, an IDE extension or a remote session.

Bring your own key

Point it at your own API keys or local models — your code and spend stay under your control.

How to install OpenCode

A hands-on walkthrough of getting OpenCode up and running — follow along and you'll have it self-hosted in one sitting.

Project pulse
190k+16k this year
Health score96 / 100
Forks24k
Last commitjust now
LicenseMIT
Topics
#claude-code-alternative#ai-coding#terminal#agent#llm#byo-key#open-source
Under the hood
TypeScriptGoNode.js

The honest read

What we like
  • Works with 75+ model providers — no vendor lock-in
  • Terminal-native, fast and scriptable
  • MIT licensed and fully open source
  • Bring your own key or run local models
  • Very active development and community
Worth knowing
  • You supply your own API keys (or a local model)
  • Terminal-first workflow has a learning curve
  • Younger than some commercial rivals
  • Output quality depends on the model you plug in

Quick answers

Is OpenCode free to use?

Yes — OpenCode is free and open source under the MIT license. You only pay for whichever LLM provider you connect, or nothing if you run a local model.

How is OpenCode different from Claude Code?

OpenCode is open source and provider-agnostic — it works with 75+ LLM providers and you bring your own key — while Claude Code is tied to Anthropic's models and platform.

Which models does OpenCode support?

It supports 75+ providers including Anthropic, OpenAI, Google and local models, so you can choose the right model per task.

Can I use OpenCode in my IDE?

Yes — its client/server design drives a terminal TUI, IDE extensions and remote sessions from the same agent.

Is OpenCode self-hostable?

Yes — you run it yourself and connect your own model providers, so nothing is locked to a hosted cloud.

More open-source picks

Trending in open source
1Continue35.1k2Zed87.5k3AppFlowy74.2k4Logseq44.1k5Formbricks12.7k6Mautic10.2k
The best open-source tools, in your inbox

One short email a week — new self-hostable tools, deals and honest reviews. No fluff.

Unsubscribe anytime. We mean it.

Own this page. Tell your story to buyers.

Claim OpenCode to add screenshots, respond to reviews and reach founders comparing tools — free to start.

Claim OpenCode — freeExplore paid plans