### Start Kimi Web UI Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-command.html Starts the Kimi web UI with default settings, automatically opening the browser. ```bash kimi web ``` -------------------------------- ### MCP Configuration File Example Source: https://moonshotai.github.io/kimi-cli/en/customization/mcp.html An example of the MCP configuration file (`~/.kimi/mcp.json`) showing how to define HTTP and stdio servers with their respective configurations. ```json { "mcpServers": { "context7": { "url": "https://mcp.context7.com/mcp", "headers": { "CONTEXT7_API_KEY": "your-key" } }, "chrome-devtools": { "command": "npx", "args": ["chrome-devtools-mcp@latest"], "env": { "SOME_VAR": "value" } } } } ``` -------------------------------- ### Install Kimi Code CLI using uv Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html If you already have uv installed, you can use this command to install Kimi Code CLI, specifying the desired Python version. ```shell uv tool install --python 3.13 kimi-cli ``` -------------------------------- ### QuestionResponse Example (with answers) Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Example of a client response providing selected answers to a question request. ```json {"jsonrpc": "2.0", "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567890", "result": {"request_id": "q-1", "answers": {"Which language should I use?": "Python"}}} ``` -------------------------------- ### Install Root Plugin Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html Install a plugin directly from a Git repository's root. ```bash kimi plugin install https://github.com/user/repo.git ``` -------------------------------- ### Start Kimi Web UI on a Specific Port Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-command.html Starts the Kimi web UI and binds it to a specified port. ```bash kimi web --port 8080 ``` -------------------------------- ### Install Plugin from Subdirectory Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html Install a plugin located in a subdirectory of a multi-plugin Git repository. ```bash kimi plugin install https://github.com/user/repo.git/plugins/my-plugin ``` -------------------------------- ### Install Plugin from Git Repository Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html Install plugins directly from a Git repository. The CLI will clone the repository and set up the plugin. ```sh kimi plugin install git+https://github.com/user/repo.git ``` -------------------------------- ### Example Task: Show Directory Structure Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html An example of a natural language prompt to ask Kimi Code CLI to display the current project's directory structure. ```shell Show me the directory structure of this project ``` -------------------------------- ### Install Plugin from Specific Branch Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html Install a plugin by specifying a branch using a browser-style GitHub URL. ```bash kimi plugin install https://github.com/user/repo/tree/develop/plugins/my-plugin ``` -------------------------------- ### Start Kimi Code CLI in a Project Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html Navigate to your project directory and run this command to start Kimi Code CLI. You will then be prompted to configure API access. ```shell cd your-project kimi ``` -------------------------------- ### List Installed Plugins Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html View a list of all plugins currently installed in Kimi Code CLI. ```bash kimi plugin list ``` -------------------------------- ### Start Kimi Web UI with LAN Access Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-command.html Starts the Kimi web UI and binds it to all network interfaces, allowing access from other devices on the local network. ```bash kimi web --host 0.0.0.0 ``` -------------------------------- ### Set Plan Mode Request Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html An example JSON-RPC request to enable plan mode. Ensure the client declares `capabilities.supports_plan_mode: true` during initialization. ```json {"jsonrpc": "2.0", "method": "set_plan_mode", "id": "8da7d810-9dad-11d1-80b4-00c04fd430c8", "params": {"enabled": true}} ``` -------------------------------- ### Install Kimi Code CLI on Windows Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html Execute this PowerShell command to install Kimi Code CLI on Windows. It downloads and runs the installation script. ```powershell Invoke-RestMethod https://code.kimi.com/install.ps1 | Invoke-Expression ``` -------------------------------- ### Start Web UI Server Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-command.html Starts the Web UI server for accessing Kimi Code CLI through a browser. If the default port is busy, it will attempt to use the next available port. ```bash kimi web [OPTIONS] ``` -------------------------------- ### Verify Kimi Code CLI Installation Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html After installation, run this command to check if Kimi Code CLI is installed correctly and to see its version. ```shell kimi --version ``` -------------------------------- ### Install Kimi Code CLI on Linux/macOS Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html Use this command to install Kimi Code CLI on Linux or macOS systems. It first installs uv, a Python package manager, and then installs Kimi Code CLI. ```shell curl -LsSf https://code.kimi.com/install.sh | bash ``` -------------------------------- ### Complete TOML Configuration Example Source: https://moonshotai.github.io/kimi-cli/en/configuration/config-files.html An example of a comprehensive TOML configuration file, including settings for default parameters, providers, models, loop control, background tasks, services, and MCP client. ```toml default_model = "kimi-for-coding" default_thinking = false default_yolo = false skip_afk_prompt_injection = false default_plan_mode = false default_editor = "" theme = "dark" show_thinking_stream = true merge_all_available_skills = true telemetry = true [providers.kimi-for-coding] type = "kimi" base_url = "https://api.kimi.com/coding/v1" api_key = "sk-xxx" [models.kimi-for-coding] provider = "kimi-for-coding" model = "kimi-for-coding" max_context_size = 262144 [loop_control] max_steps_per_turn = 1000 max_retries_per_step = 3 max_ralph_iterations = 0 reserved_context_size = 50000 compaction_trigger_ratio = 0.85 [background] max_running_tasks = 4 keep_alive_on_exit = false agent_task_timeout_s = 900 [services.moonshot_search] base_url = "https://api.kimi.com/coding/v1/search" api_key = "sk-xxx" [services.moonshot_fetch] base_url = "https://api.kimi.com/coding/v1/fetch" api_key = "sk-xxx" [mcp.client] tool_call_timeout_ms = 60000 ``` -------------------------------- ### Install Plugin from Local Directory Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html Use this command to install a plugin located in a local directory. Ensure the path points to the root of your plugin. ```sh kimi plugin install /path/to/my-plugin ``` -------------------------------- ### QuestionRequest Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Example of a structured question request sent to the client. ```json {"jsonrpc": "2.0", "method": "request", "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567890", "params": {"type": "QuestionRequest", "payload": {"id": "q-1", "tool_call_id": "tc-1", "questions": [{"question": "Which language should I use?", "header": "Lang", "options": [{"label": "Python", "description": "Widely used, large ecosystem"}, {"label": "Rust", "description": "High performance, memory safe"}], "multi_select": false}]}}} ``` -------------------------------- ### QuestionResponse Example (empty answers) Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Example of a client response when structured questions are not supported or dismissed by the user. ```json {"jsonrpc": "2.0", "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567890", "result": {"request_id": "q-1", "answers": {}}} ``` -------------------------------- ### Install zsh-kimi-cli Plugin Source: https://moonshotai.github.io/kimi-cli/en/guides/integrations.html Install the zsh-kimi-cli plugin using git clone. Ensure the ZSH_CUSTOM environment variable is correctly set. ```shell git clone https://github.com/MoonshotAI/zsh-kimi-cli.git \ ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/kimi-cli ``` -------------------------------- ### View Plugin Details Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html Display detailed information about a specific installed plugin. ```bash kimi plugin info my-plugin ``` -------------------------------- ### Set Plan Mode Success Response Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Example of a successful response after enabling plan mode. The `plan_mode` field indicates the new state. ```json {"jsonrpc": "2.0", "id": "8da7d810-9dad-11d1-80b4-00c04fd430c8", "result": {"status": "ok", "plan_mode": true}} ``` -------------------------------- ### CI/CD Integration Example Source: https://moonshotai.github.io/kimi-cli/en/customization/print-mode.html Automate code checks or generation in CI workflows by running Kimi Code CLI in print mode. ```sh kimi --print -p "Check if there are any obvious security issues in the src/ directory, output a JSON format report" ``` -------------------------------- ### Approval Response Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Example of a response from the client to an approval request, indicating whether to approve or reject the action. ```json {"jsonrpc": "2.0", "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "result": {"request_id": "approval-1", "response": "approve"}} ``` -------------------------------- ### Set Plan Mode Error Response Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html An example error response when plan mode is not supported by the environment. This occurs if the client did not declare support. ```json {"jsonrpc": "2.0", "id": "8da7d810-9dad-11d1-80b4-00c04fd430c8", "error": {"code": -32000, "message": "Plan mode is not supported"}} ``` -------------------------------- ### PowerPoint Creation Skill Example Source: https://moonshotai.github.io/kimi-cli/en/customization/skills.html An example SKILL.md file for a 'pptx' skill, outlining the workflow and design principles for creating and editing PowerPoint presentations. ```markdown --- name: pptx description: Create and edit PowerPoint presentations --- ## PPT Creation Workflow When creating presentations, follow these steps: 1. Analyze content structure, plan slide outline 2. Choose appropriate color scheme and fonts 3. Use python-pptx library to generate .pptx files ## Design Principles - Each slide focuses on one topic - Keep text concise, use bullet points instead of long paragraphs - Maintain clear visual hierarchy with distinct titles, body, and notes - Use consistent colors, avoid more than 3 main colors ``` -------------------------------- ### Provider Configuration Example Source: https://moonshotai.github.io/kimi-cli/en/configuration/config-files.html This TOML snippet demonstrates how to configure an API provider, including its type, base URL, API key, and custom headers. ```toml [providers.moonshot-cn] type = "kimi" base_url = "https://api.moonshot.cn/v1" api_key = "sk-xxx" custom_headers = { "X-Custom-Header" = "value" } ``` -------------------------------- ### External Tool Call Request Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Example of a request to call an external tool, including the tool's name and arguments. ```json {"jsonrpc": "2.0", "method": "request", "id": "a3bb189e-8bf9-3888-9912-ace4e6543002", "params": {"type": "ToolCallRequest", "payload": {"id": "tc-1", "name": "open_in_ide", "arguments": "{\"path\":\"README.md\"}"}}} ``` -------------------------------- ### Python Project Standards Skill Example Source: https://moonshotai.github.io/kimi-cli/en/customization/skills.html An example SKILL.md file for a 'python-project' skill, intended to define standards for Python project development. ```markdown --- name: python-project description: Python project development standards, including code style, testing, and dependency management --- ``` -------------------------------- ### kimi web Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-command.html Starts the Web UI server for accessing Kimi Code CLI through a browser. ```APIDOC ## kimi web ### Description Start the Web UI server to access Kimi Code CLI through a browser. ### Method CLI Command ### Endpoint N/A ### Parameters #### Query Parameters - **`--host TEXT`** (`-h`) - Optional - Host address to bind to (default: `127.0.0.1`) - **`--network`** (`-n`) - Optional - Listen on all network interfaces (bind to `0.0.0.0`) with auto-detected LAN IP display - **`--port INTEGER`** (`-p`) - Optional - Port number to bind to (default: `5494`) - **`--reload`** - Optional - Enable auto-reload (development mode) - **`--open / --no-open`** - Optional - Automatically open browser (default: enabled) ### Notes If the default port is in use, the server will pick the next available port (by default `5494`–`5503`) and print a notice in the terminal. ``` -------------------------------- ### Start ACP Server Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-acp.html Starts a multi-session ACP (Agent Client Protocol) server. This command is used to enable IDE integrations and custom ACP client development. ```bash kimi acp ``` -------------------------------- ### Install Kimi Agent (Rust) on Linux Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Installs the Kimi Agent binary on Linux (x86_64) using curl and tar. Ensure the binary is moved to a directory in your system's PATH. ```sh # Linux (x86_64) curl -L https://github.com/MoonshotAI/kimi-agent-rs/releases/latest/download/kimi-agent-x86_64-unknown-linux-gnu.tar.gz | tar xz sudo mv kimi-agent /usr/local/bin/ ``` -------------------------------- ### Hook command JSON input example Source: https://moonshotai.github.io/kimi-cli/en/customization/hooks.html Example of the JSON context received by hook commands via stdin, including session ID, current working directory, hook event name, tool name, and tool input. ```json { "session_id": "abc123", "cwd": "/path/to/project", "hook_event_name": "PreToolUse", "tool_name": "Shell", "tool_input": {"command": "rm -rf /"} } ``` -------------------------------- ### Provide Input for Print Mode Source: https://moonshotai.github.io/kimi-cli/en/faq.html If there is no output in `--print` mode, ensure input is provided. This example shows how to use `--prompt` to provide input. ```bash kimi --print --prompt "Hello" ``` -------------------------------- ### Enable YOLO mode at startup Source: https://moonshotai.github.io/kimi-cli/en/guides/interaction.html Use this command to enable YOLO mode when starting Kimi Code CLI. YOLO mode automatically approves all tool calls. ```sh kimi --yolo ``` -------------------------------- ### Display Kimi Code CLI Info (Text) Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-info.html Use this command to get a human-readable overview of your Kimi Code CLI installation. It shows the CLI version, agent spec versions, wire protocol, and Python version. ```sh $ kimi info kimi-cli version: 1.20.0 agent spec versions: 1 wire protocol: 1.10 python version: 3.13.1 ``` -------------------------------- ### Configure Model with Capabilities Source: https://moonshotai.github.io/kimi-cli/en/configuration/providers.html Example TOML configuration for a Gemini model, specifying its provider, model name, context size, and supported capabilities like 'thinking' and 'image_in'. ```toml [models.gemini-3-pro-preview] provider = "gemini" model = "gemini-3-pro-preview" max_context_size = 262144 capabilities = ["thinking", "image_in"] ``` -------------------------------- ### Initialize Project Analysis Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html If your project lacks an AGENTS.md file, use the `/init` command. Kimi Code CLI will analyze the project and generate this file to help the AI understand the project structure. ```shell /init ``` -------------------------------- ### Initialize Client with External Tools Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Use the 'initialize' method to set up the client connection and declare external tools. The server responds with accepted and rejected tool registrations. ```json {"jsonrpc": "2.0", "method": "initialize", "id": "550e8400-e29b-41d4-a716-446655440000", "params": {"protocol_version": "1.7", "client": {"name": "my-ui", "version": "1.0.0"}, "capabilities": {"supports_question": true}, "external_tools": [{"name": "open_in_ide", "description": "Open file in IDE", "parameters": {"type": "object", "properties": {"path": {"type": "string"}}, "required": ["path"]}}]}} ``` ```json {"jsonrpc": "2.0", "id": "550e8400-e29b-41d4-a716-446655440000", "result": {"protocol_version": "1.7", "server": {"name": "Kimi Code CLI", "version": "1.14.0"}, "slash_commands": [{"name": "init", "description": "Analyze the codebase ...", "aliases": []}], "capabilities": {"supports_question": true}, "external_tools": {"accepted": ["open_in_ide"], "rejected": []}}} ``` -------------------------------- ### View Available Commands Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html Enter `/help` in the Kimi Code CLI to see a list of all available slash commands and usage tips. ```shell /help ``` -------------------------------- ### Switch to Kimi Web UI from Terminal Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-web.html Enter this command in the terminal to quickly switch to the Web UI. It automatically starts the Web UI server and opens the current session in the browser. ```sh /web ``` -------------------------------- ### Approval Request Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Example of an approval request sent from the agent to the client, requiring confirmation for an action. ```json {"jsonrpc": "2.0", "method": "request", "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "params": {"type": "ApprovalRequest", "payload": {"id": "approval-1", "tool_call_id": "tc-1", "sender": "Shell", "action": "run shell command", "description": "Run command `ls`", "display": []}}} ``` -------------------------------- ### Cancel Error Response Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html An example error response when attempting to cancel when no agent turn is in progress. ```json {"jsonrpc": "2.0", "id": "6ba7b811-9dad-11d1-80b4-00c04fd430c8", "error": {"code": -32000, "message": "No agent turn is in progress"}} ``` -------------------------------- ### Understand Project: File Explanation Source: https://moonshotai.github.io/kimi-cli/en/guides/use-cases.html Request explanations for specific files to understand their purpose and functionality within the project. ```natural_language Explain what the src/core/scheduler.py file does ``` -------------------------------- ### Show Version and Environment Info Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Use this command to display the current version and environment details of the Kimi Agent. ```bash kimi-agent info ``` -------------------------------- ### Event Notification Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html An example of an event notification, specifically a 'ContentPart' event with text payload, sent from the agent to the client. ```json {"jsonrpc": "2.0", "method": "event", "params": {"type": "ContentPart", "payload": {"type": "text", "text": "Hello"}}} ``` -------------------------------- ### Update Package Installation and Command Source: https://moonshotai.github.io/kimi-cli/en/release-notes/breaking-changes.html The package name has changed from `ensoul` to `kimi-cli`. Update installation commands and the CLI command used. ```bash pip install ensoul -> pip install kimi-cli or uv tool install kimi-cli ensoul -> kimi ``` -------------------------------- ### External Tool Call Response Example Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Example of a response from an external tool call, indicating success or failure and returning output. ```json {"jsonrpc": "2.0", "id": "a3bb189e-8bf9-3888-9912-ace4e6543002", "result": {"tool_call_id": "tc-1", "return_value": {"is_error": false, "output": "Opened", "message": "Opened README.md in IDE", "display": []}}} ``` -------------------------------- ### Start Kimi Web UI Without Opening Browser Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-command.html Starts the Kimi web UI but prevents the browser from opening automatically. ```bash kimi web --no-open ``` -------------------------------- ### Complete Kimi CLI Plugin Example Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html A comprehensive plugin manifest in JSON format. It defines plugin metadata, version, description, and integrates external tools like a Python greeting script and a TypeScript calculator script, specifying their commands and parameter schemas. ```json { "name": "sample-plugin", "version": "1.0.0", "description": "Sample plugin demonstrating Skills + Tools", "tools": [ { "name": "py_greet", "description": "Generate a greeting message (Python tool)", "command": ["python3", "scripts/greet.py"], "parameters": { "type": "object", "properties": { "name": { "type": "string", "description": "Name to greet" }, "lang": { "type": "string", "enum": ["en", "zh", "ja"], "description": "Language" } }, "required": ["name"] } }, { "name": "ts_calc", "description": "Evaluate a math expression (TypeScript tool)", "command": ["npx", "tsx", "scripts/calc.ts"], "parameters": { "type": "object", "properties": { "expression": { "type": "string", "description": "Math expression to evaluate" } }, "required": ["expression"] } } ] } ``` -------------------------------- ### Configure API Source Source: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html Run the `/login` command within the Kimi Code CLI to start the API source configuration process. This typically involves selecting a platform and authorizing access. ```shell /login ``` -------------------------------- ### Launch Agent Tracing Visualizer Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-vis.html Run `kimi vis` in the terminal to start the Visualizer. The server automatically opens a browser to the default address `http://127.0.0.1:5495` or the next available port if the default is in use. ```sh kimi vis ``` -------------------------------- ### Example TOML Configuration File Source: https://moonshotai.github.io/kimi-cli/en/configuration/overrides.html A sample TOML configuration file defining default model and provider settings. This serves as a base configuration that can be overridden by CLI flags or environment variables. ```toml default_model = "kimi-for-coding" [providers.kimi-for-coding] type = "kimi" base_url = "https://api.kimi.com/coding/v1" api_key = "sk-config" [models.kimi-for-coding] provider = "kimi-for-coding" model = "kimi-for-coding" max_context_size = 262144 ``` -------------------------------- ### Valid JSONL Input Example Source: https://moonshotai.github.io/kimi-cli/en/faq.html When using `--input-format stream-json`, the input must be valid JSONL, with each line being a complete JSON object. This is a correct example. ```json {"role": "user", "content": "Hello"} ``` -------------------------------- ### Select Built-in Agent Source: https://moonshotai.github.io/kimi-cli/en/customization/agents.html Use the `--agent` flag to select a built-in agent at startup. The `okabe` agent is experimental and includes additional tools. ```sh kimi --agent okabe ``` -------------------------------- ### Open Create Session in Directory Source: https://moonshotai.github.io/kimi-cli/en/reference/kimi-web.html Creates a session directly in a specified working directory. ```url http://127.0.0.1:5494?action=create-in-dir&workDir=/path/to/project ``` -------------------------------- ### Initialize Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Initializes the connection with the client, providing capabilities and external tools. The server responds with its protocol version, capabilities, and supported tools. ```APIDOC ## Initialize ### Description Initializes the connection with the client, providing capabilities and external tools. The server responds with its protocol version, capabilities, and supported tools. ### Method JSON-RPC `initialize` method ### Request Example ```json { "jsonrpc": "2.0", "method": "initialize", "id": "550e8400-e29b-41d4-a716-446655440000", "params": { "protocol_version": "1.7", "client": { "name": "my-ui", "version": "1.0.0" }, "capabilities": { "supports_question": true }, "external_tools": [ { "name": "open_in_ide", "description": "Open file in IDE", "parameters": { "type": "object", "properties": { "path": { "type": "string" } }, "required": ["path"] } } ] } } ``` ### Response Example ```json { "jsonrpc": "2.0", "id": "550e8400-e29b-41d4-a716-446655440000", "result": { "protocol_version": "1.7", "server": { "name": "Kimi Code CLI", "version": "1.14.0" }, "slash_commands": [ { "name": "init", "description": "Analyze the codebase ...", "aliases": [] } ], "capabilities": { "supports_question": true }, "external_tools": { "accepted": ["open_in_ide"], "rejected": [] } } } ``` ``` -------------------------------- ### System Prompt Example with Built-in and Custom Variables Source: https://moonshotai.github.io/kimi-cli/en/customization/agents.html Illustrates how to incorporate built-in system prompt variables and custom arguments into a Markdown-based system prompt template. Ensure variables are correctly formatted with `${VAR_NAME}`. ```markdown # My Agent You are a helpful assistant. Current time: ${KIMI_NOW}. Working directory: ${KIMI_WORK_DIR} ${MY_VAR} ``` -------------------------------- ### Understand Project: Overall Architecture Source: https://moonshotai.github.io/kimi-cli/en/guides/use-cases.html Ask high-level questions about the project's architecture and entry points to quickly grasp its structure. ```natural_language What's the overall architecture of this project? Where is the entry file? ``` -------------------------------- ### Install Kimi Agent (Rust) on macOS Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Installs the Kimi Agent binary on macOS using curl and tar. Ensure the binary is moved to a directory in your system's PATH. ```sh # macOS (Apple Silicon) curl -L https://github.com/MoonshotAI/kimi-agent-rs/releases/latest/download/kimi-agent-aarch64-apple-darwin.tar.gz | tar xz sudo mv kimi-agent /usr/local/bin/ ``` -------------------------------- ### Enable AFK mode at startup Source: https://moonshotai.github.io/kimi-cli/en/guides/interaction.html Use this command to enable AFK mode when starting Kimi Code CLI. AFK mode auto-approves tool calls and dismisses user questions. ```sh kimi --afk ``` -------------------------------- ### Install Plugin from ZIP File Source: https://moonshotai.github.io/kimi-cli/en/customization/plugins.html Install plugins packaged as ZIP archives. Supports both local ZIP files and remote URLs, including direct download links from GitHub or GitLab. ```sh # Local ZIP file kimi plugin install my-plugin.zip ``` ```sh # Remote ZIP URL (including GitHub/GitLab archive download links) kimi plugin install https://example.com/my-plugin.zip kimi plugin install https://github.com/user/repo/archive/refs/heads/main.zip ``` -------------------------------- ### Kimi Agent Usage Options Source: https://moonshotai.github.io/kimi-cli/en/customization/wire-mode.html Demonstrates common command-line options for Kimi Agent, including specifying the work directory, continuing a previous session, using a specific session ID, selecting a model, and enabling YOLO mode. ```sh # Specify work directory kimi-agent --work-dir /path/to/project # Continue previous session kimi-agent --continue # Use specific session kimi-agent --session # Use specific model kimi-agent --model k2 # YOLO mode (skip approvals) kimi-agent --yolo ```