Skip to content
aicoolies logo
OpenCode logo

OpenCode

Open-source AI coding agent for the terminal

Open-source (MIT) AI coding agent from Anomaly for the terminal, desktop and web. It works with many LLM providers via /connect, local models through Ollama, the pay-as-you-go OpenCode Zen gateway and OpenCode Go subscriptions. OpenCode 2.0 runs one shared background service for all clients and adds the @opencode/client package and Code Mode, which composes MCP and OpenAPI tools in a single script.

About OpenCode

OpenCode is an open-source (MIT) AI coding agent developed by Anomaly and available as a terminal interface, desktop app and web app. It is written mainly in TypeScript; its GitHub repository (anomalyco/opencode, created in April 2025) had more than 210,000 stars as of October 16, 2026. OpenCode avoids vendor lock-in with a provider and model catalog from models.dev: you connect accounts with /connect, pick models with /models, add custom OpenAI-compatible providers in config, or run local models through Ollama, which OpenCode detects automatically at 127.0.0.1:11434.

The agent runs shell commands, edits files and works with full project context, while permissions and policies let developers decide what needs approval, including per-project auto-accept settings. It can be extended with MCP servers, skills, plugins, custom commands, agents and themes, and includes web search, snapshots and context compaction.

OpenCode targets developers who want a powerful, free, and open-source alternative to proprietary AI coding agents like Claude Code, with the flexibility to choose any AI model provider based on performance, cost, or privacy requirements. It is particularly popular among developers who prefer terminal-based workflows, those running local models for offline or air-gapped development, and cost-conscious teams who want enterprise-grade AI coding assistance without monthly subscriptions. OpenCode's MIT license and active community make it a practical foundation for customization and extension.

OpenCode 2.0, announced on October 12, 2026, is a major overhaul. A single background service now runs on the machine by default, and the TUI, web interface, desktop app and scripts all connect to it. That service owns sessions, configuration, integrations, permissions and tool execution; it can be bypassed with --standalone or --server, or disabled with opencode service set disabled true. The new @opencode/client package (clients for vanilla JavaScript and Effect) discovers or starts the local service with Service.ensure(), which is useful for scheduled tasks and scripts, and opencode pair or /pair exposes the service to other devices. Code Mode, built on a minimal JavaScript interpreter in the @opencode/codemode package, turns MCP servers and OpenAPI endpoints into functions the agent can chain inside one execute call instead of calling tools one at a time; all MCP servers use Code Mode by default unless codemode: false is set. 2.0 also adds background subagents and background shell commands, a rebuilt server API, more than 80 internal plugins on a stable plugin API (TUI plugins built on OpenTUI are now stable), hot reloading, and the @opencode/sdk package for embedding OpenCode as a library.

To upgrade from 1.x, update to the latest 1.x release and run opencode upgrade --major. New installs use curl -fsSL https://opencode.ai/v2/install | bash, brew install anomalyco/tap/opencode-v2, npm install -g @opencode/cli or the official WinGet package (Anomaly.OpenCode). Breaking changes are limited: 1.x plugins do not run in 2.0, the server API is completely different, and terminal client configuration moves out of tui.json; other V1 configuration remains backwards compatible. Recent releases include v2.0.29 (October 14, 2026), which added remote device pairing through OpenTunnel, and v2.0.30 (October 15, 2026), which added a docked /diff viewer and removed the retired session-sharing backend and /share command.

On October 17, 2026, OpenCode disclosed on its official X account a security breach, related to a large-scale distillation attack, that affected 1.4% of OpenCode Console users. It said only a subset of users who had linked external providers were affected and that all affected users were notified by email; users who did not receive an email were not affected. OpenCode said the incident was ongoing and that it was working with Anthropic, OpenAI and Google on remediation.

Pricing & Platform Specs

Pricing Summary

OpenCode is free and open source under the MIT license. You can run local models through Ollama, connect your own provider accounts and API keys and pay providers directly, or use OpenCode's model services. OpenCode Zen is a pay-as-you-go gateway (auto-reload of $20 when the balance falls below $5, card fees passed through at 4.4% + $0.30, no other markup) that also offers models free for a limited time, such as GLM-5.3-Flash Free, DeepSeek V4.1 Flash Free and Beam Free. OpenCode Go is a subscription to curated open models for $10/month, and Go Plus costs $40/month with higher limits. OpenCode Enterprise pricing is available on request.

full pricing breakdown →

Compare plan costs — select tools to compare eligible subscriptions. Plans with unconfirmed prices, excluded product access, or additional usage charges are omitted.

Supported Platforms

macOS, Linux, Windows, Desktop app

Explore categories, tags & use cases
Codex logo

Codex

Top Pick

OpenAI coding agent for app, editor, terminal, and cloud work

Codex is OpenAI's coding agent for software development across the Codex app, editor, terminal, and cloud tasks. It helps write, review, debug, refactor, and automate code, with ChatGPT plan access for managed surfaces and API-key usage for CLI, SDK, and IDE workflows. The open-source CLI and SDK support local repository work, while cloud features add GitHub review, Slack/Linear integrations, worktrees, skills, MCP, and automations.

paidTelemetry

Open-source extensible AI agent, now under the Linux Foundation's AAIF

Open-source (Apache 2.0) AI agent, originally built by Block and now part of the Agentic AI Foundation (AAIF) at the Linux Foundation. Runs on your machine as a desktop app (macOS, Linux, Windows), CLI and API, works with 15+ LLM providers or existing Claude, ChatGPT and Gemini subscriptions via ACP, and connects to 70+ MCP extensions. 55K+ GitHub stars; used for coding and general automation.

Open Source
Claude Code logo

Claude Code

Top Pick

Anthropic's agentic coding CLI

Anthropic's agentic CLI coding tool that delegates complex tasks to Claude directly from the terminal. Understands entire codebases via automatic context gathering, edits multiple files, runs shell commands, and manages Git workflows autonomously. Supports CLAUDE.md for persistent project instructions, integrates with VS Code and JetBrains, and runs on current Claude models such as Opus 5.5 and Sonnet 5.5 for complex architecture work. Built for terminal-first developers.

freemium

Minimal terminal coding harness

Pi Coding Agent is an MIT-licensed Node.js CLI from earendil-works for building and running coding agents in a local terminal. The current package describes a read/bash/edit/write toolset and session management, while the repo positions Pi as a unified LLM API, agent loop, TUI, and coding-agent CLI. It is best framed as a lean, self-extensible BYO-model toolkit rather than a managed IDE.

Open Source

AI pair programming in your terminal

Terminal-based AI pair programmer with deep git integration. Auto-commits changes with meaningful messages and creates repository maps for navigating large codebases. Works with Claude, GPT, DeepSeek, and local models. One of the most popular open-source AI coding tools, known for its reliability, broad model support, and seamless command-line workflow.

Open Source
Amp logo

Amp

Top Pick

Agentic coding tool by Sourcegraph (formerly Cody)

Amp is a multi-model coding agent for terminal, web, macOS/iOS, and IDE-connected workflows. Vendor docs describe the same agent and threads across surfaces, with remote Orbs (incl. self-hosted), local Runners, Dial modes (low / medium / high / ultra), shared threads, MCP, plugins, and BYOK / linked ChatGPT subscriptions. Pricing spans a free Hobby tier, optional Megawatt ($20/mo) and Gigawatt ($200/mo) Individual plans, no-extra-charge Teams workspaces, pay-as-you-go credits, and Enterprise.

freemium

Side-by-Side Comparisons

OpenCode logo
OpenCode
vs
Cline logo
Cline

OpenCode vs Cline — Terminal Coding Agent or VS Code HITL Agent?

OpenCode and Cline both deliver open-source agentic coding help, but they live in different shells. OpenCode is an MIT coding agent spanning terminal, IDE extension, and desktop, with any-provider models and a polished coding-agent loop. Cline is an Apache-2.0 coding agent for editor, terminal, and SDK workflows that reads and edits files, runs commands, and asks for explicit approval unless you enable auto-approve. Existing Scores: OpenCode overall 83 (Score date 2026-09-05); Cline overall 84 (Score date 2026-03-25). Overall is close; choose on terminal coding-agent DX vs editor human-in-the-loop control. Treat the scoreboard as review evidence with those dates, not the whole decision.

OpenCodeCline
goose ai
Goose
vs
OpenCode logo
OpenCode

Goose vs OpenCode: Local MCP Agent or Open-Source Coding Agent?

Goose and OpenCode both run open-source AI agents that help developers ship work from the terminal, but they emphasize different product shapes. Goose is an open-source, model-agnostic local agent from the Agentic AI Foundation (AAIF) lineage — Desktop, CLI, and API — built around MCP extensions, recipes, and BYOK or local Ollama. OpenCode is an open-source coding agent spanning a terminal interface, IDE extension, and desktop app, with any-provider models and a polished coding-agent loop. Use Goose when you want a privacy-forward local agent with deep MCP extensibility across code and broader workflows. Use OpenCode when you want a coding-agent surface across terminal, IDE, and desktop with strong day-to-day developer experience. Existing aicoolies Scores: Goose overall 84, speed 80, privacy 95, developer experience 78 (Score date 2026-03-29); OpenCode overall 83, speed 81, privacy 90, developer experience 86 (Score date 2026-09-05). Overall is close; choose on product shape first, and treat the scoreboard as secondary review evidence with those dates.

GooseOpenCode
Grok logo
Grok Build
vs
OpenCode logo
OpenCode

Grok Build vs OpenCode — xAI Parallel Terminal Agent or Open-Source CLI?

Grok Build and OpenCode both run as terminal-first agentic coding tools, but they optimize for different constraints. Grok Build is xAI’s commercial CLI with plan mode, subagents, worktree-aware automation, and parallel implementation attempts. OpenCode is an MIT-licensed terminal agent from the SST team with a polished TUI, broad provider support, and no software license fee. This comparison is for developers choosing between an xAI-native automation lane and an open, provider-agnostic CLI. The scores below come from existing aicoolies reviews: Grok Build (Score date 2026-05-28) and OpenCode (Score date 2026-09-05). This page compares documented reviews and does not include a new head-to-head test.

Grok BuildOpenCode
OpenCode logo
OpenCode
vs
Cursor logo
Cursor

OpenCode vs Cursor: Open-Source Coding Agent or AI-First Editor?

Cursor is the stronger default for teams that want a polished AI-native editor, managed agent limits, cloud agents, review workflows, and a familiar VS Code-style onboarding path. OpenCode is the better fit for open-source, terminal-first users who want MIT-licensed code, provider choice, and local/control-plane flexibility.

OpenCodeCursor
View 5 more comparisons

Community experience

Sources & verification

Sources checked
Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.

optional / review badge

Optional image for a README or docs page. The snippet links to this review. No link is required.

OpenCode reviewed on aicoolies
[![OpenCode reviewed on aicoolies](https://aicoolies.com/api/badge/tool/opencode.svg)](https://aicoolies.com/reviews/opencode-review)

FAQ

What is OpenCode?

Open-source (MIT) AI coding agent from Anomaly for the terminal, desktop and web. It works with many LLM providers via /connect, local models through Ollama, the pay-as-you-go OpenCode Zen gateway and OpenCode Go subscriptions. OpenCode 2.0 runs one shared background service for all clients and adds the @opencode/client package and Code Mode, which composes MCP and OpenAPI tools in a single script.

Is OpenCode free?

Yes — OpenCode is open source and free to use. OpenCode is free and open source under the MIT license. You can run local models through Ollama, connect your own provider accounts and API keys and pay providers directly, or use OpenCode's model services. OpenCode Zen is a pay-as-you-go gateway (auto-reload of $20 when the balance falls below $5, card fees passed through at 4.4% + $0.30, no other markup) that also offers models free for a limited time, such as GLM-5.3-Flash Free, DeepSeek V4.1 Flash Free and Beam Free. OpenCode Go is a subscription to curated open models for $10/month, and Go Plus costs $40/month with higher limits. OpenCode Enterprise pricing is available on request.

Is OpenCode open source?

Yes — OpenCode is open source.

Is OpenCode still maintained?

Yes — OpenCode is active. Its listing was last verified on October 18, 2026.

What are the best OpenCode alternatives?

The first editor-selected OpenCode alternatives are Codex, Goose, Claude Code, and more.

How does OpenCode score in our review?

The published editorial review lists OpenCode at 83/100 overall across speed, privacy, and developer experience. Check the review's evidence status and test metadata for its verification level.