Cline
Configure Cline to use the Kimchi Inference API for cost-effective AI-assisted coding.
This tutorial walks you through using the Kimchi Inference API with Cline, an agentic coding tool available as a standalone CLI and as a VS Code extension. You'll configure Cline to use MiniMax M3 via Kimchi, providing a cost-effective setup for AI-assisted development.
Overview
By the end of this tutorial, you'll be able to:
- Authenticate Cline against Kimchi as a model provider
- Use MiniMax M3 for code generation and execution tasks
- Run Cline interactively in your terminal or headlessly in scripts and CI/CD pipelines
This tutorial focuses on Cline CLI. If you use Cline inside an IDE, see IDE integration.
The Kimchi Inference API works with any OpenAI-compatible client. This tutorial covers Cline, but the same Kimchi base URL and API key work with OpenCode and other compatible tools.
Prerequisites
- A Kimchi API key from app.kimchi.dev/settings
- Node.js 20 or higher β Check your version with
node --version. - Cline CLI installed β Install globally via npm:
npm install -g clineVerify the installation:
cline versionConfigure Cline CLI
Authenticate Cline with Kimchi
Unlike tools that use a JSON config file, Cline manages provider configuration through its auth command. Run the following to point Cline at Kimchi's OpenAI-compatible endpoint:
cline auth -p openai -k YOUR_KIMCHI_API_KEY -b https://llm.kimchi.dev/openai/v1 -m minimax-m3| Flag | Value | Purpose |
|---|---|---|
-p openai | openai | Tells Cline to use the OpenAI-compatible provider type |
-k | Your Kimchi API key | Authenticates your requests to Kimchi |
-b | https://llm.kimchi.dev/openai/v1 | Points Cline at Kimchi's inference endpoint instead of OpenAI's |
-m | minimax-m3 | Sets MiniMax M3 as the default model |
Replace YOUR_KIMCHI_API_KEY with your key from the Kimchi console.
Verify your configuration
Confirm that Cline stored your settings correctly:
cline configYou should see https://llm.kimchi.dev/openai/v1 as the openAiBaseUrl and minimax-m3 as the model. If something looks wrong, re-run the cline auth command from Step 1 β it overwrites the stored configuration.
Global Settings:
actModeApiProvider: openai
actModeOpenAiModelId: minimax-m3
[...]
openAiBaseUrl: https://llm.kimchi.dev/openai/v1Test the connection
Navigate to a project directory and run a simple test:
cd ~/your-project
cline "What files are in this directory?"Once that succeeds, try a prompt that requires a real inference call:
cline "Explain what this project does in one paragraph"Using Cline
Interactive mode launches a full terminal interface. Start it by running cline with no arguments:
clineIn interactive mode, you can type tasks, review Cline's plan before it acts, toggle between Plan and Act modes with Tab, and use /settings to adjust your configuration without leaving the session. For more information, see Cline interactive mode documentation.
Headless mode is designed for automation. It activates when you pass the -y flag, pipe input, or redirect output:
# Run a task with automatic approval
cline -y "Fix all ESLint errors in src/"
# Pipe a diff for automated code review
git diff | cline -y "Review these changes and summarize any issues"The -y flag gives Cline full autonomy to approve and execute actions. Use it on a clean git branch so you can revert easily if needed.
Advanced: Headless CI/CD workflows
Cline's headless mode makes it straightforward to integrate Kimchi into automated pipelines. Because authentication is stored after the initial cline auth step, you can use Cline in CI environments by passing credentials as environment variables or by running cline auth as part of your pipeline setup.
A typical CI pattern for automated code review on pull requests:
# In your CI pipeline, authenticate first
cline auth -p openai -k $KIMCHI_API_KEY -b https://llm.kimchi.dev/openai/v1 -m minimax-m3
# Then use Cline in headless mode
git diff origin/main | cline -y "Review these changes for bugs or regressions"IDE integration
If you use Cline as a VS Code extension rather than the CLI, settings are stored in VS Code's settings.json rather than via the cline auth command.
- Open VS Code and navigate to Settings (
Cmd+,on macOS,Ctrl+,on Linux/Windows). - Search for Cline.
- Set API Provider to
OpenAI Compatible. - Set Base URL to
https://llm.kimchi.dev/openai/v1. - Set API Key to your Kimchi API key.
- Set Model to
minimax-m3.
Alternatively, add the following directly to your settings.json:
"cline.apiProvider": "openai",
"cline.openAiBaseUrl": "https://llm.kimchi.dev/openai/v1",
"cline.openAiApiKey": "YOUR_KIMCHI_API_KEY",
"cline.apiModelId": "minimax-m3"Settings key names may change between Cline extension versions. Check the Cline docs if these keys differ.
Next steps
Updated 3 months ago
