OpenCode
0%
OpenCode Get OpenCode →
OpenCode

Open the code.

The open source AI coding agent.

Explore

It reads before it writes.

LSP enabled. The right language servers load automatically, so the model sees your project the way your editor does.

Plan

One task, broken into steps.

It writes a todo list and works through it, starting with the schema.

Edit

Every change, a diff you can follow.

Model, casts, fillable fields. Nothing happens off screen.

The rule

18 or older, enforced on the server.

Validation where it belongs, with a message people can actually read.

Any editor

Front end included.

The form gets its date field. In the terminal, the desktop app or your IDE, it is the same agent.

Prove it

Then it writes the tests.

Factories updated, and a test for the case that matters most, someone who is seventeen.

Run

43 passed.

It runs your suite and reads the output. Multi-session lets several agents work the same project in parallel.

Privacy first

Your code stays yours.

OpenCode does not store your code or context data, so it can run in privacy-sensitive environments.

Scroll to run the task
208K
GitHub stars
950
Contributors
13K
Commits
16M
Developers every month
What is OpenCode?

An open source agent for your terminal, IDE or desktop.

LSP

LSP enabled

Automatically loads the right LSPs for the LLM.

||

Multi-session

Start multiple agents in parallel on the same project.

URL

Share links

Share a link to any session for reference or to debug.

GH

GitHub Copilot

Log in with GitHub to use your Copilot account.

GPT

ChatGPT Plus/Pro

Log in with OpenAI to use your ChatGPT Plus or Pro account.

75+

Any model

75+ LLM providers through Models.dev, including local models.

$0

Free models included

Use OpenCode with free models, no account needed, or bring your own provider.

>_

Any editor

Available as a terminal interface, desktop app and IDE extension.

Models tested for coding agents.

Zen

Zen is a handpicked set of AI models that OpenCode has tested and benchmarked specifically for coding agents, so you don't have to worry about inconsistent quality across providers.

Learn about Zen →

Questions

What is OpenCode?

An open source agent that helps you write and run code with any AI model. It's available as a terminal interface, desktop app or IDE extension.

Do I need extra AI subscriptions?

Not necessarily. OpenCode comes with a set of free models you can use without an account, and works with all the popular providers, including local models.

Can I use my existing AI subscriptions?

Yes: Claude Pro/Max, ChatGPT Plus/Pro or GitHub Copilot.

Can I only use it in the terminal?

No. OpenCode is also an app for your desktop and the web.

How much does it cost?

OpenCode is free to use and comes with free models. Other providers may cost extra.

What about data and privacy?

Your data is only stored when you use the free models or create sharable links.

Is it open source?

Yes, fully: the source is on GitHub under the MIT License.

One line, then ask it anything.

Install

curl -fsSL https://opencode.ai/v2/install | bash Also on npm, bun, brew, paru and yay.

Read the docs →
Free · open source · MIT

Open the code.

Get OpenCode →