Getting started with Kimi Code
Kimi Code CLI is an AI Agent that runs in your terminal, helping you complete software development tasks and terminal operations. It can read and edit code, execute Shell commands, search and scrape the web, and autonomously plan and adjust its actions during execution.
Use cases
- Write and Modify Code: Implementing new features, fixing bugs, and refactoring code.
- Understand Projects: Exploring unfamiliar codebases and answering questions about architecture and implementation.
- Automate Tasks: Batch processing files, executing builds and tests, and running scripts.
If you have any issues suggestions, provide feedback on GitHub Issues
Ways to use
Installation
Run the installation script to complete the setup. The script will first install uv and then install Kimi Code CLI via uv:

After installation, verify that it was installed successfully:
If the
kimicommand is not found, try reopening your terminal or runningsource ~/.bashrc(or~/.zshrc).
First run
Startup and login
Navigate to your project directory:
Run the /login command to complete authorization:
The system will prompt you to select a login method — follow the instructions to complete authorization.
Core Capabilities
You can interact with Kimi Code CLI using natural language:
Ask Questions: Understand project architecture and entry points.
Modify Code: Let Kimi write features or fix bugs with your approval.
Run Commands: Execute tests and automate terminal tasks.
Common Commands Cheat Sheet
FAQ
I entered my API Key, but it says authentication failed.
First, confirm that your Key and Base URL belong to the same platform. api.kimi.com and api.moonshot.cn are two completely independent account systems, and their API Keys are not interchangeable:
The kimi command is not found after installation.
The installation script adds kimi to your PATH, but you need to restart the terminal or run source ~/.bashrc (or source ~/.bashrc) for it to take effect. If it's still not found, check if ~/.local/bin is in your PATH.
The browser did not pop up after running /login.
In a remote server or headless environment, /login will display a URL. Manually copy it into your browser to complete the authorization.
Upgrade and uninstallation
Upgrade to the latest version:
Uninstall Kimi Code CLI: