How to Use Kimi-CLI with Different IDEs: Zed, JetBrains, and VS Code Setup
You can integrate Kimi-CLI into any IDE that supports the Agent Client Protocol (ACP) by running kimi acp to start the ACP server and configuring your editor to connect to it.
The MoonshotAI/kimi-cli repository provides a Python-based AI assistant that works both from the command line and inside modern development environments. By leveraging the Agent Client Protocol (ACP), you can embed kimi-cli with different IDEs like Zed, JetBrains, and VS Code, enabling AI-assisted coding directly within your existing workflow.
Prerequisites
Before configuring IDE integration, ensure you have completed the following steps:
- Install Kimi-CLI using
pip install kimi-clior the provided installer. - Run
/loginonce to authenticate with the LLM provider. - Verify your target IDE supports ACP (most modern editors support this natively or via plugins).
How the ACP Integration Works
Kimi-CLI implements an Agent Client Protocol (ACP) server in src/kimi_cli/acp/__init__.py that manages communication between the IDE and the AI assistant. The integration follows this workflow:
- Start the ACP server using
kimi acp, which launches an HTTP server listening on localhost:8000 by default. - Load toolsets from
src/kimi_cli/soul/toolset.pyto handle file operations, command execution, and context management. - Connect the IDE using a JSON configuration that specifies the command, arguments, and environment variables.
- Process requests as the IDE sends JSON-RPC chat messages and receives LLM-generated replies with optional tool actions.
- Handle "Open-In" actions through
src/kimi_cli/web/api/open_in.pywhen tools request to open files in local applications like VS Code or Finder.
Setting Up Kimi-CLI in Zed
Zed provides native ACP support, making integration straightforward. Add the following configuration to ~/.config/zed/settings.json:
{
"agent_servers": {
"Kimi Code CLI": {
"type": "custom",
"command": "kimi",
"args": ["acp"],
"env": {}
}
}
}
The type field must be set to "custom", while command points to your kimi executable (use the full path if it is not on your $PATH). After saving, Zed's Agent panel will list Kimi Code CLI as a selectable agent, according to the guide in docs/en/guides/ides.md.
Configuring Kimi-CLI for JetBrains IDEs
For IntelliJ IDEA, PyCharm, WebStorm, and other JetBrains editors, ACP support comes through the AI Chat plugin. In the plugin's Configure ACP agents dialog, add this JSON entry:
{
"agent_servers": {
"Kimi Code CLI": {
"command": "~/.local/bin/kimi",
"args": ["acp"],
"env": {}
}
}
}
Ensure the command value contains the absolute path to the kimi binary (locate it by running which kimi). Once saved, select Kimi Code CLI from the Agent selector in the AI Chat panel to begin using kimi-cli with your JetBrains IDE.
Using Kimi-CLI with VS Code
The repository includes a dedicated VS Code extension that automates ACP server management. After installing the extension:
- Open the Kimi view in the sidebar.
- Click Start ACP to automatically launch
kimi acp. - The extension forwards chat messages via ACP and displays responses in the chat pane.
You can use the Open-In button to launch files directly in VS Code when the AI suggests file operations.
Handling Open-In Requests from the IDE
When Kimi needs to open a file or URL in a local application, it sends an open_in request handled by src/kimi_cli/web/api/open_in.py. The request payload follows this structure:
{
"app": "vscode",
"path": "/path/to/file.py"
}
The backend dispatches to platform-specific helpers (_open_in_macos, _open_in_windows, or _open_in_sync) and returns { "ok": true } upon success. You can also trigger this programmatically:
from kimi_cli.web.api.open_in import OpenInRequest, open_in
# Request to open a file in VS Code
request = OpenInRequest(app="vscode", path="/home/user/project/main.py")
await open_in(request) # Returns OpenInResponse(ok=True)
The frontend UI component that triggers these requests lives in web/src/features/chat/components/open-in-button.tsx.
Summary
- Kimi-CLI integrates with IDEs through the Agent Client Protocol (ACP) implemented in
src/kimi_cli/acp/__init__.py. - Start the ACP server with the command
kimi acpbefore configuring your IDE. - Zed requires adding a custom agent server entry to
~/.config/zed/settings.json. - JetBrains IDEs use the AI Chat plugin with a JSON configuration pointing to the
kimibinary. - VS Code provides a native extension that manages the ACP server lifecycle automatically.
- The Open-In API (
src/kimi_cli/web/api/open_in.py) handles launching files in external applications across macOS, Windows, and Linux.
Frequently Asked Questions
What is the Agent Client Protocol (ACP) used by Kimi-CLI?
The Agent Client Protocol (ACP) is a JSON-RPC based API that allows IDEs to communicate with AI assistants. When you run kimi acp, Kimi-CLI starts an HTTP server that speaks this protocol, enabling any ACP-compatible editor to send prompts and receive generated code, explanations, or tool commands.
Can I use Kimi-CLI with IDE extensions other than the official VS Code extension?
Yes. Since Kimi-CLI implements the open ACP standard, it works with any editor or extension that supports ACP, including Zed's native implementation and the JetBrains AI Chat plugin. You only need to provide the correct JSON configuration pointing to the kimi acp command.
How do I troubleshoot connection issues between my IDE and Kimi-CLI?
First, verify the ACP server is running by executing kimi acp in your terminal and checking that it listens on the expected port (default 8000). Ensure your IDE configuration uses the correct absolute path to the kimi executable and includes the acp argument. Check docs/en/guides/ides.md for platform-specific troubleshooting steps.
Does Kimi-CLI support opening files in applications other than VS Code?
Yes. The Open-In API in src/kimi_cli/web/api/open_in.py supports launching files in various applications including VS Code, Finder (macOS), iTerm, and system default handlers. The API automatically detects your operating system and uses the appropriate native method to open the specified path.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →