Appearance
Kimi CLI
The kimi-cli template ships Moonshot's Kimi Code CLI preinstalled.
TIP
Kimi CLI is a Python package rather than an npm one, and it needs Python 3.12. The template handles that — it is the only difference you would notice.
Setup
bash
pip install ovrin
export OVRIN_API_KEY="ovrin_..."Run the agent
python
import ovrin
client = ovrin.Client() # reads OVRIN_API_KEY
sandbox = client.sandboxes.create(
template="kimi-cli",
env={"KIMI_API_KEY": "..."},
timeout=1800,
)
result = sandbox.run('kimi -p "Compute 1+1 and explain it"')
print(result.stdout)
sandbox.kill()Work on a repository
python
sandbox.files.write("/workspace/app.py", open("app.py").read())
result = sandbox.run(
'cd /workspace && kimi -p "write tests for app.py"',
timeout=600,
)
print(sandbox.files.read("/workspace/app.py"))Auth
| Variable | Purpose |
|---|---|
KIMI_API_KEY | Moonshot API key |
KIMI_BASE_URL | Point at a proxy or gateway |
KIMI_MODEL_NAME | Override the default model |
Related
- Agent environments — every template and its auth
- Claude Code — the same shape with Anthropic's CLI