CodeBuddy Code supports two methods of editor integration, which are IDE integration capabilities at the same level:
1. It is called by the IDE through the ACP (Agent Client Protocol) as a universal "agent server."
2. It is deeply integrated as a "backend companion process of the IDE plugin" through the --ide startup parameter and the /ide slash command.
Integration Method 1: ACP Protocol Integration
It is suitable for editors that support ACP, such as Zed, where CodeBuddy Code is used as a universal Agent Server.
Supported Editors
Zed Editor
Fully integrated through the ACP protocol, it supports:
Project context awareness
Tool operation agent (file read/write, terminal commands)
Permission request interaction
Real-time streaming responses
Integration Method 2: IDE Plugin Integration (--ide / /ide)
It is suitable for IDEs such as VS Code / Cursor / Windsurf / JetBrains, and is integrated through a plugin + local MCP server. The IDE-side plugin is responsible for:
Create and maintain MCP connections (SSE/WebSocket).
Pass context such as workspace information and selections to CodeBuddy through the MCP protocol.
Expose IDE capabilities such as openFile / openDiff / getDiagnostics / close_tab to CodeBuddy for invocation.
--ide Startup Parameter
When you start CodeBuddy directly in the terminal, you can use the --ide flag to have the CLI proactively attempt to connect to the IDE associated with the current working directory:
Behavior description:
CodeBuddy scans the lock files created by IDE plugins in the current user directory to detect available IDE instances.
An IDE is considered "valid" only when its workspace contains the current directory.
Automatic connection occurs only when exactly one valid IDE matches the current working directory. If zero or multiple matches are found, automatic connection is silently skipped, and you can use /ide to select manually.
Before detection, expired lock files corresponding to exited IDE processes are automatically cleaned up to avoid connecting to invalid ports.
After a successful connection, the CLI obtains the following through the IDE MCP server:
File/diff preview (openFile / openDiff)
Diagnostic information (getDiagnostics)
Selection change notification (selection_changed)
Note:
--ide is only a shortcut for connecting when you manually start the CLI from the IDE terminal. It does not actually start the IDE or the plugin.
/ide Slash Command
When you use IDE plugin integration in CodeBuddy's interactive interface, you can use the /ide command to view and manage the current IDE connection status:
Typical use cases include:
Check whether an IDE is currently connected and which IDE is connected.
When multiple IDEs are available, select the instance to connect to.
Manually disconnect or re-establish the MCP connection to the IDE.
The specific interactions are determined by the IDE integration UI, but the overall purpose is to manage the IDE integration status rather than to directly initiate a chat.
Choosing an Integration Method
If your editor natively supports ACP (for example, Zed), we recommend using ACP protocol integration:
Start with codebuddy --acp
The editor is responsible for the session UI and tool agent.
If you use VS Code / Cursor / JetBrains, or similar IDEs and install the CodeBuddy plugin from the plugin marketplace, we recommend using --ide / /ide plugin integration:
The plugin is responsible for starting the CodeBuddy process and establishing the MCP connection.
The CLI establishes and manages connections with the IDE through --ide / /ide.
The two methods are equivalent at the integration level. Both enable CodeBuddy to deeply collaborate with the IDE as an external Agent, but they differ in the access protocol and UI host.
Future Plans
Future versions will provide more enhanced features:
A more user-friendly DIFF display and modification confirmation process (integrated with IDE diff preview)
Provide richer context selection and visualization in the IDE plugin.
More official integrations with editors and IDEs