Moonshot AI's official CLI (kimi-code-cli) for agentic coding with the Kimi K-series. Point it at g0i and run Kimi K3 plus the K2.7 variants through one OpenAI-compatible endpoint.
Paste one command, paste your API key, pick Kimi Code CLI — the script installs it if it's missing and writes the config for you. No files to edit; your old config is backed up.
Open a terminal and paste:
curl -fsSL https://g0i.ai/install.sh.txt | bash
Re-run it any time to switch key or model. Prefer doing it by hand? The manual steps are below.
Kimi Code CLI reads a config.toml. Either import g0i as a custom registry (kimi provider add) or drop the config below into ~/.kimi-code/config.toml (Windows: %USERPROFILE%\.kimi-code\config.toml) with your key. Install: npm i -g @moonshot-ai/kimi-code or the official script at code.kimi.com.
# Option A — import g0i as a custom registry (auto-populates models): kimi provider add https://api.g0i.ai/v1/models --api-key your-api-key # Option B — write ~/.kimi-code/config.toml directly: # Kimi Code CLI — custom provider: g0i.ai (OpenAI-compatible) default_model = "kimi-k3" default_permission_mode = "manual" default_plan_mode = false telemetry = false [providers.g0i] type = "openai" base_url = "https://api.g0i.ai/v1" api_key = "your-api-key" [models."kimi-k3"] provider = "g0i" model = "kimi-k3" max_context_size = 1048576 max_output_size = 8192 capabilities = ["thinking", "tool_use"] display_name = "Kimi K3" [models."kimi-k2.7"] provider = "g0i" model = "kimi-k2.7" max_context_size = 200000 max_output_size = 8192 capabilities = ["thinking", "tool_use"] display_name = "Kimi K2.7" [models."kimi-k2.7-code"] provider = "g0i" model = "kimi-k2.7-code" max_context_size = 262144 max_output_size = 8192 capabilities = ["thinking", "tool_use"] display_name = "Kimi K2.7 Code" [thinking] enabled = true effort = "high" keep = "all" [loop_control] max_attempts_per_step = 10 reserved_context_size = 50000
Any of these can be used in Kimi Code CLI. Pick by task — see the full catalog at Models & Pricing.
kimi-k3kimi-k2.7-codekimi-k2.7Choose a subscription, add pay-as-you-go credits, or redeem a community voucher.