CachyCLI
Guide10 / Editors (ACP)
Guide · 10

Editors

CachyCLI speaks the same language editors use to run agents. That works in both directions: your editor can run CachyCLI, or CachyCLI can run the agent your editor already uses.

Run CachyCLI in your editor

Point the editor's external-agent setting at:

cachycli agent stdio
  • ▪Works with editors that support the agent standard — Zed, Neovim (CodeCompanion, avante.nvim) and Emacs (agent-shell).
  • ▪Sessions are the same ones you have in the terminal: start in one, continue in the other.
  • ▪Approvals appear in the editor, using the same four answers.

Use your editor's agent in the terminal

$ cachycli --backend acp --acp-command "opencode acp"

# or permanently
[agent]
backend = "acp"

[agent.acp]
command = "opencode"
args = ["acp"]

You get the same interface as always — thoughts, tool calls, plans and approvals — with the agent your editor is already configured for.

[agent.acp] url

An agent on another machine

The agent does not have to run where you type. Give CachyCLI its socket instead of a command and the whole protocol crosses the network — same sessions, same approvals, same streamed updates.

[agent]
provider = "acp"

[agent.acp]
url = "ws://build-box:8765"

That is the other half of agent serve: run the server where the repository, the credentials and the tools are, and drive it from anywhere. /provider shows the url as the connection.

Tips

  • ▪If the editor shows no output, run the agent command by hand first to see its error.
  • ▪Keep one session per project and rename it — both the editor and the terminal will show the same name.

Related

More on connecting tools is in MCP servers, and on choosing what runs the model in Providers.

agent serve

ACP over a socket

cachycli agent stdio is the usual way an editor talks to CachyCLI. The same ACP server also runs over a WebSocket: start cachycli agent serve --port 8765 and a client that opens with JSON-RPC (initialize) gets the full protocol on that socket — sessions, prompts, permissions and streaming updates. Clients that send a plain {"prompt": "…"} instead get the simple event protocol, so both kinds can share one port.