Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions packages/docs/1-0.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Migrating to 1.0
description: What's new in OpenCode 1.0.
---

OpenCode 1.0 is a complete rewrite of the TUI.

We moved from the go+bubbletea based TUI which had performance and capability issues to an in-house framework (OpenTUI) written in zig+solidjs.

The new TUI works like the old one since it connects to the same opencode server.

## Upgrading

You should not be autoupgraded to 1.0 if you are currently using a previous
version. However some older versions of OpenCode always grab latest.

To upgrade manually, run

```bash
$ opencode upgrade 1.0.0
```

To downgrade back to 0.x, run

```bash
$ opencode upgrade 0.15.31
```

## UX changes

The session history is more compressed, only showing full details of the edit and bash tool.

We added a command bar which almost everything flows through. Press ctrl+p to bring it up in any context and see everything you can do.

Added a session sidebar (can be toggled) with useful information.

We removed some functionality that we weren't sure anyone actually used. If something important is missing please open an issue and we'll add it back quickly.

## Breaking changes

### Keybinds renamed

- messages_revert -> messages_undo
- switch_agent -> agent_cycle
- switch_agent_reverse -> agent_cycle_reverse
- switch_mode -> agent_cycle
- switch_mode_reverse -> agent_cycle_reverse

### Keybinds removed

- messages_layout_toggle
- messages_next
- messages_previous
- file_diff_toggle
- file_search
- file_close
- file_list
- app_help
- project_init
- tool_details
- thinking_blocks
1 change: 0 additions & 1 deletion packages/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ Install our GitHub app from your [dashboard](https://dashboard.mintlify.com/sett
- If a page loads as a 404: Make sure you are running in a folder with a valid `docs.json`.

### Resources

- [Mintlify documentation](https://mintlify.com/docs)
150 changes: 150 additions & 0 deletions packages/docs/acp.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
title: ACP Support
description: Use OpenCode in any ACP-compatible editor.
---

OpenCode supports the [Agent Client Protocol](https://agentclientprotocol.com) or (ACP), allowing you to use it directly in compatible editors and IDEs.

<Tip>
**TIP**

For a list of editors and tools that support ACP, check out the [ACP progress report](https://zed.dev/blog/acp-progress-report#available-now).
</Tip>

ACP is an open protocol that standardizes communication between code editors and AI coding agents.

## Configure

To use OpenCode via ACP, configure your editor to run the `opencode acp` command.

The command starts OpenCode as an ACP-compatible subprocess that communicates with your editor over JSON-RPC via stdio.

Below are examples for popular editors that support ACP.

### Zed

Add to your [Zed](https://zed.dev) configuration (`~/.config/zed/settings.json`):

```json ~/.config/zed/settings.json
{
"agent_servers": {
"OpenCode": {
"command": "opencode",
"args": ["acp"]
}
}
}
```

To open it, use the `agent: new thread` action in the **Command Palette**.

You can also bind a keyboard shortcut by editing your `keymap.json`:

```json keymap.json
[
{
"bindings": {
"cmd-alt-o": [
"agent::NewExternalAgentThread",
{
"agent": {
"custom": {
"name": "OpenCode",
"command": {
"command": "opencode",
"args": ["acp"]
}
}
}
}
]
}
}
]
```

### JetBrains IDEs

Add to your [JetBrains IDE](https://www.jetbrains.com/) acp.json according to the [documentation](https://www.jetbrains.com/help/ai-assistant/acp.html):

```json acp.json
{
"agent_servers": {
"OpenCode": {
"command": "/absolute/path/bin/opencode",
"args": ["acp"]
}
}
}
```

To open it, use the new 'OpenCode' agent in the AI Chat agent selector.

### Avante.nvim

Add to your [Avante.nvim](https://github.com/yetone/avante.nvim) configuration:

```lua
{
acp_providers = {
["opencode"] = {
command = "opencode",
args = { "acp" }
}
}
}
```

If you need to pass environment variables:

```lua highlight={6-8}
{
acp_providers = {
["opencode"] = {
command = "opencode",
args = { "acp" },
env = {
OPENCODE_API_KEY = os.getenv("OPENCODE_API_KEY")
}
}
}
}
```

### CodeCompanion.nvim

To use OpenCode as an ACP agent in [CodeCompanion.nvim](https://github.com/olimorris/codecompanion.nvim), add the following to your Neovim config:

```lua
require("codecompanion").setup({
strategies = {
chat = {
adapter = {
name = "opencode",
model = "claude-sonnet-4",
},
},
},
})
```

This config sets up CodeCompanion to use OpenCode as the ACP agent for chat.

If you need to pass environment variables (like `OPENCODE_API_KEY`), refer to [Configuring Adapters: Environment Variables](https://codecompanion.olimorris.dev/configuration/adapters#environment-variables-setting-an-api-key) in the CodeCompanion.nvim documentation for full details.

## Support

OpenCode works the same via ACP as it does in the terminal. All features are supported:

<Note>
**NOTE**

Some built-in slash commands like `/undo` and `/redo` are currently unsupported.
</Note>

- Built-in tools (file operations, terminal commands, etc.)
- Custom tools and slash commands
- MCP servers configured in your OpenCode config
- Project-specific rules from `AGENTS.md`
- Custom formatters and linters
- Agents and permissions system
Loading