Skip to main content

Overview

Cline (formerly Claude Dev) is a VS Code extension that provides autonomous AI coding assistance. Cline supports OpenAI-compatible API endpoints, allowing you to use CLI Proxy API with your Google/ChatGPT/Claude OAuth subscriptions.

Configuration

1

Install Cline

Install the Cline extension from the VS Code marketplace:
  1. Open VS Code
  2. Go to Extensions (Cmd+Shift+X on macOS, Ctrl+Shift+X on Windows/Linux)
  3. Search for “Cline”
  4. Click Install
2

Start CLI Proxy API

Ensure CLI Proxy API is running:
The server will listen on http://localhost:8317 by default.
3

Configure Cline API Settings

Open Cline settings in VS Code:
  1. Open Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows/Linux)
  2. Type “Cline: Open Settings”
  3. Select OpenAI Compatible as the API provider
4

Set Endpoint and API Key

Configure the connection:
  • API Provider: OpenAI Compatible
  • Base URL: http://localhost:8317/v1
  • API Key: Use any key from your api-keys list in config.yaml
  • Model: Select from available models (e.g., gemini-2.5-pro, claude-sonnet-4)

Configuration Examples

Using Gemini OAuth

If you have Gemini CLI OAuth configured:
settings.json

Using Claude OAuth

If you have Claude Code OAuth configured:
settings.json

Using OpenAI Codex

If you have OpenAI Codex OAuth configured:
settings.json

Advanced Configuration

Multiple API Keys

If you want to use different API keys for different projects:
config.yaml
Then configure Cline per-project using workspace settings (.vscode/settings.json):
.vscode/settings.json

Model Prefixes

If you have multiple credentials with prefixes:
config.yaml
Use the prefix in your model selection:
settings.json

Custom Model Aliases

Create model aliases for easier switching:
config.yaml
Then in Cline:
settings.json

Features

Autonomous Coding

Cline can autonomously:
  • Read and analyze your codebase
  • Create, edit, and delete files
  • Run terminal commands
  • Search for information
  • Debug issues

Streaming Responses

Cline supports streaming responses through CLI Proxy API:
  • Real-time code generation
  • Progressive task execution
  • Instant feedback on actions

Function Calling

For models that support function calling (Gemini, OpenAI, Claude):
  • File system operations
  • Code analysis tools
  • Search and navigation
  • Terminal integration

Multimodal Support

For models that support images (Gemini, Claude):
  • Analyze screenshots
  • Debug UI issues
  • Design reviews

Workflow Examples

Example 1: Full-Stack Development

1

Configure Cline

settings.json
2

Give Cline a Task

Open Cline panel and type:
3

Review and Approve

Cline will:
  • Create necessary files
  • Write the code
  • Ask for approval before executing commands
4

Test and Iterate

Continue the conversation:

Example 2: Bug Fixing

1

Select Claude Model

settings.json
2

Describe the Bug

3

Let Cline Investigate

Cline will:
  • Read relevant files
  • Analyze the code
  • Propose fixes
  • Execute tests

Troubleshooting

Connection Errors

If Cline shows connection errors:
  1. Verify CLI Proxy API is running:
  2. Check the Base URL in Cline settings matches your config
  3. Ensure no firewall is blocking localhost connections

Authentication Failures

If you see “Invalid API key” or authentication errors:
  1. Verify the API key in Cline matches one in your config.yaml:
    config.yaml
  2. Check for whitespace or special characters
  3. Restart CLI Proxy API after config changes

Model Not Available

If Cline can’t use a specific model:
  1. Authenticate with the provider first:
  2. Verify the model is listed:
  3. Check provider configuration in config.yaml

Slow Responses

If responses are slower than expected:
  1. Check your network connection to OAuth providers
  2. Enable debug logging to see timing info:
    config.yaml
  3. Consider using faster models (e.g., gemini-2.5-flash instead of gemini-2.5-pro)
  4. Configure multiple accounts for load balancing

Best Practices

1. Choose the Right Model

  • Quick tasks: gemini-2.5-flash, claude-haiku-4
  • Complex reasoning: gemini-2.5-pro, claude-sonnet-4
  • Maximum capability: claude-opus-4, gpt-5

2. Use Workspace Settings

Create project-specific settings in .vscode/settings.json:
.vscode/settings.json

3. Configure Multiple Providers

Authenticate with multiple providers for redundancy:

4. Enable Load Balancing

config.yaml

5. Monitor Usage

config.yaml
Then check usage via Management API or logs.

Performance Optimization

Reduce Latency

config.yaml

Handle Rate Limits

config.yaml

Optimize for Concurrent Requests

config.yaml

See Also