Kimi
Kimi Code CLI is Moonshot AI’s terminal coding agent (kimi). Use varlock to inject KIMI_API_KEY at runtime so the key never sits in a plain text .env or shell history.
For install, schema setup, and shared patterns, see the AI Tools overview.
Launch command: kimi
Authentication: You can sign in interactively with /login (Kimi Code OAuth or a platform API key), or inject a key via the environment. See environment variables.
Environment variable: KIMI_API_KEY (optional: KIMI_BASE_URL if you use a custom endpoint)
In a project
Section titled “In a project”Add to .env.schema:
# @sensitive @requiredKIMI_API_KEY=op(op://api-local/kimi/api-key)varlock run -- kimiFrom any directory
Section titled “From any directory”Personal schema at ~/.env.kimi:
# @sensitive @requiredKIMI_API_KEY=op(op://api-local/kimi/api-key)varlock run -p ~/.env.kimi -- kimiShell alias (optional)
Section titled “Shell alias (optional)”alias vkimi='varlock run -p ~/.env.kimi --no-redact-stdout -- kimi'--no-redact-stdout keeps Kimi’s own terminal output unredacted while secrets stay out of your shell history.
See the Kimi Code getting started guide for install options and login flows.