Files
Hermes Agent e4d91aadf9 Initial commit: homelab infrastructure wiki
- Full Obsidian vault content
- Host configs (ice, grizzley, ubuntu, proxmox, truenas, panda, hyte)
- Media stack documentation
- Traefik HA setup
- Automation scripts
- Bachelor party planning
2026-05-24 16:08:40 -07:00

96 lines
2.9 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
type: agent-doc
agent: OpenCode
source: https://opencode.ai/docs/acp/
scraped: 2026-04-28T21:02:06.607578+00:00
content_hash: 189daad2
---
# ACP Support
Use OpenCode in any ACP-compatible editor.
OpenCode supports the Agent Client Protocol or (ACP), allowing you to use it directly in compatible editors and IDEs.
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 configuration (~/.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:
```
[ { "bindings": { "cmd-alt-o": [ "agent::NewExternalAgentThread", { "agent": { "custom": { "name": "OpenCode", "command": { "command": "opencode", "args": ["acp"] } } } } ] } }]
```
---
### JetBrains IDEs
Add to your JetBrains IDE acp.json according to the documentation:
```
{ "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 configuration:
```
{ acp_providers = { ["opencode"] = { command = "opencode", args = { "acp" } } }}
```
If you need to pass environment variables:
```
{ 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, add the following to your Neovim config:
```
require("codecompanion").setup({ interactions = { 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 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:
- 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