# Interactive sessioncline# Run one task immediatelycline "refactor this module to use async/await"# Structured output for scriptscline --json "list TODO comments"
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.
# CI/script style executiongit diff | cline "review these changes"# JSON for parsing: print only the final answercline --json "summarize this changelog" | jq -r 'select(.type == "run_result") | .text'
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
--json
Output newline-delimited JSON messages
--thinking <level>
Set reasoning effort: none|low|medium|high|xhigh. Bare --thinking uses medium. Without the flag, Cline uses the level you last chose with /model, or else the provider’s default
The CLI has no allow or deny list for shell commands. To block commands, use a PreToolUse hook that cancels run_commands calls you don’t allow, like the .clineignore hook.
When you give Cline a task with --json, each line is a JSON object with a type. Agent events arrive as agent_event lines, and a run_result line holds the final text when the run finishes. The CLI Reference describes the line types.