OpenCode icon

OpenCode

OpenCode is an open source AI coding agent for understanding codebases, planning and implementing changes, and iterating on projects via terminal, desktop app, or IDE extension.

OpenCode

OpenCode overview

OpenCode is an open source AI coding agent for working with software projects from a terminal, desktop app, or IDE extension. It connects to the language-model provider or local model you configure and can help explain code, plan changes, and implement requested work in a project.

The documented workflow starts by installing the `opencode` command, configuring a provider, opening a project, and running `/init` so OpenCode can create an `AGENTS.md` file with project structure and coding-pattern context. Users can review plans before implementation, iterate on changes, and share selected conversations when collaboration or debugging requires a reference.

Key features

Terminal, desktop, and IDE access

Use OpenCode from a terminal-based interface, desktop app, or IDE extension, depending on how you prefer to work.

Flexible model access

Configure API keys for supported providers, use local models, or connect accounts such as GitHub Copilot and ChatGPT Plus or Pro.

LSP support

OpenCode automatically loads the appropriate Language Server Protocol servers for the language model, supporting more context-aware coding work.

Multi-session projects

Run multiple agent sessions in parallel on the same project when separate tasks or investigations need to proceed at once.

Plan and Build modes

Use Plan mode to review an implementation approach before changes are made, then switch to Build mode when ready.

Project-aware workflow

Create an `AGENTS.md` project file with `/init`, reference files with fuzzy search, attach images to prompts, and undo or redo changes when needed.

Practical use cases

  • Understand an existing codebase

    Ask OpenCode to explain unfamiliar files or authentication flows, using file references to focus the discussion on the relevant implementation.

  • Plan and build features

    Describe a feature, review the proposed steps in Plan mode, provide feedback, and then switch to Build mode to implement the approved approach.

  • Make targeted code changes

    Give a direct, well-scoped request for a change such as applying an existing route’s authentication logic to another route, then inspect or revise the result.

  • Translate design references into implementation

    Use image attachments and project context to communicate a visual reference or expected behavior when planning an interface change.

  • Coordinate parallel work

    Run separate sessions on the same project, or share a specific conversation link with teammates for debugging and review.

Pros and Cons

Pros

  • Open source and available across terminal, desktop, and IDE workflows.
  • Supports models from 75+ providers through Models.dev, including local models, according to the product site.
  • Includes a reviewable Plan mode, project initialization, and undo/redo controls for iterative coding work.
  • The home page states that OpenCode does not store users’ code or context data.
  • Sessions can be run in parallel and selectively shared through generated links.

Cons

  • Provider API access or an eligible connected account is needed to use a language model; the site does not present OpenCode as a standalone model service.
  • The documentation recommends WSL for the best Windows experience, and notes that OpenCode 1 and OpenCode 2 installations can conflict under their default command.

FAQ

How do I get started with OpenCode?

OpenCode is available as a terminal-based interface, desktop app, and IDE extension. In the terminal, install it using the documented script or package-manager methods, configure an LLM provider, navigate to a project, run `opencode`, and use `/init` to create an `AGENTS.md` file describing the project structure and coding patterns.

Do I need a separate AI subscription?

No single extra subscription is required by OpenCode itself. You need API access for the LLM provider you choose, and OpenCode supports provider accounts, local models, GitHub Copilot, ChatGPT Plus or Pro, and OpenCode Zen.

What is the typical OpenCode workflow?

OpenCode supports planning before implementation. Plan mode disables changes while it suggests an implementation approach; you can then switch back to Build mode to apply the changes. The agent can also explain a codebase, accept file references and images in prompts, and undo or redo changes.

How does OpenCode address privacy?

OpenCode's home page states that it does not store your code or context data. For Zen, the site says models are hosted in the United States and providers follow a zero-retention policy and do not use data for model training, with stated exceptions.

Can I share an OpenCode session with my team?

OpenCode can create a shareable link to a conversation with `/share`; conversations are not shared by default. This allows a session to be referenced or reviewed by a team without making every conversation public.

Quick Facts

Category
Developer Tool
Primary users
Developers working in software projects
Interfaces
Terminal, desktop app, and IDE extension
Model access
75+ providers through Models.dev, plus local models
Setup
Install the opencode command, configure a provider, then run it in a project
Source domain
opencode.ai