Cline is an open-source (Apache-2.0) autonomous coding agent that runs inside VS Code. It edits files, runs commands, and asks for approval at every meaningful step. The latest stable VS Code extension is v4.0.8 (2026-07-11); the parallel CLI build is at v3.0.40 (2026-07-13). Compared to Claude Code and OpenCode (which are terminal-first), Cline lives where the files and the diff already are. This article covers install on Ubuntu, the default Plan + Act workflow, and how to wire it to your model provider.

Install on Ubuntu 22.04 / 24.04

Cline ships as a VS Code extension. Easiest path:

Bash
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" 
  | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
sudo apt update && sudo apt install -y code

code --install-extension saoudrizwan.claude-dev

After installing, open VS Code, click the Cline icon in the left sidebar (a robot head), and you’ll land in a chat panel inside the editor.

A standalone CLI also exists (for users who don’t run VS Code but like Cline’s defaults):

Bash
sudo apt install -y nodejs npm
npm i -g cline
cline --help

Pick your model

Cline is BYOK to OpenAI-compatible providers. Set the API key:

  1. Click the Cline panel gear icon → “API Provider” → pick OpenAI / Anthropic / OpenRouter / Ollama / etc.
  2. Paste the key. It’s stored in your VS Code settings under cline.apiKey.

For local-only:

Bash
ollama serve &

You can also plug Cline into a corporate gateway that fronts Anthropic or other providers; pick “OpenAI Compatible” as the provider type and supply the base URL.

The Plan + Act workflow

Cline’s defining UX is two distinct phases: Plan and Act. Toggle the bar at the bottom of the panel to flip between them.

  • Plan: read-only. Cline sees the workspace, builds a plan, shows you the plan. It cannot edit anything in this mode.
  • Act: write-mode. Cline executes the plan step by step, asking for approval before each mutation (file edit, command run, browser action).

A working loop looks like:

  1. Toggle to Plan.
  2. Describe the task. Cline reads the relevant files and returns a numbered plan — files it’ll touch, commands it’ll run, MCP servers it’ll call, expected outputs.
  3. Read the plan. Reject scope creep.
  4. Toggle to Act.
  5. Approve the first action. Cline executes it. Approve each subsequent step.

This gives you a much narrower blast radius than freeform agents — every state-changing operation passes through your hands.

MCP support is the lever

Cline’s biggest 2025/2026 contribution is first-class MCP support. From the panel gear menu, install MCP servers (filesystem, GitHub, Postgres, Slack, Puppeteer, etc.) one click at a time. Each server adds tools that Cline can call inside the plan — “fetch the GitHub issue and patch the failing test” becomes a one-shot prompt.

A practical MCP starter set on Ubuntu:

  • Filesystem — extra read/write directories
  • GitHub — issues, PRs, actions
  • Postgres — schema-aware migrations
  • Puppeteer — visual regression testing

Watch the prompt cache: each enabled MCP server ships its tool schema in every Cline request. Three servers is fine; twenty is not.

Strengths of the in-IDE agent

  • Diff is right there: every edit is an inline diff in the open editor. The terminal agents show you a final diff in scroll-back; Cline shows it as it happens.
  • Plan + Act is a natural breakpoint: when Cline is in plan mode, you can review and edit code in the editor while it thinks.
  • LSP diagnostics in real time: after every edit, Cline re-runs the language server for the open files; you see red squiggles appear before the next user message.

When Cline is the wrong pick

  • The codebase is too big for VS Code (large monorepos with deeply nested dependencies) — opening it in the editor loads both Cline and the indexer, and conflicts become annoying.
  • You want to drive from a terminal without an editor open. Use the cline CLI binary or pick OpenCode / Aider.
  • You’re running Claude Code enterprise. Cline is single-user only; if you need shared settings across a team, see Cline’s “Provider Profiles” instead.
Last modified: 2026年7月15日

Author

Comments

Write a Reply or Comment

Your email address will not be published.