Cline
Cline
An open-source VS Code AI coding agent that autonomously edits multiple files, runs terminal commands, and browses the web.
Overview
Cline is an open-source AI coding agent that runs as a VS Code extension. Unlike GitHub Copilot, which focuses on inline code completion, Cline operates as an autonomous agent that can edit multiple files across a project, run terminal commands, browse the web, and invoke external tools. And unlike Cursor or Windsurf, which are forked standalone IDEs, Cline plugs into your existing VS Code setup, so you keep your extensions, themes, and keybindings. It supports a wide range of LLM providers—including Anthropic Claude, OpenAI, OpenRouter, AWS Bedrock, Google Vertex, and local models via Ollama or LM Studio—so you are never locked into a single vendor.
Core features: open source, autonomous multi-file editing, terminal + browser access, model-agnostic, MCP integration.
Installation
Cline is installed from the Visual Studio Code Marketplace. Open the Extensions panel in VS Code, search for "Cline", and install the official extension. After installing, you need an API key from a supported provider (Anthropic, OpenAI, OpenRouter, etc.). Node.js is recommended because many MCP servers and the browser tooling are distributed as npm packages.
# Install from the VS Code Marketplace
# 1. Open VS Code -> Extensions (Cmd/Ctrl+Shift+X)
# 2. Search for "Cline" -> install the official extension
# 3. Reload VS Code
# 4. Click the Cline icon in the sidebar
# 5. Pick an API provider and paste your API key
# Or install via command line
code --install-extension saoudrizwan.claude-dev
# Prerequisites
node --version # Node.js recommended (for MCP servers / browser tool)
# An API key from Anthropic / OpenAI / OpenRouter / etc.The extension ID is saoudrizwan.claude-dev (Cline was previously named Claude Dev).
Basic Usage
Open the Cline panel from the sidebar and type your request in natural language. Cline plans the work and presents each action—file edits, terminal commands, or browser steps—for your approval before executing. You can approve, reject, or edit each proposed action, giving you fine-grained control over what the agent does. Every task is checkpointed, so you can rewind to a previous state if a change goes wrong.
# Open the Cline panel
# Click the Cline icon in the VS Code sidebar
# Or: Cmd/Ctrl+Shift+P -> "Cline: Open In New Tab"
# Example task
"Add input validation to the login form and update the tests"
# Cline will then:
# 1. Read the relevant files
# 2. Propose file edits -> you Approve / Reject each one
# 3. Propose terminal commands (e.g. npm test) -> you Approve / Reject
# 4. Iterate until the task is done
# Checkpoints: use the Checkpoints panel to rewind to a prior stateApprove each action the first few times to understand Cline's behavior; switch on auto-approve once you trust the workflow.
Advanced
Cline's advanced capabilities center on the Model Context Protocol (MCP), a built-in browser tool, auto-approve rules, and custom modes. MCP lets Cline connect to external servers—databases, GitHub, filesystems, Puppeteer—so it can call tools beyond editing files. The browser tool lets Cline navigate pages, click elements, and read DOM content for tasks that need live web data. Auto-approve rules let you whitelist safe commands (e.g. git status) so the agent runs without prompting on each step. Custom modes let you define scoped behaviors, such as a read-only review mode that cannot modify files.
# 1. Add an MCP server (e.g. filesystem) via Settings -> MCP Servers
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
}
}
}
# 2. Enable the browser tool
# Settings -> Enable Browser Tool (requires Puppeteer deps)
# 3. Auto-approve rules (Settings -> Auto-Approve)
# Examples: git status, npm test, npm run lint
# 4. Custom modes (Settings -> Modes)
# e.g. a "Review" mode that only reads files and commentsMCP servers run locally, so tool data stays on your machine—ideal for privacy-sensitive workflows.
Configuration
Cline's settings let you choose an API provider, switch models, and manage how context is gathered. Provider options include Anthropic, OpenAI, OpenRouter, AWS Bedrock, Google Vertex, Gemini, and local runtimes (Ollama, LM Studio). You can switch models per task—pick a strong model for planning and a cheaper one for routine edits. Context management controls which files Cline sees: it auto-includes open files and lets you add more with @ mentions. A .clinerules file in the project root defines coding conventions that Cline follows on every task, similar to CLAUDE.md or .cursorrules.
# .clinerules (project root) - Cline reads this on every task
# Project conventions
- Use TypeScript strict mode
- Prefer functional style; avoid 'any'
- All public functions need JSDoc
- Run 'npm test' before finishing
# Switch the API provider / model in settings
# Cline panel -> Settings (gear icon) -> API Provider -> pick one:
# Anthropic / OpenAI / OpenRouter / Bedrock / Vertex / Ollama / LM Studio
# Context management
# - Open files are included automatically
# - Use @filename to add a file to context
# - Use @folder to include a whole directoryPin a cheaper model for auto-approve loops and a stronger model for planning to control costs.
FAQ
Cost control: Cline bills through your own API key, so costs depend on the provider and model you choose—use OpenRouter to compare prices, or a local Ollama model for free offline use. Difference from Copilot: Copilot focuses on inline completion and chat, while Cline is an autonomous agent that edits multiple files and runs commands. Data privacy: with a local model (Ollama / LM Studio) no code leaves your machine; with cloud providers, requests go to their APIs as governed by their policies. Supported models: any model offered by the configured provider, including Claude, GPT, Gemini, DeepSeek, and local open-source models.
# Cost control tips
# - Use OpenRouter to route to cheaper models for simple tasks
# - Use Ollama for fully free, offline operation
ollama pull deepseek-coder
# Then in Cline: API Provider -> Ollama
# Privacy: choose "Ollama" or "LM Studio" as the provider
# No code is sent to any cloud service
# Supported providers (Settings -> API Provider):
# Anthropic, OpenAI, OpenRouter, AWS Bedrock, Google Vertex,
# Gemini, Ollama, LM StudioCline is open source (github.com/cline/cline), so you can audit the code path and self-host the extension.
More AI Guides
Claude Code
A terminal-native AI coding agent from Anthropic that autonomously understands codebases, edits files, runs commands, and completes multi-step development tasks.
OpenAI Codex
An official command-line AI coding assistant from OpenAI, built on the GPT model family and optimized for code generation and development workflows.
Trae
ByteDance's AI-native IDE—the first of its kind in China—deeply integrates LLMs such as Doubao and DeepSeek, supporting natural-language interaction and multimodal collaboration.
Cursor
A next-generation AI code editor from Anysphere with a built-in Composer agent that can run multiple coding tasks in parallel.
GitHub Copilot
An AI coding assistant co-developed by GitHub and OpenAI, offering code completion, chat, and an Agent mode.
Windsurf
An AI-native IDE from Codeium with a built-in Cascade agent that deeply couples the terminal and editor.