Skip to main content
For quick help in your terminal:

Synopsis

Global options

These options are accepted by any command:

Default command

Running cline without a subcommand starts a task or opens interactive mode.
Options: Mode selection behavior:

cline task (alias: t)

Run a new task with a prompt. Equivalent to cline "prompt".
Accepts the same options as the default command above, plus:

cline auth

Configure authentication with an AI provider.
Options: Supported providers:

cline history (alias: h)

Browse task history with pagination.
Options:

cline config

Open the interactive configuration view.
Navigate tabs with arrow keys:

cline mcp add

Add an MCP server to ~/.cline/data/settings/cline_mcp_settings.json.
Arguments: Options:

cline update

Check for updates and install the latest version.

cline version

Print the installed CLI version.

cline dev log

Open the debug log file in your default editor.
Useful for diagnosing unexpected behavior or reporting bugs.

Environment variables

CLINE_DIR

Override the default configuration directory:
When set, all Cline data — settings, secrets, and task history — is stored in this directory instead of ~/.cline/data/. Use cases:
  • Running isolated Cline instances (e.g., parallel CI jobs)
  • Keeping separate configurations for different projects
  • Testing configuration changes without touching your main setup

CLINE_COMMAND_PERMISSIONS

Restrict which shell commands Cline is allowed to execute:
Format:
Command evaluation order:
  1. Check for dangerous characters (backticks outside single quotes, unquoted newlines)
  2. Parse command segments split by operators (&&, ||, |, ;)
  3. If redirects are detected and allowRedirects is not true, deny the command
  4. Validate each segment: deny rules are checked first, then allow rules
  5. Recursively validate subshell contents ($(...) and (...))
  6. All segments must pass for the command to be allowed
When allow is set, any command not matching the allow patterns is denied. Use this in security-sensitive environments like shared CI runners.

JSON output format

When using --json, each message is written as a JSON object on its own line:
Required fields: Optional fields:

Configuration files

Cline stores all data under ~/.cline/ by default:
The CLINE_DIR environment variable or --config flag changes the root from ~/.cline/data/ to your specified path.

Examples

Interactive development

Headless and automation

Piped input

Authentication

Isolated configurations


See also

Installation

Install Cline CLI and configure authentication.

Interactive mode

Keyboard shortcuts, slash commands, and file mentions.

Headless mode

Run Cline autonomously in scripts and CI/CD pipelines.