OpenCode
OpenCode is a free, open-source AI coding agent that reads your project, edits files and runs tasks while you review and approve. You can use it in the terminal, a desktop app for macOS, Windows and Linux, or a mobile app. It works with free built-in models, local models, 200+ providers or your existing ChatGPT or GitHub Copilot subscription. It's built for developers who want an open alternative to closed terminal coding agents.
Is OpenCode right for you?
Best for: Developers who want an open-source alternative to closed terminal agents like Claude Code, with free choice of model for coding tasks such as refactors, bug fixes, tests and repo exploration. It suits people comfortable in the command line who want control over what the agent can touch.
Pros
- MIT-licensed and free; you pay only for the models you use
- Connects to 200+ providers, including Claude, GPT, Gemini and local models
- Bundled free models work without creating an account
- Log in with existing ChatGPT Plus/Pro or GitHub Copilot subscriptions
- Permissions, /undo and parallel sessions give real control over agent work
Cons
- Output quality swings a lot depending on the model you pick, users report
- Setting up providers, API keys and permissions takes some effort
- Free models have a daily request limit that heavy tasks hit quickly
- Costs can climb on long agent sessions when using your own API keys
OpenCode is the open alternative to terminal coding agents like Claude Code that we'd point most developers to first. The software is free and model-agnostic, and you can tune it with skills, custom agents and MCP servers, though results depend on the model behind it and the setup takes some patience. If you live in the terminal and want to own your tooling, install it and start on the free models.
About OpenCode
OpenCode is an open-source coding agent: you describe what you want in plain language, and it reads your project, edits files, runs commands and shows you what it changed. It began as a terminal tool and is now available as a desktop app, a mobile app and an SDK as well. We think of it as the open alternative to terminal agents like Claude Code. The workflow is similar, but you aren't tied to one model vendor, and the software itself costs nothing.
Picture the usual situation. You have a repo open, a ticket that says "add pagination to the orders endpoint," and twenty minutes before a meeting. Instead of jumping between files, you ask OpenCode to do the boring part and spend your time reviewing the diff. It's aimed at developers who are comfortable in a shell and want control over which model does the work and what it's allowed to touch.
How OpenCode fits into your day
One agent, many models
The headline feature is model freedom. OpenCode connects to more than 200 LLM providers through Models.dev, including local models, so the same agent can run on Claude, GPT, Gemini or an open-weight model on your own machine. It also ships with a set of free models that work without an account. If you already pay for ChatGPT Plus or Pro, or for GitHub Copilot, you can log in with that subscription instead of setting up new billing.
Four ways to drive it
The terminal UI is fast and works in any shell, editor or remote server. That matters if you SSH into boxes a lot. The desktop app for macOS, Windows and Linux adds tabs, visual diffs, a built-in browser and extensions. The mobile app lets you start, steer and approve sessions from your phone. The SDK lets you call OpenCode from your own scripts and CI jobs.
Parallel sessions and safety rails
You can run several agents at once on the same project. For example, one can write tests while another refactors a module. Permissions let you decide which actions run on their own and which need your approval. If an agent goes somewhere you didn't want, /undo rolls back recent changes to both your files and the conversation.
Making it your own
This is where OpenCode rewards a little setup. Custom agents get their own prompts, models and tools, so you could have a cautious "reviewer" agent on a strong model and a quick "fixer" on a cheap one. Agent skills, written as SKILL.md files, teach reusable workflows. Custom commands turn repeated requests into slash commands. Plugins hook into events, and MCP servers connect tools such as GitHub, Linear, Sentry or Supabase.
Your first session with OpenCode
- Install it. Download the desktop app, or install the terminal version with the curl script, npm, bun or Homebrew commands listed on the official website.
- Open a project. In the terminal, change into your repo folder and launch
opencode. In the desktop app, open the folder. - Start with a free model. Pick one of the bundled free models first. No account is needed, so you can judge the workflow before spending anything.
- Ask a small, real question. Something like "explain how auth works in this project" shows you quickly how well it reads your codebase.
- Set your permissions. Decide which actions, such as file edits or shell commands, should always ask first. We recommend keeping approvals on for anything destructive at the start.
- Connect a stronger model when you need one. Add a provider key, log in with ChatGPT or Copilot, or subscribe to OpenCode Go.
A real example: adding rate limiting to an API
Say you maintain a small Express API and want basic rate limiting on the login route. You open the project in OpenCode and type:
Add rate limiting to POST /auth/login: max 5 attempts per IP per 15 minutes, return 429 with a JSON error. Use whatever middleware pattern the project already uses. Add tests in the existing test folder and run them.
OpenCode looks through the routes and middleware folders and proposes a plan. It then edits the router, adds a middleware file and writes tests. Because of your permission settings, it asks before installing a package and before running the test command. You get a diff for each file and the test output in the session.
From there you iterate. If the tests fail, you tell it to fix them. If you dislike the package it chose, you say "use an in-memory store, no new dependencies." If the whole direction is wrong, you type /undo and rephrase. Once it looks right, you commit as usual. OpenCode works on your local files, so your normal git flow doesn't change.
More ways to use it
- Onboarding to an unfamiliar repo: ask it to map the architecture, trace a request end to end, or explain why a weird helper exists.
- Privacy-sensitive work: point it at a local model so your code stays on your machine. This is handy for client projects with strict rules.
- Batch chores in parallel: run one session updating dependencies while another adds missing type annotations, then review both.
- CI automation: use the SDK to call OpenCode from a pipeline, for example to draft fixes for lint failures.
- Team conventions: encode your release checklist or migration steps as a skill, so every agent follows the same procedure.
- Approvals on the go: kick off a long refactor, leave your desk, and approve the next step from the mobile app.
Tips for better results
- Match the model to the task. Use a cheap or free model for exploration and simple edits, and save a frontier model for tricky refactors. Results really do swing with the model you pick.
- Turn repeated prompts into commands. If you type "run the linter, fix issues, rerun" every day, make it a slash command.
- Write a short skill for your stack. Spelling out your test command, folder layout and style rules in a SKILL.md saves a lot of correction later.
- Keep approvals on for shell commands at first. Loosen them once you trust how the agent behaves on your project.
- Add MCP servers sparingly. Connect the tools you actually need, such as your issue tracker or error monitoring. Each extra tool is one more thing the agent might reach for.
- Scope your requests. "Fix the date parsing bug in utils/date.ts" beats "fix the bugs." Smaller asks produce smaller, reviewable diffs.
Limits and things to watch out for
OpenCode is only as good as the model behind it. A weak free model can produce confident but wrong edits, so treat every diff as a pull request from a junior colleague. Free models also come with a daily request limit, which you'll hit quickly on a serious task.
Costs need watching if you bring your own API keys. Long agent sessions read a lot of files and send a lot of tokens, and the bill grows with them. The flexibility also has a price in setup time: choosing providers, adding keys and tuning permissions takes some effort before it feels smooth. Data handling depends on the provider you pick. On the Go plan, endpoints that train on your requests are blocked by default, but with your own keys it's up to you to check each provider's terms.
What users say about OpenCode
Many users like that the software itself is free and open source, so they only pay for the models they use. Support for many providers, from Claude and GPT to Gemini and local models, comes up again and again, along with a fast terminal interface that can be customized. Users also mention that it understands the codebase well through language server integration, and they value running several sessions in parallel and sharing them with teammates.
The complaints are fairly consistent too. Some developers find a terminal-first workflow less friendly than a visual editor, though the desktop app now covers part of that gap. Setting up providers and API keys is a common source of friction. Users also point out that costs can climb on long agent tasks and that output quality varies a lot depending on the chosen model.
Pricing in plain words
OpenCode itself is MIT-licensed and free. You can start with the bundled free models, which have a daily request limit, without creating an account. If you already pay for ChatGPT Plus or Pro or for GitHub Copilot, logging in with that subscription is often the cheapest next step. You can also bring keys from any supported provider and pay that provider directly.
If you'd rather have one predictable bill, OpenCode Go costs $10 per month and gives you curated open-weight models tested for agentic coding, with much higher allowances than the free tier. Go Plus costs $40 per month and adds higher limits for larger projects. Go Teams is listed at $20 per member per month. Allowances are counted over five-hour, weekly and monthly windows. You can add credit for extra usage, and you can cancel any time. For most solo developers we'd suggest free models first, then either an existing subscription or Go.
Alternatives worth a look
If you live in VS Code and want an open-source agent inside the editor rather than a separate terminal app, Cline is the closest match in spirit. Kilo Code covers similar ground and also runs in JetBrains IDEs, the terminal and the cloud. If you'd rather have a full AI-first editor with autocomplete and inline edits built in, Cursor is the more polished, all-in-one choice, though you give up some of OpenCode's model freedom and openness.
Our take
OpenCode is the easiest way we know to get a terminal coding agent without being locked into one vendor. Start on the free models, set up your permissions, and add a stronger model only when a task calls for it. If you're comfortable in the command line and want to own your tooling, it's well worth installing. If you want everything inside a visual editor with no setup, one of the alternatives above will feel friendlier.
Features
Available On
OpenCode FAQ
Is OpenCode free?
Yes. OpenCode is MIT-licensed open-source software and ships with free models that need no account, though those models have a daily request limit. You pay only if you bring your own provider keys or subscribe to OpenCode Go, which starts at $10 per month, with Go Plus at $40 per month.
Which AI models does OpenCode support?
It connects to more than 200 LLM providers through Models.dev, including Claude, GPT, Gemini and local models. You can also log in with a ChatGPT Plus or Pro or GitHub Copilot subscription.
What platforms does OpenCode run on?
There is a terminal interface that works in any shell or on remote servers, plus a desktop app for macOS, Windows and Linux. Mobile apps are available for iPhone via TestFlight and for Android via Google Play, and an SDK lets you drive OpenCode from scripts and CI jobs.
How is OpenCode different from Claude Code?
The workflow is similar: the agent reads your project, edits files and runs commands while you review the changes. The difference is that OpenCode is open source and not tied to one model vendor, so you can switch between providers or run local models.