Cline
This tutorial walks you through using Kimchi's Serverless Endpoints with Cline, an agentic coding tool available as a standalone CLI and as a VS Code extension. You'll configure Cline to use MiniMax M2.7 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 M2.7 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.
Serverless Endpoints work 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
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-m2.7
# 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-m2.7.
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-m2.7"Settings key names may change between Cline extension versions. Check the Cline docs if these keys differ.
Next steps
Updated 20 days ago
