> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syon.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kimi Code 命令行

> 将 Kimi Code CLI 接入 Syon

Kimi Code is an AI coding service for developers. Kimi Code CLI is its terminal-based AI agent. After connecting it to Syon, Kimi Code calls `kimi-k3` through Syon's OpenAI-compatible gateway.

## 1. One-click setup with Teamo Desktop (recommended)

[Teamo Desktop](https://syon.com/download) is the official desktop client for Syon. It can install Kimi Code, connect it to Syon, and configure the model for you. This is the recommended path for new users.

[Download for Windows](https://ama-download.floatai.cn/syon/windows/Teamo-latest-Windows.msi) · [Download for macOS](https://ama-download.floatai.cn/syon/mac/Teamo-latest-macOS.dmg)

If your operating system shows a security warning during installation, choose Trust, Open, or Continue.

After installing Teamo Desktop, create an account and sign in.

![Image 1: Syon sign-in and registration screen](https://docs.syon.ai-images/en/install-kimi-code-register.png)

In Teamo Desktop, find Kimi Code and install it.

Then click the one-click setup button. Teamo Desktop will connect your local Kimi Code installation to Syon and write the required configuration automatically.

![Image 2: Kimi Code one-click setup in Teamo Desktop](https://docs.syon.ai-images/en/install-kimi-code-one-click.png)

To switch back to Kimi's official Coding Plan later, click Disconnect Syon in Teamo Desktop.

After setup is complete, open Kimi Code and start using it.

![Image 3: Kimi Code CLI launch example](https://docs.syon.ai-images/install-kimi-code-usage.png)

You can check per-request usage in the [Syon dashboard](https://syon.com/dashboard).

## 2. Manual setup

If you do not want to use Teamo Desktop, follow the steps below to install Kimi Code and connect it to Syon manually.

### Install Kimi Code CLI

If Kimi Code CLI is already installed, skip to "Connect Kimi Code to Syon".

Kimi Code CLI can be installed in two ways: the official install script (recommended, no Node.js required) or a global npm install.

First, open your terminal:

* macOS: open Terminal from Applications.
* Windows 11: press `Win + S`, search for Terminal, and open it.
* Windows 10: press `Win + S`, search for Terminal, then open Command Prompt or PowerShell.

#### Install script (recommended)

macOS / Linux:

bash

```
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
```

Windows PowerShell:

powershell

```
irm https://code.kimi.com/kimi-code/install.ps1 | iex
```

Windows users also need [Git for Windows](https://gitforwindows.org/) before the first launch.

Download and install it from the Git website. You do not need to open Git separately after installation.

![Image 4: Git for Windows download page](https://docs.syon.ai-images/install-kimi-code-git.png)

#### npm install

If you prefer npm, install Node.js 22.19.0 or later first.

Check your Node.js version:

bash

```
node --version
```

Install Kimi Code:

bash

```
npm install -g @moonshot-ai/kimi-code
```

Or use pnpm:

bash

```
pnpm add -g @moonshot-ai/kimi-code
```

### Connect Kimi Code to Syon

After Kimi Code CLI is installed, run the commands below. Replace `your Syon API Key` with the API key you created in the [Syon dashboard](https://syon.com/dashboard?tab=api-keys).

macOS / Linux:

bash

```
SHELL_RC="$HOME/.zshrc"; case "$SHELL" in *bash*) SHELL_RC="$HOME/.bashrc";; esac
cat >> "$SHELL_RC" <<'EOF'
export KIMI_MODEL_NAME=kimi-k3
export KIMI_MODEL_PROVIDER_TYPE=openai
export KIMI_MODEL_API_KEY=your Syon API Key
export KIMI_MODEL_BASE_URL=https://api.syon.com/v1
export KIMI_MODEL_MAX_CONTEXT_SIZE=1048576
EOF
source "$SHELL_RC"
```

Windows PowerShell:

powershell

```
$env:KIMI_MODEL_NAME = "kimi-k3"
$env:KIMI_MODEL_PROVIDER_TYPE = "openai"
$env:KIMI_MODEL_API_KEY = "your Syon API Key"
$env:KIMI_MODEL_BASE_URL = "https://api.syon.com/v1"
$env:KIMI_MODEL_MAX_CONTEXT_SIZE = "1048576"
```

### Launch Kimi Code

After configuration, run:

bash

```
kimi
```

Kimi Code CLI will start and route requests through Syon.
