Kimi Code is Moonshot AI's official agent for desktop, the command line and IDEs, built around Kimi K3 with up to 1M tokens of context. It reads and writes code, runs commands, searches files and the web, and decides what to do next from the results.
Example: Kimi Code connects to Codelux Gateway at codelux.io/v1/chat/completions and uses anthropic / claude-sonnet-5. The same agent can switch between claude-sonnet-5, claude-opus-5-5, gpt-6-sol, DeepSeek-V41-Flash, kimi-k3, glm-5.3 and more.
How to use Kimi Code with Codelux
About 10 minutes: install Kimi Code CLI → create a key in Portal → add the Codelux provider and models to config.toml → start and switch models.
1. Install Kimi Code CLI
The install script doesn't need Node.js; the npm route needs Node.js 22.19.0+. A true-colour terminal such as Kitty or Ghostty is recommended.
Start Kimi Code in your project, confirm the model comes from Codelux, then switch as needed.
6Start and confirm
Terminal
cd your-project
kimi
The Model line in the welcome box should show your default_model. Run /status for the version, model and working directory. After editing config.toml, run /reload to apply it without restarting.
7Switch models
Run /model and choose from the models defined in config.toml. Add more [models."<alias>"] entries to get more choices.
8Everyday commands
Action
What it does
/init
Create AGENTS.md for the project
Shift + Tab
Toggle Plan mode
kimi -p "..."
Run a single instruction
kimi -c
Resume the previous session
/compact
Compress the conversation to free context
See each request's model, tokens and charge in Portal → Logs.
FAQ
Kimi Code fails to start with a credential error
The variable named in api_key_env is empty in this terminal. Set it (or use api_key) and reopen the terminal.
`default_model` errors
default_model must match an alias defined under [models], not a raw model ID that isn't configured.
Requests fail with 404
For type = "openai", base_url must end with /v1.
Can I use CC-Switch for Kimi Code?
CC-Switch doesn't manage Kimi Code at the moment; configure it in config.toml or with /provider.