OpenCode
OpenCode is an open source coding agent that can inspect a repository, explain unfamiliar code, edit files, run terminal commands, and build features from written instructions. You can use it in the terminal, through its desktop application, or inside editors including VS Code, Cursor, Zed, Windsurf, and VSCodium.
You are not tied to one AI company. OpenCode supports more than 75 model providers through Models.dev, including OpenAI, Anthropic, Google, OpenRouter, Amazon Bedrock, and local models. You can also sign in with an existing ChatGPT Plus or Pro account or GitHub Copilot subscription.
OpenCode Zen provides another route. It is an optional model gateway maintained by the OpenCode team, with selected coding models, temporary free options, and pay as you go usage. You can ignore Zen completely and connect your own API keys or local model server.
Run `/init` inside a project and OpenCode analyses the repository before creating an `AGENTS.md` file with project structure and coding conventions. That file can be committed to Git, giving future sessions the same instructions without making you explain the repository again.
There are separate Plan and Build modes. Plan mode lets the agent inspect the code and propose an implementation without editing anything. Switch to Build mode when the approach looks right. OpenCode also supports image attachments, file references, undo and redo commands, custom agents, reusable skills, MCP servers, plugins, and project specific commands.
The built in LSP support gives the model access to language errors, definitions, and references. Multiple sessions can run against the same project, which is useful when one agent is researching a bug while another works on a separate feature.
Permission rules control file reads, edits, terminal commands, web requests, external directories, skills, and subagents. Each action can be allowed, blocked, or set to request approval. These controls deserve attention before you let an agent run commands inside a production repository.
Code and context are not stored by OpenCode itself. Processing happens locally or through direct requests to your chosen model provider, so that provider’s data policy still matters. Conversation sharing is manual by default. Using `/share` uploads the session and associated data to OpenCode’s hosted sharing service, and teams handling private code can disable sharing entirely.
The application is free and released under the MIT licence. Model use may still cost money through Zen or whichever API provider you connect. Some free Zen models are temporary, so they should not be treated as a permanent zero cost allowance. Enterprise access adds central configuration, SSO, approved model controls, and internal AI gateway support.
OpenCode makes sense for developers who want model choice, local model support, and detailed control over how an agent touches their repository. If you want a coding assistant with no provider setup, no configuration files, and one fixed model, there are simpler options.
- Open source AI coding agent
- Terminal, desktop, and IDE interfaces
- Desktop support for macOS, Windows, and Linux
- Extensions for VS Code, Cursor, Zed, Windsurf, and VSCodium
- More than 75 model providers
- OpenAI, Anthropic, Google, OpenRouter, Bedrock, and local model support
- ChatGPT Plus, ChatGPT Pro, and GitHub Copilot login
- Optional OpenCode Zen model gateway
- Plan and Build modes
- Automatic `AGENTS.md` project instructions
- LSP access for code intelligence
- Parallel sessions on the same project
- File references and image attachments
- Granular command and file permissions
- Undo and redo support
- Custom agents, commands, plugins, and skills
- MCP server support
- Manual session sharing
- GitHub and GitLab integrations
- Enterprise SSO and internal gateway options
TRY IT