(1) Install kimi-cli:
- https://kimi.com/code
curl -L code.kimi.com/install.sh | bash
(2) Edit/ replace ~/.kimi/config.toml with the provided config.toml file.
typeneeds to beopenai_legacy, notopenaibase_urlmust include the/api/v1pathmodelmust bemoonshotai/kimi-k2.5(note the additionalk)
(3) Get API key
- Go to https://openrouter.ai/settings/keys
- Create a new key or copy existing one
- Replace
sk-or-v1-[redacted]with your copied API key
(4) test that it works
- Run command
kimito enter the shell. - If the shell does not start and it exits immediately, there's something wrong with the config settings.
- Inside the kimi-cli shell, do not run
/login. - Instead type any prompt.
- If you instead see
Authorization failed, please check your login status, there's something wrong with the config settings. - Otherwise it should answer your question, and it's working!