Kimi Code
Install and configure Kimi Code CLI and its local Web interface.
Follow the system-specific steps for Kimi Code CLI or Kimi Web.
Kimi Code CLI
Windows
1. Install
Open PowerShell from the Start menu and run the official installer:
irm https://code.kimi.com/kimi-code/install.ps1 | iexAfter installation, close and reopen the terminal and run kimi --version. Continue when the version appears. See the official installation guide for other methods.
2. Configure
Prepare an API Key and copy a model ID from the model catalog that supports Chat Completions and is available to your Key. Replace YOUR_MODEL with that ID.
The configuration file is %USERPROFILE%\.kimi-code\config.toml.
- Press
Win + Eto open File Explorer. - Enter
%USERPROFILE%\.kimi-codein the address bar and press Enter. - Right-click
config.tomland choose Open with → Notepad. - If the directory is missing, create the
.kimi-codefolders inside%USERPROFILE%. If the file is missing, create it in Notepad.
default_model = "getrun-model"
[providers.getrun]
type = "openai"
base_url = "https://api.get-apikey.com/v1"
api_key = "your-api-key"
[models.getrun-model]
provider = "getrun"
model = "YOUR_MODEL"
max_context_size = 128000Replace your-api-key with your Key and YOUR_MODEL with the model ID. getrun-model is the local model alias. max_context_size is the model’s context limit; replace the example value of 128000 with the selected model’s actual limit.
For an existing file, update matching fields and keep other settings. Put default_model before any [table] and keep one copy of each provider and model section.
Save in the directory above. In Notepad, use Save As → All files → UTF-8 and name the file config.toml without an extra .txt extension.
3. Use
Open your project folder in File Explorer, enter powershell in the address bar, and press Enter.
kimi -m getrun-modelConfirm the project prompts and send Reply only OK. Once you receive a reply, enter your task. Running kimi without -m uses the model selected by default_model.
Exit and restart Kimi Code after editing the configuration.
macOS
1. Install
Press Command + Space to find and open Terminal, then run the official installer:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bashAfter installation, close and reopen the terminal and run kimi --version. Continue when the version appears. See the official installation guide for other methods.
2. Configure
Prepare an API Key and copy a model ID from the model catalog that supports Chat Completions and is available to your Key. Replace YOUR_MODEL with that ID.
The configuration file is ~/.kimi-code/config.toml.
- Open Finder and press
Command + Shift + G. - Enter
~/.kimi-codeand select Go. - Open
config.tomlin TextEdit or VS Code. - If the folder or file is missing, choose File → Open Folder in VS Code, press
Command + Shift + G, and enter~to open your home directory. Create the.kimi-codefolders in the Explorer sidebar, then createconfig.tomlinside.
default_model = "getrun-model"
[providers.getrun]
type = "openai"
base_url = "https://api.get-apikey.com/v1"
api_key = "your-api-key"
[models.getrun-model]
provider = "getrun"
model = "YOUR_MODEL"
max_context_size = 128000Replace your-api-key with your Key and YOUR_MODEL with the model ID. getrun-model is the local model alias. max_context_size is the model’s context limit; replace the example value of 128000 with the selected model’s actual limit.
For an existing file, update matching fields and keep other settings. Put default_model before any [table] and keep one copy of each provider and model section.
Press Command + S to save. In TextEdit, choose Format → Make Plain Text and keep the filename config.toml.
3. Use
Open Terminal, type cd with a trailing space, drag your project folder from Finder into Terminal, and press Enter.
kimi -m getrun-modelConfirm the project prompts and send Reply only OK. Once you receive a reply, enter your task. Running kimi without -m uses the model selected by default_model.
Exit and restart Kimi Code after editing the configuration.
Kimi Web
Windows
1. Install
The Web interface is included in Kimi Code CLI. Install the CLI first:
Open PowerShell from the Start menu and run the official installer:
irm https://code.kimi.com/kimi-code/install.ps1 | iexAfter installation, close and reopen the terminal and run kimi --version. Continue when the version appears. See the official installation guide for other methods.
2. Configure
Prepare an API Key and copy a model ID from the model catalog that supports Chat Completions and is available to your Key. Replace YOUR_MODEL with that ID.
The configuration file is %USERPROFILE%\.kimi-code\config.toml.
- Press
Win + Eto open File Explorer. - Enter
%USERPROFILE%\.kimi-codein the address bar and press Enter. - Right-click
config.tomland choose Open with → Notepad. - If the directory is missing, create the
.kimi-codefolders inside%USERPROFILE%. If the file is missing, create it in Notepad.
default_model = "getrun-model"
[providers.getrun]
type = "openai"
base_url = "https://api.get-apikey.com/v1"
api_key = "your-api-key"
[models.getrun-model]
provider = "getrun"
model = "YOUR_MODEL"
max_context_size = 128000Replace your-api-key with your Key and YOUR_MODEL with the model ID. getrun-model is the local model alias. max_context_size is the model’s context limit; replace the example value of 128000 with the selected model’s actual limit.
For an existing file, update matching fields and keep other settings. Put default_model before any [table] and keep one copy of each provider and model section.
Save in the directory above. In Notepad, use Save As → All files → UTF-8 and name the file config.toml without an extra .txt extension.
3. Use
Open your project folder in File Explorer, enter powershell in the address bar, and press Enter.
kimi webIn the browser, select your project workspace, choose New Chat, select your configured model, and send Reply only OK. If the browser does not open automatically, use the local URL shown in the terminal. Keep the terminal running during use and press Ctrl + C to stop it.
Exit and restart Kimi Code after editing the configuration.
macOS
1. Install
The Web interface is included in Kimi Code CLI. Install the CLI first:
Press Command + Space to find and open Terminal, then run the official installer:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bashAfter installation, close and reopen the terminal and run kimi --version. Continue when the version appears. See the official installation guide for other methods.
2. Configure
Prepare an API Key and copy a model ID from the model catalog that supports Chat Completions and is available to your Key. Replace YOUR_MODEL with that ID.
The configuration file is ~/.kimi-code/config.toml.
- Open Finder and press
Command + Shift + G. - Enter
~/.kimi-codeand select Go. - Open
config.tomlin TextEdit or VS Code. - If the folder or file is missing, choose File → Open Folder in VS Code, press
Command + Shift + G, and enter~to open your home directory. Create the.kimi-codefolders in the Explorer sidebar, then createconfig.tomlinside.
default_model = "getrun-model"
[providers.getrun]
type = "openai"
base_url = "https://api.get-apikey.com/v1"
api_key = "your-api-key"
[models.getrun-model]
provider = "getrun"
model = "YOUR_MODEL"
max_context_size = 128000Replace your-api-key with your Key and YOUR_MODEL with the model ID. getrun-model is the local model alias. max_context_size is the model’s context limit; replace the example value of 128000 with the selected model’s actual limit.
For an existing file, update matching fields and keep other settings. Put default_model before any [table] and keep one copy of each provider and model section.
Press Command + S to save. In TextEdit, choose Format → Make Plain Text and keep the filename config.toml.
3. Use
Open Terminal, type cd with a trailing space, drag your project folder from Finder into Terminal, and press Enter.
kimi webIn the browser, select your project workspace, choose New Chat, select your configured model, and send Reply only OK. If the browser does not open automatically, use the local URL shown in the terminal. Keep the terminal running during use and press Ctrl + C to stop it.
Exit and restart Kimi Code after editing the configuration.
Configuration location
If KIMI_CODE_HOME is set, edit config.toml in that directory. Linux can use the macOS installation command and the same ~/.kimi-code/config.toml path. See the Kimi Code configuration guide for more fields.