Kimi Code Integration Guide
Kimi Code CLI is an AI programming agent that runs in the terminal, capable of reading and modifying code, executing commands, running tests, searching files, and planning the next steps based on execution results. After integrating it with Ace Data Cloud, you can directly use kimi-k3, and a single API Token can also be used to call other services on the platform.
This article starts with installation and guides you through configuration, verification, and the first real run. The following steps are based on Kimi Code CLI 0.33.0 and Ace Data Cloud kimi-k3 tested on August 6, 2026.
¶ 1. Install Kimi Code
¶ macOS / Linux (Recommended)
Run the official installation script without needing to pre-install Node.js:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
After installation, open a new terminal window and check the version:
kimi --version
If it still prompts command not found, restart the terminal; if it still doesn't work, add ~/.kimi-code/bin to PATH as indicated by the last message printed by the installer.
¶ Windows PowerShell
First, install Git for Windows. Kimi Code will use Git Bash from it as the shell environment. Then run in PowerShell:
irm https://code.kimi.com/kimi-code/install.ps1 | iex
Close and reopen PowerShell, then check:
kimi --version
If Git Bash is installed in a custom directory, you need to set KIMI_SHELL_PATH to the absolute path of bash.exe.
¶ npm Alternative Installation Method
If you prefer npm, first install Node.js version 22.19.0 or higher:
node --version
npm install -g @moonshot-ai/kimi-code
kimi --version
The old
kimi-cliproject is being migrated to Kimi Code CLI. For new installations, please use@moonshot-ai/kimi-codeor the official installation script on this page.
¶ 2. Obtain Ace Data Cloud API Token
Open the Ace Data Cloud Console to obtain the API Token. One Token can access various models and services on the platform.
Please keep the Token secure: do not submit it to Git, do not paste it into Issues, logs, or screenshots, and do not write it into team-shared example files.
¶ 3. Configure Kimi K3
The user configuration file for Kimi Code is:
- macOS / Linux:
~/.kimi-code/config.toml - Windows:
.kimi-code/config.tomlin the user home directory
This file will be automatically created after the first run, but you can also manually create the directory and file. Write the following configuration completely into config.toml, replacing {token} with your Ace Data Cloud API Token:
default_model = "acedata/kimi-k3"
default_permission_mode = "manual"
telemetry = false
[providers.acedata]
type = "openai"
base_url = "https://api.acedata.cloud/v1"
api_key = "{token}"
[models."acedata/kimi-k3"]
provider = "acedata"
model = "kimi-k3"
max_context_size = 1048576
capabilities = ["thinking", "always_thinking", "image_in", "tool_use"]
support_efforts = ["max"]
default_effort = "max"
display_name = "Kimi K3"
[thinking]
enabled = true
effort = "max"
keep = "all"
There are three common mistakes to watch out for:
typemust beopenai, as Ace Data Cloud provides an OpenAI Chat Completions compatible interface for Kimi Code.base_urlmust end with/v1; Kimi Code will continue to append/chat/completions.modelmust bekimi-k3, whiledefault_modelpoints to the local aliasacedata/kimi-k3defined above.
¶ More Securely Protect the Configuration File
macOS / Linux users can restrict access to the configuration file so that only the current account can read it:
chmod 600 ~/.kimi-code/config.toml
Do not execute /login and select other platforms after completing the configuration in this article, as the login process may change the default model. To check the current configuration, use kimi doctor and kimi provider list later.
¶ 4. Check Configuration
First, let Kimi Code verify the TOML format and fields:
kimi doctor
A normal result includes:
OK config.toml
All checked config files are valid.
Then confirm the provider and default model:
kimi provider list
You should see results similar to:
acedata type=openai models=1 source=inline
Default model: acedata/kimi-k3
If kimi doctor reports an error, check the TOML quotes, table names, and whether {token} has been replaced.
¶ 5. Start in a Project
Navigate to a code repository and start the interactive interface:
cd /path/to/your-project
kimi
For the first time, you can input this English test task:
Take a look at this project and explain its main directories. Do not modify any files.
Kimi Code will read the directories and files, then provide an explanation of the project structure. The default manual permission mode will ask you before writing files or executing sensitive commands; review the operation content carefully before approving.
Next, you can try a real development task:
Find the test command used by this project, run the smallest relevant test suite, and explain any failures. Do not change code yet.
After confirming the analysis is correct, you can then explicitly ask it to modify the code and run tests.
¶ 6. Common Execution Methods
¶ Non-interactive Execution of a Task
-p is suitable for scripts or one-time tasks:
kimi -p "Summarize the current repository status"
The command tested on this page is:
kimi -p "Reply with exactly: KIMI_CODE_K3_OK"
Kimi Code CLI 0.33.0 returned via Ace Data Cloud kimi-k3:
KIMI_CODE_K3_OK
¶ Continue the Most Recent Session
kimi --continue
You can also use the shorthand:
kimi -c
¶ Plan First, Do Not Modify Yet
kimi --plan
Plan mode is suitable for large changes: first let the agent read the code and provide a plan, then confirm before executing.
¶ Automatically Approve Operations
kimi --yolo
--yolo will automatically approve normal file modifications and shell operations. It should only be used in trusted repositories, containers, or isolated environments; for daily development, it is recommended to keep the default manual.
¶ 7. Common Commands in the Interactive Interface
| Command | Function |
|---|---|
/help |
View complete commands and shortcuts |
/model |
View or switch the current model |
/new |
Start a new session |
/sessions |
Browse and restore historical sessions |
/compact |
Compress longer contexts |
/exit |
Exit Kimi Code |
Common shortcuts:
Esc: Interrupt the current output or close the popupShift-Tab: Switch to Plan modeCtrl-C: Interrupt output; press twice in idle to exitCtrl-O: Collapse or expand tool output
¶ 8. Common Issues
¶ kimi: command not found
Try again after reopening the terminal. The script installation defaults to placing the program in ~/.kimi-code/bin; ensure this directory is included in PATH. For npm installations, confirm that the npm global bin directory is in PATH.
¶ Windows cannot find Git Bash
Install Git for Windows. If the installation directory is not the default location, set it in PowerShell:
$env:KIMI_SHELL_PATH = "C:\Path\To\Git\bin\bash.exe"
Once confirmed available, you can persist this value in the Windows user environment variables.
¶ Returns 401 or invalid_token
Check if the api_key is still the {token} placeholder, if there are extra spaces, or if it was copied completely. Try again after retrieving the Token from the console.
¶ Returns model not found or Kimi K3 is not in the model list
Ensure the following three are exactly the same:
default_model = "acedata/kimi-k3"
model = "kimi-k3"
Then run:
kimi doctor
kimi provider list
¶ Request sent to the wrong address
Confirm the provider uses:
type = "openai"
base_url = "https://api.acedata.cloud/v1"
Do not write it as the Kimi Code OAuth hosted address, and do not omit /v1.
¶ Configuration changes not taking effect
Exit the current Kimi Code process and then rerun kimi. Configuration is read at session startup; already running sessions will not automatically reload all provider settings.
¶ 9. Upgrade and Uninstall
Check and upgrade:
kimi upgrade
Users who installed via npm can also run:
npm install -g @moonshot-ai/kimi-code@latest
Uninstall the npm version:
npm uninstall -g @moonshot-ai/kimi-code
