How to Install Kimi CLI: One-Line Installer and Manual uv Setup

The fastest way to install Kimi CLI is to run the one-line installer curl -LsSf https://code.kimi.com/install.sh | bash, which automatically bootstraps the uv package manager and installs the tool for Python 3.13.

Kimi CLI (also known as Kimi Code CLI) is MoonshotAI's open-source terminal interface for AI-assisted coding. This guide explains how to install kimi-cli using the official automated installer or the uv package manager directly, based on the source code in the MoonshotAI/kimi-cli repository.

One-Line Automated Installation

The recommended method uses the official installer script located at [scripts/install.sh](https://github.com/MoonshotAI/kimi-cli/blob/main/scripts/install.sh). This script handles the entire setup process, including the installation of uv—a fast, modern Python package manager—if it is not already present on your system.

Run the following command in your terminal:

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

The installer performs three key operations defined in the source:

  1. Detects your download tool – It checks for curl or wget availability (lines 5–12).
  2. Installs uv if missing – If uv is not found on your PATH, the script downloads and installs it; otherwise, it reuses the existing installation (lines 19–24).
  3. Installs the package – It executes uv tool install --python 3.13 kimi-cli to install the CLI targeting Python 3.13 (line 31).

Windows users can use the PowerShell equivalent:

Invoke-RestMethod https://code.kimi.com/install.ps1 | Invoke-Expression

Manual Installation with uv

If you already have uv installed and prefer to skip the automated script, you can install kimi-cli directly. This command is identical to the one invoked by the installer (line 31):

uv tool install --python 3.13 kimi-cli

This approach requires Python 3.13, which is the recommended runtime according to the project's [pyproject.toml](https://github.com/MoonshotAI/kimi-cli/blob/main/pyproject.toml) configuration.

Verify the Installation

After installation completes, verify that the kimi executable is available on your system PATH:

kimi --version

The kimi binary is generated by uv during the tool installation process. If the command returns a version number, the installation was successful.

Upgrade and Uninstall Commands

Manage your kimi-cli installation using uv's built-in tool management commands, as documented in [docs/en/guides/getting-started.md](https://github.com/MoonshotAI/kimi-cli/blob/main/docs/en/guides/getting-started.md) (lines 66–75).

To upgrade to the latest release:

uv tool upgrade kimi-cli --no-cache

To remove the CLI from your system:

uv tool uninstall kimi-cli

First-Time Configuration

After you install kimi-cli, navigate to a project directory and invoke the tool to start an interactive AI session. On first launch, the CLI will prompt you to configure an LLM provider using the /login slash command. This workflow is detailed in the Getting Started guide (lines 77–92).


# Start the interactive session

kimi

Summary

  • Automated setup: Use curl -LsSf https://code.kimi.com/install.sh | bash to bootstrap uv and install kimi-cli in one step.
  • Manual control: Run uv tool install --python 3.13 kimi-cli if uv is already installed.
  • Lifecycle management: Use uv tool upgrade and uv tool uninstall to maintain or remove the package.
  • Initial config: Run kimi and use /login to set up your LLM provider on first use.

Frequently Asked Questions

What is uv and why does Kimi CLI require it?

uv is a fast, modern Python package manager and toolchain written in Rust. According to the [scripts/install.sh](https://github.com/MoonshotAI/kimi-cli/blob/main/scripts/install.sh) logic, the installer uses uv because it provides reproducible, standalone tool installations without requiring a global Python environment. The CLI is distributed as a uv tool to ensure consistent behavior across Linux, macOS, and Windows systems.

Can I install Kimi CLI without using the automated script?

Yes. If you already have uv installed, you can skip the install.sh script entirely and run uv tool install --python 3.13 kimi-cli manually. This command targets Python 3.13 specifically and is the exact method used by the automated installer (line 31).

How do I update Kimi CLI to the latest version?

Run uv tool upgrade kimi-cli --no-cache to fetch and install the latest release. The --no-cache flag ensures you bypass any stale package indexes and get the most recent version available in the repository.

Where is the kimi executable installed?

The kimi binary is installed by uv into its managed tools directory, which is automatically added to your PATH during the uv installation process. You can verify the location by running which kimi (Linux/macOS) or Get-Command kimi (Windows PowerShell) after installation.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →