Synopsis
Global Options
These options work with any command:| Option | Description |
|---|---|
--config <path> | Use a custom configuration directory instead of ~/.cline/data/ |
-c, --cwd <path> | Set the working directory for the task |
-v, --verbose | Show detailed output including model reasoning |
--help | Show help for the command |
Modes of Operation
Cline CLI automatically detects the best output mode based on how you invoke it:| Mode | When Activated | Description |
|---|---|---|
| Interactive | cline with no args, TTY connected | Rich terminal UI with real-time streaming, keyboard shortcuts, and visual feedback. |
| Task | cline "prompt" with TTY connected | Interactive UI starts immediately with your task. |
| Plain Text | stdin piped, stdout redirected, or --yolo/--json flags | Clean text output without UI, suitable for scripting and CI/CD. |
Agent Behavior
Cline operates in two primary modes that control how it approaches tasks:| Mode | Description |
|---|---|
| Act Mode (default) | Cline actively uses tools to accomplish tasks. It can read files, write code, execute commands, use a headless browser, and more. |
| Plan Mode | Cline gathers information and creates a detailed plan before implementation. It explores the codebase, asks clarifying questions, and presents a strategy for your approval before switching to Act Mode. |
-a, --act or -p, --plan flags to explicitly set the mode.
Commands
cline (default)
Run Cline without a subcommand to start a task or enter interactive mode.| Option | Description |
|---|---|
-a, --act | Start in Act mode (default). Cline executes actions directly. |
-p, --plan | Start in Plan mode. Cline analyzes and creates a strategy before acting. |
-y, --yolo | YOLO mode: auto-approve all actions, use plain text output, exit when complete. Ideal for CI/CD. |
-m, --model <id> | Use a specific model (e.g., claude-sonnet-4-5-20250929, gpt-4o). |
-i, --images <paths...> | Include image files with the prompt. |
--thinking | Enable extended thinking with a 1024 token budget. |
--json | Output messages as JSON (one object per line). Forces plain text mode. |
--timeout <seconds> | Maximum execution time before the task is stopped. |
| Invocation | Output Mode | Why |
|---|---|---|
cline | Interactive UI | No arguments, TTY connected |
cline "prompt" | Interactive UI | TTY connected |
cline -y "prompt" | Plain text | YOLO flag forces plain text |
cline --json "prompt" | JSON | JSON flag forces plain text |
cat file | cline "prompt" | Plain text | stdin is piped |
cline "prompt" > out.txt | Plain text | stdout is redirected |
cline task (alias: t)
Run a task with a prompt. This is equivalent tocline "prompt".
cline auth
Configure authentication with an AI provider.| Option | Description |
|---|---|
-p, --provider <id> | Provider ID. See Supported Providers below. |
-k, --apikey <key> | API key for the provider. |
-m, --modelid <id> | Model ID to use (e.g., claude-sonnet-4-5-20250929, gpt-4o). |
-b, --baseurl <url> | Base URL for OpenAI-compatible providers. |
| Provider ID | Description |
|---|---|
anthropic | Anthropic Claude (direct API) |
openai-native | OpenAI GPT models |
openai-codex | ChatGPT subscription via OAuth |
openrouter | OpenRouter (access multiple providers) |
bedrock | AWS Bedrock |
gemini | Google Gemini |
xai | X AI (Grok) |
cerebras | Cerebras (fast inference) |
deepseek | DeepSeek |
ollama | Ollama (local models) |
lmstudio | LM Studio (local models) |
openai | OpenAI-compatible API (custom base URL) |
cline history (alias: h)
Browse task history with pagination.| Option | Description |
|---|---|
-n, --limit <number> | Number of tasks to show (default: 10) |
-p, --page <number> | Page number, 1-based (default: 1) |
cline config
View and manage configuration settings.- Settings - Global and workspace-specific settings
- Rules -
.clinerulesfiles and imported rules - Workflows - Available workflows (appear as slash commands)
- Hooks - Configured hook scripts
- Skills - Enabled skills
cline update
Check for updates and install the latest version.cline version
Show the installed CLI version.cline dev
Developer tools for debugging.Environment Variables
CLINE_DIR
Override the default configuration directory:~/.cline/data/.
Use cases:
- Running isolated Cline instances with different settings
- CI/CD environments with custom state directories
- Testing configuration changes without affecting your main setup
CLINE_COMMAND_PERMISSIONS
Restrict which shell commands Cline can execute:| Field | Type | Description |
|---|---|---|
allow | string[] | Glob patterns for allowed commands. If set, only matching commands are permitted. |
deny | string[] | Glob patterns for denied commands. Deny rules always take precedence over allow rules. |
allowRedirects | boolean | Whether to allow shell redirects (>, >>, <). Default: false. |
- Check for dangerous characters (backticks outside single quotes, unquoted newlines)
- Parse command into segments split by operators (
&&,||,|,;) - If redirects are detected and
allowRedirectsis not true, command is denied - Each segment is validated against deny rules first, then allow rules
- Subshell contents (
$(...)and(...)) are recursively validated - All segments must pass for the command to be allowed
JSON Output Format
When using--json, each message is output as a JSON object (one per line):
| Field | Type | Description |
|---|---|---|
type | "ask" | "say" | Message category |
text | string | Human-readable message content |
ts | number | Unix timestamp in milliseconds |
| Field | Type | Description |
|---|---|---|
say | string | Subtype when type is "say" (e.g., "text", "tool") |
ask | string | Subtype when type is "ask" (e.g., "tool", "followup") |
reasoning | string | Model reasoning (omitted when empty) |
partial | boolean | true while streaming (omitted when complete) |
images | string[] | Image URIs (omitted when empty) |
files | string[] | File paths (omitted when empty) |
Configuration Files
Cline stores all data in~/.cline/ by default:
Examples
Interactive Development
Direct Task Execution
Piped Input
Automation and CI/CD
Authentication
Support
- Report bugs: https://github.com/cline/cline/issues
- Discord community: https://discord.gg/cline
- Documentation: https://docs.cline.bot

