Cline
Cline is an autonomous AI coding agent that runs as a VS Code extension. With over 5 million users, it is one of the most popular AI coding tools in the VS Code ecosystem. Cline can create and edit files, run terminal commands, automate browser interactions, and integrate with the Model Context Protocol (MCP) for extended tool use. Unlike simple autocomplete tools, Cline acts as a full coding agent that can plan and execute multi-step tasks with your approval at each step.
Prerequisites
Before installing Cline, make sure you have the following:
- VS Code or Cursor -- Cline is a VS Code extension and works in any VS Code-compatible editor.
- API key -- You need an API key from a supported AI provider (Anthropic, OpenAI, Google, OpenRouter, or others).
- Desktop environment -- A graphical desktop is required to run VS Code.
TIP
Cline also works with locally hosted models through Ollama or LM Studio, so you can use it without an external API key if you run models locally.
Install VS Code
If VS Code is not already installed:
# Download the VS Code .deb package
wget -qO code.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64'
# Install the package
sudo dpkg -i code.deb
sudo apt install -f
# Clean up the downloaded file
rm code.debInstallation
Method 1: VS Code Marketplace (Recommended)
The easiest way to install Cline is directly from the VS Code Extensions panel.
- Open VS Code.
- Press
Ctrl + Shift + Xto open the Extensions panel. - Search for "Cline" in the marketplace.
- Click Install on the extension by Saoud Rizwan (publisher ID:
saoudrizwan.claude-dev).
Method 2: Command Line
You can install the extension from the terminal:
# Install Cline via the VS Code CLI
code --install-extension saoudrizwan.claude-dev
# Verify the extension is installed
code --list-extensions | grep claude-devMethod 3: VSIX File
If you need to install offline or a specific version:
# Download the latest VSIX from the VS Code Marketplace or GitHub releases
# Then install it manually
code --install-extension cline-*.vsixConfiguration
API Key Setup
After installing Cline, you need to configure an API provider.
- Open VS Code.
- Click the Cline icon in the sidebar (or press
Ctrl + Shift + Pand type "Cline"). - In the Cline panel, click the settings gear icon.
- Select your API provider and enter your API key.
Supported providers include:
| Provider | Models | Notes |
|---|---|---|
| Anthropic | Claude Sonnet, Opus, Haiku | Direct API access |
| OpenAI | GPT-4o, GPT-4.1, o1, o3 | Direct API access |
| Gemini 2.5 Pro, Flash | Direct API access | |
| OpenRouter | Multiple providers | Unified API gateway |
| AWS Bedrock | Claude, other models | Enterprise option |
| Ollama | Local models | Free, runs locally |
| LM Studio | Local models | Free, runs locally |
Using with Ollama (Local Models)
If you want to use Cline without paying for API access:
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Pull a coding-capable model
ollama pull qwen2.5-coder:14b
# Verify the model is available
ollama listThen in Cline settings, select Ollama as the provider and choose your model.
Custom Instructions
You can add custom instructions that Cline will follow in every conversation:
- Open the Cline settings panel.
- Find the "Custom Instructions" field.
- Add project-specific guidelines, coding conventions, or preferred frameworks.
Usage
Opening Cline
There are several ways to open the Cline panel:
- Click the Cline icon in the VS Code sidebar.
- Press
Ctrl + Shift + Pand type "Cline: Open". - Use the keyboard shortcut (configurable in VS Code keybindings).
Basic Workflow
Cline operates as an autonomous agent with a human-in-the-loop approval model. Here is the typical workflow:
- Describe your task in natural language in the Cline chat panel.
- Cline analyzes your codebase and creates a plan.
- Cline proposes changes -- file edits, new files, terminal commands.
- You review and approve each step (or reject and guide Cline differently).
- Cline executes the approved changes and continues until the task is complete.
File References with @-Mentions
You can reference specific files in your prompts to give Cline focused context:
@file:src/main.py-- Reference a specific file.@folder:src/-- Reference an entire directory.@url:https://docs.example.com-- Fetch and include web content.@problems-- Include current VS Code diagnostic problems.@terminal-- Include recent terminal output.
Autonomous Editing
Cline can create, edit, and delete files across your project. Before making any changes, Cline shows you a diff preview:
- Approve the change to apply it.
- Reject the change and provide alternative instructions.
- Edit the proposed change before applying.
Running Terminal Commands
Cline can execute terminal commands on your behalf, such as installing packages, running tests, or starting development servers. Each command requires your approval before execution.
Browser Automation
Cline includes browser automation capabilities for testing web applications:
- Cline can launch a headless browser.
- Navigate to URLs and interact with pages.
- Take screenshots and analyze the results.
- Debug UI issues directly.
MCP (Model Context Protocol) Support
Cline supports MCP servers, allowing it to use external tools:
# Example: Cline can connect to MCP servers for
# database access, file system tools, web scraping, and more
# MCP servers are configured in Cline's settings
# Navigate to: Cline Settings > MCP ServersCommon Prompt Examples
Create a REST API endpoint for user registration with input validation
Refactor the database module to use connection pooling
Write unit tests for the authentication service
Find and fix the memory leak in the data processing pipeline
Set up a CI/CD pipeline with GitHub Actions for this projectUpdate
Cline updates automatically through the VS Code extension marketplace. To manually check for updates:
- Press
Ctrl + Shift + Xto open the Extensions panel. - Click on Cline in your installed extensions.
- If an update is available, click Update.
Or update from the command line:
# VS Code will update extensions automatically, but you can force it
code --install-extension saoudrizwan.claude-dev --forceTroubleshooting
Cline sidebar panel does not appear
If the Cline icon is not visible in the VS Code sidebar:
# Verify the extension is installed
code --list-extensions | grep claude-dev
# If not installed, install it
code --install-extension saoudrizwan.claude-dev
# Restart VS CodeYou can also try resetting the sidebar by right-clicking the sidebar and making sure Cline is checked.
API connection errors
If Cline cannot connect to your API provider:
- Verify your API key -- Open Cline settings and re-enter your key.
- Check network connectivity -- Make sure your system can reach the API endpoint.
- Check proxy settings -- If you are behind a proxy, configure VS Code proxy settings:
# Test API connectivity (example for Anthropic)
curl -I https://api.anthropic.com
# Configure VS Code proxy if needed
# Open VS Code settings (Ctrl + ,) and search for "proxy"High memory or CPU usage
Cline with large codebases can consume significant resources:
- Limit the number of files in your workspace.
- Use
.clineignoreto exclude large directories:
# Create a .clineignore file in your project root
cat > .clineignore << 'EOF'
node_modules/
dist/
build/
*.log
.git/
EOFExtension conflicts
If Cline conflicts with other AI extensions:
- Disable other AI coding extensions temporarily.
- Check the VS Code Output panel (
Ctrl + Shift + U) for error messages. - Select "Cline" from the output channel dropdown to view Cline-specific logs.
File permission errors
If Cline cannot edit files in your project:
# Check file ownership
ls -la /path/to/your/project
# Fix permissions if needed
sudo chown -R $USER:$USER /path/to/your/projectRelated Resources
- AI Tools Overview -- Overview of all AI tools on Debian
- Cursor -- AI-powered IDE as an alternative editor
- Command Line Basics -- Terminal fundamentals
- Cline Official Documentation -- Official Cline documentation
- Cline GitHub Repository -- Source code and issue tracker