IDE Integration
Code CLI integrates with editors through three mechanisms: a dedicated VS Code extension, MCP server (HTTP/SSE) for tool access, and ACP (Agent Client Protocol) over stdio JSON-RPC for full agent control.
Quick Reference
VS Code Family (VS Code, Cursor, Windsurf, VSCodium)
Install the extension from the terminal or use the /open command inside Code CLI, which detects installed editors and offers a selectable list.
Install
What the extension provides
- Inline diff rendering for file edits
- File context awareness (open files feed into the agent)
- Command palette integration
- Automatic IDE detection via TERM_PROGRAM
MCP inside VS Code
The extension connects to Code CLI's MCP server for tool access. The endpoint runs on the same port as the Code CLI server:
Zed
Zed integrates through ACP (Agent Client Protocol) over stdio, giving full agent control — session management, streaming responses, permission prompts, tool calls, and file edits.
Configuration
Add to your Zed settings.json:
Zed launches codecli acp as a subprocess and communicates via stdin/stdout JSON-RPC.
What ACP provides in Zed
- Session management — new, load, resume, fork, and list sessions
- Streaming — real-time agent message chunks, reasoning blocks, tool call progress
- Permissions — inline prompts to allow once, always allow, or reject
- File edits — diff operations stream back with live patch application
- Model switching — change model and variant per-session from Zed UI
- Agent modes — switch between build, explore, plan, and other agents
- MCP servers — Zed passes MCP configs that Code CLI registers automatically
JetBrains (IntelliJ, PyCharm, WebStorm, CLion, GoLand, RustRover, etc.)
JetBrains IDEs connect via the MCP server. Start Code CLI in a terminal, note the server port (displayed on startup or in ~/.codecli/port), then install an MCP client plugin from the JetBrains marketplace and configure the endpoint.
JetBrains CLI launchers
The /open command detects these binaries if on PATH:
On macOS, create launchers via Tools > Create Command-line Launcher inside the IDE. On Linux, they are typically in /snap/bin/ or/usr/local/bin/.
Neovim / Vim
Use an MCP client plugin (e.g. nvim-mcp ormcp.nvim) and point it at the MCP server endpoint.
The /open command detects nvim andvim on PATH and shows a hint to open manually in a separate terminal since they are terminal-based editors.
Emacs
Use an MCP client package and connect to the MCP server endpoint.
Sublime Text
Use the LSP package with an MCP extension, pointing at the MCP server endpoint. The/open command detects subl on PATH and opens the project directory directly.
Helix / Kakoune
Terminal-based editors detected by /open. They show a hint since they cannot be launched in the background from within Code CLI TUI.
The /open Command
Type /open in the Code CLI prompt to open a searchable dialog of all detected editors on your system. Also available as/ide and /editor.
The dialog runs which in parallel for 23 known editors. Only editors found on PATH are shown, grouped by category:
- Editors — VS Code, Zed, Cursor, Windsurf, VSCodium, Sublime Text, Atom
- JetBrains — IntelliJ, PyCharm, WebStorm, CLion, GoLand, RustRover, RubyMine, PhpStorm, DataSpell
- Terminal — Neovim, Vim, Emacs, Helix, Kakoune, nano
GUI editors open in a detached background process. Terminal editors show a hint to run manually in a separate terminal.
MCP Server Reference
Code CLI's MCP server implements the Model Context Protocol (version 2024-11-05). It starts automatically when Code CLI runs.
The server port is available at ~/.codecli/port or displayed in the status bar. Transport options: HTTP (direct JSON-RPC over POST) and SSE (Server-Sent Events for streaming responses).
ACP Server Reference
The Agent Client Protocol provides full agent control for editors that support it (currently Zed). Start with:
This starts a stdio-based JSON-RPC server. The parent process communicates via stdin/stdout using newline-delimited JSON.
Protocol details
- Transport: stdio (newline-delimited JSON)
- Protocol version: 1
- Agent name: CodeCLI
- Auth: Terminal auth via
codecli auth login
Session lifecycle
ACP capabilities
Event types
The ACP server streams events back to the IDE in real time: