OpenCode: Redefining AI Programming
OpenCode is an MIT-licensed open-source terminal AI coding agent, also available as a desktop app and IDE extension. As of 2026-10-20 the latest stable OpenCode 1 release is v1.19.3, and the official docs list 75+ LLM providers plus support for running local models.
What is OpenCode?
As of 2026-10-20 the latest stable OpenCode 1 release is v1.19.3. OpenCode is an open-source terminal AI coding assistant driven by the community, featuring a beautiful TUI interface, multi-agent architecture, and 75+ model provider support; the official docs also list support for running local models. Its core philosophy is BYOK (Bring Your Own Key) — developers only pay API costs with no extra subscription.
Core Features
Multi-Agent Architecture
Built-in Build and Plan primary agents plus General, Explore and Scout subagents; define your own agents in opencode.json or as Markdown files.
75+ Model Providers
Supports 75+ LLM providers through the AI SDK and Models.dev, plus local models; any provider can point to a custom endpoint via baseURL.
Native LSP Integration
Deep integration with Language Server Protocol for real-time diagnostics, code navigation, and context-aware completions directly in the terminal.
Parallel Sessions
Run multiple coding sessions simultaneously. Handle different tasks in parallel for maximum development throughput.
oh-my-opencode
Community-driven extension system inspired by oh-my-zsh, offering themes, plugins, and shortcuts that supercharge your terminal experience.
Desktop App
Cross-platform desktop application with a modern interface. All the power of the terminal version, wrapped in a polished GUI.
OpenCode vs Claude Code vs Codex
| Feature | OpenCode | Claude Code | Codex |
|---|---|---|---|
| Pricing | Free (BYOK) | From $20/month (official price) | Subscription |
| Model Support | 75+ providers (BYOK) | Claude models only | OpenAI models only |
| How It Runs | TUI + Desktop + IDE | CLI + IDE | Desktop + CLI + Web |
| Open Source | Open source (MIT) | Closed source | Partially open source |
| LSP Integration | Native | None | None |
| Multi-Agent | Built-in + oh-my-opencode | Agent Teams | Agents SDK |
| Best For | Model flexibility, local models | Complex reasoning, long multi-step coding | Long-running autonomous tasks |
Use with QCode.cc
Connect OpenCode to QCode through its provider config: Claude models use the anthropic provider (see the opencode.json example below), while GPT and Chinese models are set up as described on the OpenCode page at docs.qcode.cc. API direct access must be enabled on your key first.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"anthropic": {
"options": {
"baseURL": "https://api.qcode.cc/claude/v1"
}
}
},
"model": "anthropic/claude-opus-5",
"small_model": "anthropic/claude-haiku-4-5-20251001"
}
Billed per token; per-model rates are listed on /models
One key for Claude, GPT and leading Chinese models, in Claude Code, OpenCode and Codex
Fully self-service: pay by credit card, Apple Pay, Google Pay, Alipay, WeChat Pay or crypto
Deep dive: installing OpenCode, multi-agent setup, bring-your-own-key and using it with QCode (as of 2026-10-20)
Install and first run
OpenCode is an open-source AI coding agent that runs as a terminal interface, a desktop app or an IDE extension. Its code is published under the MIT license in the anomalyco/opencode repository on GitHub, which had 217,923 stars as of 2026-10-20; the latest stable OpenCode 1 release is v1.19.3.
The install and setup steps below follow the official OpenCode 1 docs (opencode.ai/docs); as of 2026-10-20, a banner at the top of those docs says OpenCode v2 is now available, and the v2 docs are at opencode.ai/v2/docs. The easiest way to install OpenCode 1 is the install script: curl -fsSL https://opencode.ai/install | bash. You can also run npm install -g opencode-ai, or brew install anomalyco/tap/opencode on macOS and Linux, and there is an official Docker image ghcr.io/anomalyco/opencode. On Windows, OpenCode recommends using WSL. These methods provide the opencode binary and can conflict with or replace an OpenCode 2 installation: both versions use the opencode command and cannot be installed side by side under their default command.
Open a project directory, run opencode, then run /init. OpenCode analyzes the project and creates an AGENTS.md file in the project root; the docs recommend committing it to Git so OpenCode understands the project structure and coding patterns.
- Press Tab to switch between the Build and Plan agents: let Plan propose an approach, then switch back to Build to make the changes.
- Type @ to fuzzy-search project files and add them to the prompt.
- Use /undo to revert changes, as many times as needed, and /redo to restore them.
Multi-agent: Build, Plan and three subagents
According to the official OpenCode 1 Agents docs (checked 2026-10-20), OpenCode ships with two built-in primary agents and three built-in subagents. Build is the default primary agent with all tools enabled. Plan is a restricted agent for planning and analysis: file edits and bash commands ask for your approval by default. Among the subagents, General runs multi-step tasks and can work in parallel, Explore is a fast read-only agent for searching the codebase, and Scout is a read-only agent for external docs and dependency source code.
Cycle through primary agents with Tab. Primary agents call subagents automatically based on their descriptions, or you can mention one in a message, for example @general. Custom agents can be defined in two ways: in the agent section of opencode.json, with their own model, prompt and permissions, or as Markdown files in ~/.config/opencode/agents/ (global) or .opencode/agents/ (per project), where the file name becomes the agent name.
- Make review agents subagents with the edit permission set to deny, so they comment without changing code.
Bring your own key: configuring providers
OpenCode uses the AI SDK and Models.dev to support 75+ LLM providers, and it can run local models. Adding a provider takes two steps: store its API key with /connect, then configure it in the provider section of your config. The global config lives at ~/.config/opencode/opencode.json, and project configs can override global defaults.
Keys added with /connect are stored in ~/.local/share/opencode/auth.json. Any provider accepts a baseURL option, which is useful for proxy services or custom endpoints. For an OpenAI-compatible service that is not listed, choose Other in /connect, enter a provider ID, and declare it in opencode.json with the @ai-sdk/openai-compatible package.
How to use OpenCode with QCode
QCode gives you one key for Claude, GPT and leading Chinese models. Billed per token; per-model rates are listed on /models. It is fully self-service and takes minutes to set up. The steps below follow the OpenCode page at docs.qcode.cc.
- Sign up for QCode and add funds by credit card (Visa / Mastercard / AMEX), Apple Pay, Google Pay, Alipay, WeChat Pay or crypto.
- Enable API direct access on your key first: it is off by default; contact online support or email hi@qcode.cc to turn it on.
- In ~/.config/opencode/opencode.json, set options.baseURL of the anthropic provider to https://api.qcode.cc/claude/v1 and use a model such as anthropic/claude-opus-5, or anthropic/claude-sonnet-5 for everyday work.
- Run /connect, choose Anthropic, then Manually enter API Key, and paste your QCode key; type /exit and reopen OpenCode.
- GPT models go through the openai provider, with the baseURL given on the same docs page; Claude only works over the Anthropic protocol, so do not point it at an OpenAI-compatible endpoint.
OpenCode FAQ
Does OpenCode cost money?
OpenCode itself is open-source software under the MIT license; what you pay for is the models. With your own provider key you pay that provider, or you can use OpenCode's own Zen (pay-as-you-go) or Go (official price $10/month, Go Plus official price $40/month). As of 2026-10-20.
Can OpenCode use Claude models?
Yes, through the anthropic provider. With QCode, set baseURL to https://api.qcode.cc/claude/v1 and use an ID such as anthropic/claude-opus-5. Claude only works over the Anthropic protocol; pointing it at an OpenAI-compatible endpoint returns an error.
What is the difference between the Build and Plan agents?
Build is the default primary agent with all tools enabled, for actually changing code. Plan is restricted: file edits and bash commands ask for your approval by default, which suits analysis and planning. Switch between them with Tab.
OpenCode cannot connect to QCode or says a model is unavailable. What should I check?
Work through the hints on the docs page: is API direct access enabled on your key? Is the baseURL correct and the key saved? Does the model ID match a name QCode supports (see /models)? If it still fails, try another endpoint such as asia.qcode.cc or us.qcode.cc.
Do I have to bring my own API key to OpenCode?
Not necessarily. The official docs say that with OpenCode you can configure the API key of any LLM provider, and that if you are new to LLM providers it is worth starting with OpenCode Zen, a curated list of models that have been tested and verified by the OpenCode team. With QCode you can also use one key for Claude, GPT and leading Chinese models: QCode accepts credit cards (Visa / Mastercard / AMEX), Apple Pay, Google Pay, Alipay, WeChat Pay and crypto, and the whole process is self-service. Billed per token; per-model rates are listed on /models. After adding funds, enable API direct access on your key and it works in OpenCode. As of 2026-10-20.
OpenCode Go or your own key?
As of 2026-10-20, Go is a subscription for open models at the official price of $10/month (Go Plus official price $40/month), with per-model monthly dollar limits of which at most 20% can be used in any 5 hours and 50% in any week; Claude Opus and Claude Sonnet are not on its list. If you need frontier Claude or GPT models, or prefer per-token billing, your own key, for example from QCode, is the better fit. QCode has no 4-hour window.
Start AI Coding Today
Sign up for QCode, get your API key and use Claude, GPT and leading Chinese models in OpenCode. Billed per token; per-model rates are listed on /models.
Create a QCode account
One key across Claude, GPT and Chinese models, billed per token — live rates on /models.