A CLI tool that starts the anthropic-proxy server configured for Groq API with Kimi model and then runs claude-code. When claude-code exits, the proxy is automatically stopped.
npm install -g kimi-codeOr run directly with npx:
npx kimi-code# First time - will prompt for Groq API key and store it in keychain
kimi
# Using command line option to set/update API key
kimi --api-key your-groq-api-key
# With custom port
kimi --port 3001
# With custom models
kimi --reasoning-model "llama3-70b-8192" --completion-model "llama3-8b-8192"
# With custom base URL (without /v1)
kimi --base-url https://custom-api-endpoint.com
# Enable debug logging
kimi --debug
# Reset stored API key
kimi --reset-key-k, --api-key <key>: Groq API key (will be stored in macOS keychain)-p, --port <port>: Port for the proxy server (default: 3000)--base-url <url>: Base URL for the API endpoint (default: https://api.groq.com/openai)--reasoning-model <model>: Reasoning model to use (default: moonshotai/kimi-k2-instruct-0905)--completion-model <model>: Completion model to use (default: moonshotai/kimi-k2-instruct-0905)--debug: Enable debug logging--reset-key: Reset the stored API key
- 🔐 Secure Key Storage: API keys are stored securely in macOS keychain
- 🤖 Kimi Model: Uses Moonshot AI's Kimi K2 Instruct model by default
- 🚀 Simple Setup: Just run
kimiand it handles everything - 🔄 Auto Cleanup: Automatically stops proxy when claude-code exits
- Node.js 14 or higher
- macOS (for keychain integration)
claude-codeinstalled and available in PATH
- Visit Groq Console
- Sign up or log in
- Create a new API key
- Run
kimiand enter your key when prompted
- Securely retrieves or prompts for your Groq API key
- Starts a built-in proxy server that translates Anthropic API calls to Groq API format
- Configures the proxy to use the specified API endpoint (default:
https://api.groq.com/openai) with Kimi models - Sets the
ANTHROPIC_BASE_URLenvironment variable to point to the local proxy - Launches claude-code with the configured environment
- When claude-code exits, automatically stops the proxy server
If you encounter keychain permission issues, you can:
- Run
kimi --reset-keyto clear stored credentials - Use
kimi --api-key your-keyto bypass keychain storage
- To update your API key:
kimi --api-key new-key - To reset stored key:
kimi --reset-key - Keys are stored under service "kimi-code" in your keychain
MIT
Anthropic proxy code is based on https://github.com/maxnowack/anthropic-proxy