OpenCode
An open-source AI coding agent for the terminal, with a beta desktop app and separate agents for building and read-only planning.
- GitHub stars
- 211k
- Last commit
- today
- Latest release
- v1.18.34
- Licence
- MIT

OpenCode is an open-source coding agent that helps developers write, change and understand code using AI models. It is built in TypeScript, released under the MIT license, and installed through an install script or, in beta, as a desktop application for macOS, Windows and Linux.
It ships with two built-in agents that you switch between with the Tab key. The build agent has full access for everyday development work, while the plan agent is read-only: it denies file edits by default and asks permission before running shell commands, which suits exploring an unfamiliar codebase or planning a change. A general subagent handles complex searches and multistep tasks and can be called with @general in messages.
Configuration is covered in the project documentation, and the install location can be controlled with environment variables. OpenCode suits developers who prefer working from the command line and want an agent whose source code they can read and modify.
Key features
- Built-in build agent with full development access
- Read-only plan agent for code exploration
- Permission prompts before running shell commands
- General subagent for multistep searches
- Desktop app in beta for macOS, Windows and Linux
- Tab key to switch between agents
Pricing: Free and open source under the MIT license.



