OpenCode is an open-source AI coding agent built for developers, designed to enhance productivity and streamline development workflows. It serves as a versatile tool that assists in writing, debugging, refactoring, and exploring codebases with the help of advanced AI capabilities.
Key Features:
Dual-Agent System: OpenCode includes two built-in agents—build (full-access for development) and plan (read-only for analysis)—allowing users to switch between modes depending on their needs. The plan agent is ideal for exploring unfamiliar codebases or planning changes without risking unintended edits.
Real-Time Collaboration: Built with a focus on seamless integration, OpenCode supports real-time collaboration and advanced language server protocol (LSP) capabilities, making it easier to work across teams and projects.
Cross-Platform Support: Available as a command-line tool and a beta desktop application, OpenCode caters to developers on macOS, Windows, and Linux, ensuring flexibility and accessibility.
Audience & Benefit:
Ideal for software developers, coders, and engineers seeking to accelerate their workflow and improve code quality. OpenCode empowers users to write cleaner, more efficient code while reducing the time spent on debugging or planning changes. Its ability to integrate with existing development tools makes it a valuable addition to any developer's toolkit.
OpenCode can be installed via winget, ensuring easy setup across supported platforms.
# YOLO
curl -fsSL https://opencode.ai/install | bash
# Package managers
npm i -g opencode-ai@latest # or bun/pnpm/yarn
scoop bucket add extras; scoop install extras/opencode # Windows
choco install opencode # Windows
brew install opencode # macOS and Linux
paru -S opencode-bin # Arch Linux
mise use -g opencode # Any OS
nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch
> [!TIP]
> Remove versions older than 0.1.x before installing.
If you're interested in contributing to OpenCode, please read our contributing docs before submitting a pull request.
Building on OpenCode
If you are working on a project that's related to OpenCode and is using "opencode" as a part of its name; for example, "opencode-dashboard" or "opencode-mobile", please add a note to your README to clarify that it is not built by the OpenCode team and is not affiliated with us in any way.
FAQ
How is this different from Claude Code?
It's very similar to Claude Code in terms of capability. Here are the key differences:
100% open source
Not coupled to any provider. Although we recommend the models we provide through OpenCode Zen; OpenCode can be used with Claude, OpenAI, Google or even local models. As models evolve the gaps between them will close and pricing will drop so being provider-agnostic is important.
Out of the box LSP support
A focus on TUI. OpenCode is built by neovim users and the creators of terminal.shop; we are going to push the limits of what's possible in the terminal.
A client/server architecture. This for example can allow OpenCode to run on your computer, while you can drive it remotely from a mobile app. Meaning that the TUI frontend is just one of the possible clients.