>
AI Coding

Cline — The Complete Guide

Cline is an open-source coding agent that runs inside VS Code. It plans, edits files and executes commands, asking permission at each step, and works with whichever model you choose.

AI CodingOpen sourceBring your own modelUpdated May 2026
Visit Cline ↗cline.bot
SimpleStart here

What is Cline?

Cline is a VS Code extension that turns a language model into an agent able to read your codebase, write files and run terminal commands.

It differs from most alternatives in two ways: it is open source, and it asks your approval before each action rather than working out of sight.

Bring your own model

Cline does not sell a model. You connect an API key for Claude, GPT, Gemini, or a local model via Ollama.

That means cost is whatever you spend on tokens, and you can switch models without changing tools — including using a cheap model for simple work and an expensive one for hard problems.

Who it suits

Developers who want agentic capability without a subscription, want to see exactly what the agent is doing, or need to use a specific model for data or cost reasons.

WorkingBuild it

The approval loop

Cline proposes each file edit and each command and waits for approval. You see the diff before it is applied and the command before it runs.

This is slower than fully autonomous agents and catches a category of error that autonomous tools only reveal afterwards. Auto-approval can be enabled for low-risk actions once you trust a workflow.

Cost control

Agentic coding consumes tokens quickly — the agent reads files, reasons, retries. A single substantial task can cost more than expected.

Practical controls: use prompt caching, keep context focused rather than letting it read the whole repository, and route simple tasks to a cheaper model.

Against Cursor and Copilot

Cursor is a complete AI-first editor with a polished experience and a subscription. Copilot is deeply integrated and inexpensive but less agentic.

Cline is the option for people who want an open-source tool inside their existing editor with full model choice. The trade is a rougher experience than a commercial product.

DeepGo deeper

Open source implications

The code is inspectable, which matters for organisations that need to know exactly what an agent does with their codebase and where data goes.

It also means no vendor lock-in and no risk of the pricing model changing beneath you — though also no vendor support.

Model choice in practice

Agentic coding is demanding on instruction-following and long-context reasoning, and model quality shows more here than in chat.

Test on your own codebase before settling. The gap between models on agentic tasks is usually larger than the gap on conversational tasks.

Working With a Coding Agent Without Losing the Thread

The failure mode is not bad code. It is a large volume of plausible code that nobody has understood, arriving faster than it can be reviewed.

Keep the unit of work small. One change, one purpose, reviewable in a sitting. An agent asked for a large refactor returns something you will approve because reading it properly costs more than the work saved — which is how unreviewed code enters a codebase.

Make the tests the specification. An agent working against a failing test has an objective definition of done; one working against a description has your interpretation of its interpretation.

Commit in small steps and keep the history clean. The ability to bisect is what makes an agent's output safe to accept, and it is the first thing lost when a session produces one enormous commit.

Read the diff, not the summary. The summary is generated from the same process that produced the change, and it is confident about both.

And watch the dependency additions. An agent will reach for a library to solve a problem, and a new dependency is a decision with a long tail that nobody made deliberately.

Evaluating It Against Your Own Work

Vendor demonstrations are built on material the tool handles well, so the only evaluation that predicts anything is one run on your own inputs.

Assemble twenty real examples before the trial starts, including the awkward ones — the messy input, the edge case, the one that went wrong last month. A set of clean examples measures a situation you do not have.

Define what good looks like in writing, before you see any output. Deciding afterwards is choosing the answer rather than measuring it, and it is what makes most tool trials inconclusive.

Time the whole task, not the tool. A tool that halves the generation step and adds a verification step has not saved anything. Measure the end-to-end time including checking and correction, because that is the number your team experiences.

Have two people run the same examples. Tolerance for a given failure varies more between people than between tools, and a decision made by one enthusiast rarely survives contact with the team.

And price the failure, not just the licence. What does a wrong output cost here — a correction, an apology, a customer? That number decides how much checking you need, which is usually the real cost of adoption.

Ask an AI about this page

Opens your assistant with this page as the source, and a question rather than a summary. It will ask what you are building before it answers.

ChatGPTClaudeGeminiPerplexityGrok

Nothing is sent from here. The link carries only this page’s title and address.