Skip to content
/

Cline

cline · cline/cline · ★ 62k · last commit 2026-05-25

Primitive shape 4 total
Commands 2 Skills 1 Hooks 1
00

Summary

Cline — Summary

Cline is an autonomous coding agent available as a VS Code extension, JetBrains plugin, CLI (npm i -g cline), and SDK, all sharing the same agent core. It operates with explicit human-in-the-loop approval for every file edit and shell command (or auto-approve with --yolo), supports Plan/Act mode separation, and integrates MCP servers for extensibility. The Kanban companion product runs many parallel Cline agents from a web-based task board, each with its own git worktree and auto-commit. The .clinerules/ directory in a repo provides project-specific behavioral instructions analogous to CLAUDE.md. Cline has a JetBrains plugin (closed source) and a VSCode extension with a full chat UI including diff viewer and checkpoint rollback.

Cline is one of the original coding agents that frameworks like spec-kit, openspec, BMAD, and superpowers benchmark against. It differs from those seed frameworks in that it ships the full agent runtime (not a behavior layer on top of another agent): its own CLI binary, a shared SDK, IDE extensions, and a parallel-agent Kanban board. Seed frameworks like superpowers add skills/hooks to existing agents like Claude Code; Cline IS the agent runtime itself.

01

Overview

Cline — Overview

Origin

Originally created as "claude-dev" by Saoud Rizwan and published to the VS Code Marketplace. Rebranded as Cline when it became the most-installed AI coding extension. Now maintained by the Cline team (cline.bot). The VS Code extension has over 62,000 GitHub stars and is one of the top-downloaded AI tools in the VS Code Marketplace.

Architecture Philosophy

Cline is an SDK-first product. The same agent core (in sdk/packages/core/) powers the CLI, VS Code extension, JetBrains plugin, and Kanban board. This means behaviors — Plan/Act modes, MCP servers, checkpoints, rules, skills, provider configuration — work identically across all surfaces.

Plan / Act Mode

A key design choice: agents can switch between:

  • Plan mode: read-only exploration, asks clarifying questions, lays out strategy
  • Act mode: executes the plan with file edits and commands

This prevents the common failure of agents that immediately start editing without understanding the codebase.

Rules and Skills

From README:

"Rules and Skills — Rules define how Cline should act. Skills define what Cline can do. Both can be scoped at the project level using .clinerules/."

.clinerules/ is Cline's equivalent of CLAUDE.md but with more structure: separate files for network behavior, protobuf patterns, storage patterns, etc.

Key Design Principles

  1. Human-in-the-loop: Every edit and command requires approval by default (toggleable)
  2. Checkpoints: Every accepted change creates a checkpoint; rollback is one click
  3. Provider agnosticism: Anthropic, OpenAI, Google Gemini, OpenRouter, AWS Bedrock, GCP Vertex, and more
  4. SDK as foundation: The agent is a composable library; the CLI and extensions are thin clients
02

Architecture

Cline — Architecture

Distribution

  • VS Code Extension: Published to VS Code Marketplace (saoudrizwan.claude-dev)
  • JetBrains Plugin: Published to JetBrains Marketplace (closed source)
  • CLI: npm i -g cline — TypeScript/Bun binary
  • SDK: npm install @cline/sdk — Node.js library
  • Kanban: npm i -g kanban — separate package, companion product

Install

# CLI
npm install -g cline

# SDK
npm install @cline/sdk

# VS Code
# Install from Marketplace: saoudrizwan.claude-dev

Directory Layout

The repo is a monorepo:

sdk/
  packages/
    core/          # shared agent core (all surfaces use this)
    sdk/           # public SDK package
    llms/          # LLM provider abstractions
    shared/        # types, utilities
  apps/
    cli/           # CLI source (binary name: cline)
    examples/      # SDK usage examples
.claude/
  settings.json    # hooks config (SessionStart → setup script)
  commands/
    release.md     # release workflow command
    hotfix-release.md
  skills/
    cline-sdk.md   # SDK usage skill
  hooks/
    claude-code-for-web-setup.sh
.clinerules/       # project behavioral instructions
  general.md       # main codebase knowledge
  network.md       # network request patterns
  storage.md       # state persistence patterns
  cline-overview.md
  protobuf-development.md
  workflows/       # workflow-specific rules

CLI Binary

Binary name: cline
Platform: TypeScript/Bun — published as pre-built native binaries for macOS, Linux, Windows (arm64 + x64). No Node.js runtime required at install time.

Required Runtime

  • Node.js >= 18 (for SDK consumers)
  • No runtime needed for CLI (pre-built binary)
  • VS Code for extension

Target AI Tools

  • Anthropic (Claude)
  • OpenAI (including GPT, Responses API)
  • Google Gemini
  • OpenRouter
  • AWS Bedrock
  • GCP Vertex
  • Azure OpenAI
  • OpenAI-compatible endpoints
  • Cline OAuth (sign in with Cline account)
  • OpenAI Codex OAuth

Primary: Anthropic Claude

03

Components

Cline — Components

CLI Modes

Mode Flag Purpose
Interactive TUI cline or cline -i Full terminal UI with plan/act toggle, slash commands
One-shot cline "prompt" Single turn, exit
JSON stream cline --json "..." NDJSON event stream for piping
Yolo cline --yolo "..." Auto-approve all tools, exit when done
Zen cline --zen "..." Background hub daemon, exit immediately
Auth cline auth Interactive provider authentication setup

Slash Commands (in project .claude/commands/)

Command Purpose
release.md Full release workflow
hotfix-release.md Hotfix release workflow

Skills (in project .claude/skills/)

Skill Purpose
cline-sdk.md How to use the Cline SDK

Hooks (in project .claude/settings.json)

Event Handler Purpose
SessionStart claude-code-for-web-setup.sh Configure Claude Code for web development context

.clinerules Files (Project Behavioral Instructions)

File Purpose
general.md Core codebase knowledge, tribal patterns
network.md Network request patterns
storage.md State persistence patterns
protobuf-development.md gRPC/protobuf communication patterns
cline-overview.md High-level architecture reference
workflows/ Workflow-specific guidance

Core SDK Packages

Package Purpose
sdk/packages/core Shared agent core — task execution, tool approval, plan/act mode
sdk/packages/llms Provider abstraction layer
sdk/packages/shared Types, serialization, proto conversions
sdk/packages/sdk Public SDK API surface

Agent Tools (available in act mode)

  • File read/write/create/delete
  • Bash command execution
  • Web browsing (browser automation)
  • MCP tool calls
  • Human-in-the-loop approval for each

Kanban (separate product)

npm i -g kanban — web-based task board at github.com/cline/kanban:

  • Each card gets its own git worktree
  • Parallel Cline agents per card
  • Dependency chains between cards
  • Auto-commit per agent
  • Web UI for management
05

Prompts

Cline — Prompts

Prompt 1: .clinerules/general.md (Project Knowledge Injection)

Source: .clinerules/general.md in the cline repo itself

Technique: Tribal knowledge documentation as persistent agent context — captures non-obvious codebase patterns that reduce back-and-forth. The prompt is injected as agent context at session start.

This file is the secret sauce for working effectively in this codebase. It captures tribal knowledge—the nuanced, non-obvious patterns that make the difference between a quick fix and hours of back-and-forth & human intervention.

**When to add to this file:**
- User had to intervene, correct, or hand-hold
- Multiple back-and-forth attempts were needed to get something working
- You discovered something that required reading many files to understand
- A change touched files you wouldn't have guessed
- Something worked differently than you expected
- User explicitly asks to "add this to CLAUDE.md"

**Proactively suggest additions** when any of the above happen—don't wait to be asked.

**What NOT to add:** Stuff you can figure out from reading a few files, obvious patterns, or standard practices. This file should be high-signal, not comprehensive.

The file then goes into specific patterns: gRPC/Protobuf communication, API provider additions, Responses API providers, etc.


Prompt 2: .clinerules/network.md (Behavioral Constraint Injection)

Source: .clinerules/network.md in the cline repo

Technique: Behavioral constraint file — restricts what the agent is allowed to do with network requests. This is a safety boundary document, not a capability enhancement.

(Content not publicly visible, referenced via @.clinerules/network.md in CLAUDE.md)


Prompt 3: CLI README Context

Source: sdk/apps/cli/README.md — describes expected behavior for headless mode

Technique: Documentation-as-prompt (the CLAUDE.md / AGENTS.md pattern) — key behavioral expectations documented in AGENTS.md and README are used by the agent when operating headlessly.

From AGENTS.md:

- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
- Prefer automation: execute requested actions without confirmation unless blocked by missing info or safety/irreversibility.

Prompt 4: .claude/commands/release.md (Command Workflow)

Technique: Structured workflow command — step-by-step release process as a Claude Code slash command.

(Full content not publicly visible — it orchestrates the release workflow including versioning, changelog, and PR creation.)


Prompting Techniques Used

  1. Tribal knowledge injection.clinerules/ files capture non-obvious codebase patterns to reduce agent error rates; explicitly designed to grow over time as the agent makes mistakes
  2. Behavioral constraint files — separate rule files for network/storage/protobuf behavior
  3. Documentation-as-context — AGENTS.md behavioral expectations consumed as agent context
  4. Workflow commands — Claude Code slash commands encode multi-step release and hotfix processes
  5. Session hook injectionSessionStart hook runs a setup script that configures the Claude Code environment for web development
09

Uniqueness

Cline — Uniqueness and Positioning

Differs from Seeds

Cline is one of the original coding agents that all seed frameworks position themselves as layers on top of. Unlike every seed (which are behavior/methodology layers on top of existing agents), Cline IS the agent runtime. It ships its own CLI binary, SDK, VS Code extension, JetBrains plugin, and a separate Kanban product for parallel-agent execution. The closest seed comparison is claude-flow (both support multi-agent execution), but claude-flow layered on top of Claude Code using MCP tools whereas Cline IS a standalone agent with its own execution engine. The .clinerules/ system is analogous to CLAUDE.md/AGENTS.md patterns in seed frameworks, but structured as domain-specific files with an explicit "tribal knowledge accumulation" philosophy that differs from superpowers' Iron Laws.

Key Differentiators

  1. SDK-first architecture: The same agent core powers CLI, VS Code, JetBrains, and Kanban — no divergence. Seed frameworks are typically Claude Code-only or have separate implementations.

  2. Kanban parallel agents: Running N agents in parallel with git worktree isolation per card is a unique capability not found in any seed framework. The closest is claude-flow's hive-mind, but that uses MCP tooling, not a web UI with dependency chains.

  3. Checkpoint-based undo: Every accepted change creates a checkpoint; rollback is one click in VS Code. This is more granular than git commits and more visible than aider's git reset.

  4. JetBrains plugin: The only framework in this batch with a JetBrains plugin (though source is closed).

  5. Plan/Act mode: Explicit read-only vs write mode toggle gives users granular control over agent autonomy. No seed framework has this exact pattern.

  6. gRPC/protobuf internal communication: The VS Code extension uses a protobuf-based message-passing protocol internally. This is an artifact of the SDK-first design but creates a very precise API contract between the extension host and webview.

Observable Failure Modes

  1. JetBrains plugin is closed source — cannot extend or audit it
  2. Kanban is a separate npm package — multi-agent setup requires installing a second tool; friction for new users
  3. No built-in spec/planning layer — like aider, Cline executes without a formal spec file step; relies on .clinerules/ for behavioral guidance
  4. Provider config complexity — supporting 10+ providers with different auth methods (OAuth, API key, Bedrock roles) creates configuration surface area
  5. Protobuf API expansion — adding new features requires updating proto files, generated types, and proto conversion tables in three separate places; error-prone (documented in .clinerules/general.md)
04

Workflow

Cline — Workflow

Standard VS Code Extension Workflow

  1. Open Chat Panel — Cline side panel in VS Code
  2. Set Mode — Plan or Act (toggleable)
  3. Request — user types task description
  4. Plan Phase (if in Plan mode):
    • Cline reads project structure
    • Asks clarifying questions
    • Produces strategy
  5. Act Phase:
    • Cline executes changes one tool call at a time
    • Each file edit shown as diff in VS Code
    • Each shell command shown with output
    • User must approve each action (or toggle auto-approve)
  6. Checkpoint — after each approved change, a checkpoint is created
  7. Rollback — user can click to revert to any checkpoint

CLI Workflow

# Interactive (with plan/act toggle)
cline

# One-shot auto-approve
cline --yolo "Run tests and fix any failures"

# CI/CD pipeline
cline --json "Audit this package" | jq '.events[]'

Headless / CI Mode

  • --yolo flag skips all approval prompts
  • --json streams NDJSON events (tool calls, responses, completions)
  • Exit code reflects success/failure
  • Can be piped: cat file.txt | cline "Summarize this"

Kanban Workflow

  1. Create cards on Kanban board (via web UI)
  2. Each card assigned to an agent
  3. Agent gets its own git worktree
  4. Agent runs autonomously with auto-commit
  5. Dependency chains enforced (card B waits for card A)
  6. Results visible in web board

Phases + Artifacts Table

Phase Artifact
Plan mode No persistent artifact (conversation only)
File edits Modified files in working tree
Checkpoints Internal checkpoint store
Kanban Git commit per card in dedicated worktree

Approval Gates

Gate Type Notes
File edit approval yes-no Every edit shown as diff
Shell command approval yes-no Command + output shown
MCP tool call yes-no Tool name + args shown
Auto-approve toggle N/A Bypasses all above
--yolo flag N/A CLI bypass
06

Memory Context

Cline — Memory and Context

State Storage

Cline uses a combination of in-memory and local file-based state:

State Storage Scope
Active conversation In-memory Session
Checkpoints Local checkpoint store (VS Code workspace storage) Session
.clinerules/ Project files Project, cross-session
Provider credentials Local secure storage Global
MCP server config Project .cline or VS Code settings Project

Checkpoints

Every accepted change creates a checkpoint. In VS Code, the user can click a checkpoint to:

  • Review what changed
  • Revert to that state
  • Branch from that state

This is Cline's primary "undo" mechanism, more granular than git commits.

.clinerules/ (Persistent Project Context)

The .clinerules/ directory persists project-specific instructions across sessions. This is the primary cross-session memory mechanism: the rules accumulate codebase knowledge over time (via the "add this to .clinerules" pattern) and are injected into every new session.

This is analogous to CLAUDE.md but with:

  • Multiple files (organized by domain)
  • @<filepath> inclusion syntax (e.g., @.clinerules/network.md referenced from CLAUDE.md)
  • Explicit guidance on when to update the files

Context Window Management

Cline manages context through:

  • Selective file reading (requests specific files rather than dumping entire codebase)
  • Incremental context building (reads imports, then reads imported files as needed)
  • No explicit compaction mentioned in public docs

Cross-Session Handoff

.clinerules/ and .claude/skills/ provide persistent cross-session context. The agent can pick up from a new session with codebase knowledge intact via these files.

Kanban Session State

Each Kanban card runs a separate agent with its own git worktree. Card state (in progress, blocked, complete) persists in the Kanban board database. Dependencies between cards are explicit.

07

Orchestration

Cline — Orchestration

Multi-Agent

Cline supports multi-agent through the Kanban product. In the standard CLI/extension, it is single-agent. Kanban runs many Cline agents in parallel, each assigned to a task card with its own git worktree.

Orchestration Pattern

  • Single agent: interactive-loop (not orchestrated)
  • Kanban: parallel-fan-out — each card runs independently; dependency chains enforce ordering

Plan/Act Mode Split

Within a single agent session, Cline implements a two-mode pattern:

  • Plan mode: read-only agent (denies file edits by default, asks permission before bash). Used for analysis.
  • Act mode: full-access agent for execution.

The user manually toggles between modes. This is sequential (plan then act), not parallel.

Isolation Mechanism

  • Single agent: none (edits working tree in place)
  • Kanban: git worktree per card (each card gets a separate directory on disk with a different branch)

Multi-Model

Cline supports BYOK for any supported provider. A single model handles all roles. There is no explicit architect/editor or planner/executor split — the same model does both. Multi-model routing is not a built-in feature.

Execution Mode

Interactive-loop (TUI/extension) or one-shot (CLI --yolo).

Background daemon mode via "Zen" (cline --zen): fires task to background hub and exits immediately. The hub daemon runs the task and can be checked later.

Crash Recovery

Checkpoints (in VS Code) allow recovery within a session. Cross-session recovery relies on git history.

Context Compaction

Not explicitly documented. The shared core may implement context management but it is not surfaced in public docs.

Consensus Mechanism

None.

Prompt Chaining

None built-in. The agent reads plan output and executes it, but this is a single conversational thread, not a formal chaining pipeline.

08

Ui Cli Surface

Cline — UI and CLI Surface

CLI Binary

Name: cline
Install: npm install -g cline
Is thin wrapper: No — cline binary is the Cline agent runtime itself (not a wrapper around another CLI)
Platform: Pre-built native binaries for macOS, Linux, Windows (arm64 + x64). No Node.js required at install time.

Modes

Mode Command Description
Interactive TUI cline Full terminal UI
One-shot cline "prompt" Single turn, exit
JSON stream cline --json "..." NDJSON events
Yolo cline --yolo "..." Auto-approve, exit
Zen (background) cline --zen "..." Background daemon
Auth cline auth [provider] Provider auth setup

Key Flags

  • --provider <name> — set LLM provider
  • --apikey <key> — set API key
  • --modelid <id> — set model
  • --json — JSON output for scripting
  • --yolo — auto-approve all (CI/CD)

VS Code Extension

ID: saoudrizwan.claude-dev
Features:

  • Chat panel with full conversation history
  • Diff viewer for every proposed file edit
  • Tool approval/deny UI for each action
  • Checkpoint timeline with rollback
  • Plan/Act mode toggle
  • MCP server management
  • Provider configuration

JetBrains Plugin

Available for IntelliJ IDEA, PyCharm, WebStorm, GoLand, and other JetBrains IDEs. Same agent core as VS Code extension. Source is closed — not included in the public repo.

Kanban Board (Web)

npm i -g kanban — launches a local web-based task board:

  • Multi-agent parallel execution
  • Each task card = one agent + one git worktree
  • Dependency graph between cards
  • Status tracking (pending, in-progress, done, blocked)
  • Port: unknown (default web app port)

SDK

npm install @cline/sdk — programmatic Node.js API for building custom agents powered by the Cline core. Supports custom tools, multi-agent teams, connectors, scheduled automations.

Observability

  • VS Code: diff viewer, token usage, cost estimate per session
  • CLI: JSON stream mode for event logging
  • No dedicated audit log file created in project

Related frameworks

same archetype · same primary tool · same memory type

Kiro ★ 3.8k

Prevents 'vibe coding' by enforcing a Requirements→Design→Tasks spec pipeline with EARS notation before any code is generated.

Zed ★ 84k

Open-source, GPU-accelerated IDE with a native AI agent featuring LSP-aware tools, update_plan for visible task tracking,…

openspec-for-copilot ★ 18

Brings OpenSpec spec-driven development to GitHub Copilot Chat users via a VS Code extension with sidebar spec management,…

OpenSpec-Zed ★ 14

Adds OpenSpec slash commands to the Zed editor's AI Assistant panel so Zed users can initiate spec-driven workflows without…

Shadow Code ★ 79

Developers write pseudocode in a parallel .shadow file; Shadow Code transforms it into target-language production code via VS…

TabbyML/Tabby ★ 34k

Self-hosted AI coding assistant server (alternative to GitHub Copilot) with admin dashboard, RAG-based completions, and multi-IDE…