### Install Kimi CLI using uv Source: https://www.kimi.com/coding/docs/en/kimi-cli Installs the Kimi CLI Python package using the 'uv' package manager. This is the recommended method for installation on macOS and Linux. ```sh uv tool install --python 3.13 kimi-cli ``` -------------------------------- ### Install zsh-kimi-cli plugin for Oh My Zsh Source: https://www.kimi.com/coding/docs/en/kimi-cli Clones the zsh-kimi-cli plugin repository into the Oh My Zsh custom plugins directory. This enables Zsh integration with Kimi CLI for an enhanced shell experience. ```sh git clone https://github.com/MoonshotAI/zsh-kimi-cli.git \ ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/kimi-cli ``` -------------------------------- ### Install Claude Code using shell (macOS/Linux) and PowerShell (Windows) Source: https://www.kimi.com/coding/docs/en/third-party-agents Installs Node.js using fnm on macOS/Linux or Winget on Windows, then installs the Claude Code CLI globally via npm. It also runs a Node.js one‑liner to create or update the .claude.json configuration file with onboarding completion. Requires internet access and appropriate permissions to install global npm packages. ```sh # Install nodejs on macOS and Linux curl -fsSL https://fnm.vercel.app/install | bash # Open a new terminal so fnm takes effect fnm install 24.3.0 fnm default 24.3.0 fnm use 24.3.0 # Install claude-code npm install -g @anthropic-ai/claude-code --registry=https://registry.npmmirror.com # Initialize configuration node --eval " const homeDir = os.homedir(); const filePath = path.join(homeDir, '.claude.json'); if (fs.existsSync(filePath)) { const content = JSON.parse(fs.readFileSync(filePath, 'utf-8')); fs.writeFileSync(filePath, JSON.stringify({ ...content, hasCompletedOnboarding: true }, null, 2), 'utf-8'); } else { fs.writeFileSync(filePath, JSON.stringify({ hasCompletedOnboarding: true }), 'utf-8'); }" ``` ```powershell # Open a PowerShell terminal in Windows Terminal # Install nodejs on Windows # Right-click the Windows button and click “Terminal” # Then run the following in order winget install --id Git.Git -e --source winget # Or install Git via other methods, e.g., https://git-scm.com/install/windows winget install OpenJS.NodeJS # Or install Node.js via other methods, e.g., https://nodejs.org/en/download Set-ExecutionPolicy -Scope CurrentUser RemoteSigned # Close the terminal window and open a new one # Install claude-code npm install -g @anthropic-ai/claude-code --registry=https://registry.npmmirror.com # Initialize configuration node --eval " const homeDir = os.homedir(); const filePath = path.join(homeDir, '.claude.json'); if (fs.existsSync(filePath)) { const content = JSON.parse(fs.readFileSync(filePath, 'utf-8')); fs.writeFileSync(filePath, JSON.stringify({ ...content, hasCompletedOnboarding: true }, null, 2), 'utf-8'); } else { fs.writeFileSync(filePath, JSON.stringify({ hasCompletedOnboarding: true }), 'utf-8'); }" ``` -------------------------------- ### Configure Kimi For Coding model environment variables for Claude Code Source: https://www.kimi.com/coding/docs/en/third-party-agents Sets the required environment variables so Claude Code can communicate with the Kimi For Coding API. Includes export statements for Unix shells and $env assignments for PowerShell, followed by launching the Claude CLI. Replace with the actual key from the Kimi membership page. ```sh export ANTHROPIC_BASE_URL=https://api.kimi.com/coding/ export ANTHIC_AUTH_TOKEN= # Fill in the API Key generated on the membership page export ANTHROPIC_MODEL=kimi-for-coding export ANTHROPIC_SMALL_FAST_MODEL=kimi-for-coding claude ``` ```powershell $env:ANTHROPIC_BASE_URL="https://api.kimi.com/coding/"; $env:ANTHROPIC_AUTH_TOKEN="" # Fill in the API Key generated on the membership page $env:ANTHROPIC_MODEL="kimi-for-coding" $env:ANTHROPIC_SMALL_FAST_MODEL="kimi-for-coding" claude ``` -------------------------------- ### Upgrade Kimi CLI using uv Source: https://www.kimi.com/coding/docs/en/kimi-cli Upgrades the Kimi CLI package to the latest version using 'uv', with caching disabled. This ensures you have the most recent features and bug fixes. ```sh uv tool upgrade kimi-cli --no-cache ``` -------------------------------- ### Run Kimi CLI with MCP configuration Source: https://www.kimi.com/coding/docs/en/kimi-cli Executes the Kimi CLI command, specifying a custom MCP configuration file. This allows Kimi CLI to connect to the MCP servers defined in the provided JSON file. ```sh kimi --mcp-config-file /path/to/mcp.json ``` -------------------------------- ### Configure MCP servers for Kimi CLI Source: https://www.kimi.com/coding/docs/en/kimi-cli Defines multiple MCP (Multi-Cloud Platform) server configurations in a JSON file, including a remote server and a local chrome-devtools server. This configuration can be passed to Kimi CLI using the --mcp-config-file option. ```json { "mcpServers": { "context7": { "url": "https://mcp.context7.com/mcp", "headers": { "CONTEXT7_API_KEY": "YOUR_API_KEY" } }, "chrome-devtools": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest"] } } } ``` -------------------------------- ### Configure Zed editor for Kimi CLI ACP Source: https://www.kimi.com/coding/docs/en/kimi-cli Adds Kimi CLI as an agent server configuration in Zed's settings.json file. This enables Kimi CLI to be used with Zed via the Agent Client Protocol (ACP). ```json { "agent_servers": { "Kimi CLI": { "command": "kimi", "args": ["--acp"], "env": {} } } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.