Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cline.bot/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

Quick Start

# Interactive session
cline

# Run one task immediately
cline "refactor this module to use async/await"

# Structured output for scripts
cline --json "list TODO comments"

Headless mode

Use headless mode for scripts/automation and processable output. Headless is triggered when using flags like --json, when stdin is piped, or when output is redirected.

When headless activates

InvocationReason
cline --json "task"JSON output mode
cat file | cline "task"stdin is piped
cline "task" > output.txtstdout is redirected
# CI/script style execution
git diff | cline "review these changes"

# JSON for parsing
cline --json "summarize this changelog" | jq -r '.text'
See: Headless Mode

Autonomous execution

For fully unattended runs, use auto-approval:
cline --auto-approve true "run tests and fix failures"
Mode selection also works in headless runs:
# plan-first
cline -p "design migration plan"

# act immediately (default)
cline "apply migration"
Autonomous execution can modify files and run commands without further prompts. Use a clean branch and review results.

High-Value Commands

cline --help
cline <command> --help
CommandPurpose
clineStart interactive mode or run a prompt
cline authAuthenticate and set provider/model
cline configOpen the interactive config view
cline mcpManage MCP servers
cline doctorDiagnose/fix configuration issues
cline historyShow and manage task history
cline scheduleManage scheduled tasks
cline hubManage local hub daemon
cline kanbanLaunch Kanban app

Most-Used Global Flags

Source of truth: CLI Reference
FlagPurpose
-p, --planStart in Plan mode
--auto-approve <boolean>Global tool auto-approval (true/false, default true)
-m, --model <model>Override model for this run
-P, --provider <id>Override provider for this run
-c, --cwd <path>Set working directory
--config <dir>Use config directory
--data-dir <dir>Use isolated local state
--jsonOutput newline-delimited JSON messages
--thinking <level>Set reasoning effort: none|low|medium|high|xhigh (default medium)
-t, --timeout <seconds>Set task timeout

Automation Patterns

Pipe context in

cat README.md | cline "summarize key setup steps"
git diff | cline "review for potential regressions"

Chain tasks

git diff | cline "explain these changes" | cline "write a commit message"

Restrict command execution

export CLINE_COMMAND_PERMISSIONS='{"allow": ["npm *", "git *"], "deny": ["rm -rf *", "sudo *"]}'

Include images in tasks

cline -i "fix the layout issue shown in @./screenshot.png"

# or reference inline
cline "fix the UI shown in @./design-mockup.png"

Set execution timeout

cline --timeout 600 "run full test suite"

JSON Output Schema

When using --json, each line is a JSON message object.
{"type":"say","text":"I'll create the file now.","ts":1760501486669,"say":"text"}
FieldTypeDescription
type"ask" or "say"Message category
textstringMessage content
tsnumberUnix timestamp in milliseconds
saystringSubtype when type is "say"
askstringSubtype when type is "ask"
reasoningstringOptional model reasoning
partialbooleanStreaming flag

Next Steps