Skip to main content

Prerequisites

  • Cline CLI installed (install via npm i -g cline)
  • Provider authenticated (cline auth) — use the Cline Provider, ClinePass, or your own provider key (Authorization Guide)

Quick Start

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

See: Headless Mode

Autonomous execution

For fully unattended runs, use auto-approval:
Mode selection also works in headless runs:
Autonomous execution can modify files and run commands without further prompts. Use a clean branch and review results.

High-Value Commands

Most-Used Global Flags

Source of truth: CLI Reference

Automation Patterns

Pipe context in

Chain tasks

Restrict command execution

Include images in tasks

Set execution timeout

JSON Output Schema

When using --json, each line is a JSON message object.

Next Steps