.\" Automatically generated by Pandoc 3.8.3 .\" .TH "CLINE" "1" "January 2026" "Cline CLI 2.0" "User Commands" .SH NAME cline \- AI coding assistant in your terminal .SH SYNOPSIS \f[B]cline\f[R] [\f[I]prompt\f[R]] [\f[I]options\f[R]] .PP \f[B]cline\f[R] \f[I]command\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] .SH DESCRIPTION \f[B]cline\f[R] is a command\-line interface for the Cline AI coding assistant. It provides the same powerful AI capabilities as the VS Code extension, directly in your terminal. .PP Cline is an autonomous AI agent that can read, write, and execute code across your projects. He can create and edit files, run terminal commands, use a headless browser, and more\(emall while asking for your approval before taking actions. .PP The CLI supports both interactive mode (with a rich terminal UI) and plain text mode (for piped input and scripted workflows). .SH MODES OF OPERATION \f[B]Interactive Mode\f[R] : When you run \f[B]cline\f[R] without arguments, it launches an interactive welcome prompt with a rich terminal UI. You can type your task, view conversation history, and interact with Cline in real\-time. .PP \f[B]Task Mode\f[R] : Run \f[B]cline \(lqprompt\(rq\f[R] or \f[B]cline task \(lqprompt\(rq\f[R] to immediately start a task. If stdin is a TTY, you\(cqll see the interactive UI. If stdin is piped or output is redirected, the CLI automatically switches to plain text mode. .PP \f[B]Plain Text Mode\f[R] : Activated automatically when stdin is piped, output is redirected, or \f[B]\-\-json\f[R]/\f[B]\-\-yolo\f[R] flags are used. Outputs clean text without the Ink UI, suitable for scripting and CI/CD pipelines. .SH AGENT BEHAVIOR Cline operates in two primary modes: .PP \f[B]ACT MODE\f[R] : Cline actively uses tools to accomplish tasks. He can read files, write code, execute commands, use a headless browser, and more. This is the default mode for task execution. .PP \f[B]PLAN MODE\f[R] : Cline gathers information and creates a detailed plan before implementation. He explores the codebase, asks clarifying questions, and presents a strategy for user approval before switching to ACT MODE. .SH COMMANDS .SS task (alias: t) Run a new task with a prompt. .PP \f[B]cline task\f[R] \f[I]prompt\f[R] [\f[I]options\f[R]] .PP \f[B]cline t\f[R] \f[I]prompt\f[R] [\f[I]options\f[R]] : Create and run a new task. Options: .PP \f[B]\-a\f[R], \f[B]\-\-act\f[R] : Run in act mode (default) .PP \f[B]\-p\f[R], \f[B]\-\-plan\f[R] : Run in plan mode .PP \f[B]\-y\f[R], \f[B]\-\-yolo\f[R] : Enable yolo/yes mode (auto\-approve all actions, output in plain mode, exit process automatically when task complete) .PP \f[B]\-m\f[R], \f[B]\-\-model\f[R] \f[I]model\f[R] : Model to use for the task .PP \f[B]\-i\f[R], \f[B]\-\-images\f[R] \f[I]paths\&...\f[R] : Image file paths to include with the task .PP \f[B]\-v\f[R], \f[B]\-\-verbose\f[R] : Show verbose output including reasoning .PP \f[B]\-c\f[R], \f[B]\-\-cwd\f[R] \f[I]path\f[R] : Working directory for the task .PP \f[B]\-\-config\f[R] \f[I]path\f[R] : Path to Cline configuration directory .PP \f[B]\-\-thinking\f[R] : Enable extended thinking (1024 token budget) .PP \f[B]\-\-json\f[R] : Output messages as JSON instead of styled text .PP \f[B]\-T\f[R], \f[B]\-\-taskId\f[R] \f[I]id\f[R] : Resume an existing task by ID. The prompt argument becomes an optional follow\-up message. .SS history (alias: h) List task history with pagination. .PP \f[B]cline history\f[R] [\f[I]options\f[R]] .PP \f[B]cline h\f[R] [\f[I]options\f[R]] : Display previous tasks. Options: .PP \f[B]\-n\f[R], \f[B]\-\-limit\f[R] \f[I]number\f[R] : Number of tasks to show (default: 10) .PP \f[B]\-p\f[R], \f[B]\-\-page\f[R] \f[I]number\f[R] : Page number, 1\-based (default: 1) .PP \f[B]\-\-config\f[R] \f[I]path\f[R] : Path to Cline configuration directory .SS config Show current configuration. .PP \f[B]cline config\f[R] [\f[I]options\f[R]] : Display global and workspace state. Options: .PP \f[B]\-\-config\f[R] \f[I]path\f[R] : Path to Cline configuration directory .SS auth Authenticate a provider and configure the model. .PP \f[B]cline auth\f[R] [\f[I]options\f[R]] : Launch interactive authentication wizard, or use quick setup flags. Options: .PP \f[B]\-p\f[R], \f[B]\-\-provider\f[R] \f[I]id\f[R] : Provider ID for quick setup (e.g., openai\-native, anthropic, openrouter) .PP \f[B]\-k\f[R], \f[B]\-\-apikey\f[R] \f[I]key\f[R] : API key for the provider .PP \f[B]\-m\f[R], \f[B]\-\-modelid\f[R] \f[I]id\f[R] : Model ID to configure (e.g., gpt\-4o, claude\-sonnet\-4\-5\-20250929) .PP \f[B]\-b\f[R], \f[B]\-\-baseurl\f[R] \f[I]url\f[R] : Base URL (optional, for OpenAI\-compatible providers) .PP \f[B]\-v\f[R], \f[B]\-\-verbose\f[R] : Show verbose output .PP \f[B]\-c\f[R], \f[B]\-\-cwd\f[R] \f[I]path\f[R] : Working directory .PP \f[B]\-\-config\f[R] \f[I]path\f[R] : Path to Cline configuration directory .SS update Check for updates and install if available. .PP \f[B]cline update\f[R] [\f[I]options\f[R]] : Check npm for newer versions. Options: .PP \f[B]\-v\f[R], \f[B]\-\-verbose\f[R] : Show verbose output .SS version Show the CLI version number. .PP \f[B]cline version\f[R] .SS dev Developer tools and utilities. .PP \f[B]cline dev log\f[R] : Open the log file for debugging. .SH DEFAULT COMMAND OPTIONS When running \f[B]cline\f[R] with just a prompt (no subcommand), these options are available: .PP \f[B]\-a\f[R], \f[B]\-\-act\f[R] : Run in act mode (default) .PP \f[B]\-p\f[R], \f[B]\-\-plan\f[R] : Run in plan mode .PP \f[B]\-y\f[R], \f[B]\-\-yolo\f[R] : Enable yolo mode (auto\-approve all actions). Also forces plain text output mode. .PP \f[B]\-m\f[R], \f[B]\-\-model\f[R] \f[I]model\f[R] : Model to use for the task .PP \f[B]\-v\f[R], \f[B]\-\-verbose\f[R] : Show verbose output .PP \f[B]\-c\f[R], \f[B]\-\-cwd\f[R] \f[I]path\f[R] : Working directory .PP \f[B]\-\-config\f[R] \f[I]path\f[R] : Configuration directory .PP \f[B]\-\-thinking\f[R] : Enable extended thinking (1024 token budget) .PP \f[B]\-\-json\f[R] : Output messages as JSON instead of styled text. Forces plain text mode. .PP \f[B]\-T\f[R], \f[B]\-\-taskId\f[R] \f[I]id\f[R] : Resume an existing task by ID instead of starting a new one. The prompt becomes an optional follow\-up message. .SH JSON OUTPUT FORMAT When using \f[B]\-\-json\f[R], each message is output as a JSON object with these fields: .PP \f[B]Required fields:\f[R] .IP \(bu 2 \f[B]type\f[R]: \(lqask\(rq or \(lqsay\(rq .IP \(bu 2 \f[B]text\f[R]: message text .IP \(bu 2 \f[B]ts\f[R]: Unix epoch timestamp in milliseconds .PP \f[B]Optional fields:\f[R] .IP \(bu 2 \f[B]reasoning\f[R]: reasoning text .IP \(bu 2 \f[B]say\f[R]: say subtype (when type is \(lqsay\(rq) .IP \(bu 2 \f[B]ask\f[R]: ask subtype (when type is \(lqask\(rq) .IP \(bu 2 \f[B]partial\f[R]: streaming flag .IP \(bu 2 \f[B]images\f[R]: list of image URIs .IP \(bu 2 \f[B]files\f[R]: list of file paths .SH EXAMPLES .SS Basic Usage .IP .EX \f[I]# Launch interactive mode\f[R] cline \f[I]# Run a task directly\f[R] cline \(dqCreate a hello world function in Python\(dq \f[I]# Run with verbose output and extended thinking\f[R] cline \-v \-\-thinking \(dqAnalyze this codebase architecture\(dq .EE .SS Mode Selection .IP .EX \f[I]# Run in plan mode (gather info before acting)\f[R] cline \-p \(dqDesign a REST API for user management\(dq \f[I]# Run in act mode with auto\-approval (yolo)\f[R] cline \-y \(dqFix the typo in README.md\(dq .EE .SS Using Specific Models .IP .EX \f[I]# Use a specific model\f[R] cline \-m claude\-sonnet\-4\-5\-20250929 \(dqRefactor this function\(dq \f[I]# Quick auth setup with model\f[R] cline auth \-p anthropic \-k sk\-ant\-xxxxx \-m claude\-sonnet\-4\-5\-20250929 .EE .SS Including Images .IP .EX \f[I]# Include images with explicit flag\f[R] cline task \-i screenshot.png diagram.jpg \(dqFix the UI based on these images\(dq \f[I]# Or use inline image references in the prompt\f[R] cline \(dqFix the layout shown in \(at./screenshot.png\(dq .EE .SS Piped Input .IP .EX \f[I]# Pipe file contents to Cline\f[R] cat README.md \f[B]|\f[R] cline \(dqSummarize this document\(dq \f[I]# Pipe with additional prompt\f[R] echo \(dqfunction add(a, b) { return a + b }\(dq \f[B]|\f[R] cline \(dqAdd TypeScript types to this\(dq \f[I]# Combine piped input with a prompt\f[R] git diff \f[B]|\f[R] cline \(dqReview these changes and suggest improvements\(dq .EE .SS Scripting and Automation .IP .EX \f[I]# JSON output for parsing\f[R] cline \-\-json \(dqWhat files are in this directory?\(dq \f[B]|\f[R] jq \(aq.text\(aq \f[I]# Yolo mode for automated workflows (auto\-approves all actions), forces plain text output\f[R] cline \-y \(dqRun the test suite and fix any failures\(dq .EE .SS Task History .IP .EX \f[I]# List recent tasks\f[R] cline history \f[I]# Show more tasks with pagination\f[R] cline history \-n 20 \-p 2 .EE .SS Resuming Tasks .IP .EX \f[I]# Resume a task by ID (get IDs from cline history)\f[R] cline \-T abc123def \f[I]# Resume a task with a follow\-up message\f[R] cline \-T abc123def \(dqNow add unit tests for the changes\(dq \f[I]# Resume in plan mode to review before continuing\f[R] cline \-T abc123def \-p \(dqWhat\(aqs left to do?\(dq \f[I]# Resume with yolo mode for automated continuation\f[R] cline \-T abc123def \-y \(dqContinue with the implementation\(dq .EE .SS Authentication .IP .EX \f[I]# Interactive authentication wizard\f[R] cline auth \f[I]# Quick setup for Anthropic\f[R] cline auth \-p anthropic \-k sk\-ant\-api\-xxxxx \f[I]# Quick setup for OpenAI\f[R] cline auth \-p openai\-native \-k sk\-xxxxx \-m gpt\-4o \f[I]# OpenAI\-compatible provider with custom base URL\f[R] cline auth \-p openai \-k your\-api\-key \-b https://api.example.com/v1 .EE .SH ENVIRONMENT \f[B]CLINE_DIR\f[R] : Override the default configuration directory. When set, Cline stores all data in this directory instead of \f[CR]\(ti/.cline/data/\f[R]. .PP \f[B]CLINE_COMMAND_PERMISSIONS\f[R] : JSON configuration for restricting which shell commands Cline can execute. When set, commands are validated against allow/deny patternks before execution. When not set, all commands are allowed. .PP Format: \f[CR]{\(dqallow\(dq: [\(dqpattern1\(dq, \(dqpattern2\(dq], \(dqdeny\(dq: [\(dqpattern3\(dq], \(dqallowRedirects\(dq: true}\f[R] .PP \f[B]Fields:\f[R] .IP \(bu 2 \f[B]allow\f[R] (array of strings): Glob patterns for allowed commands. If specified, only matching commands are permitted. Uses \f[CR]*\f[R] to match any characters and \f[CR]?\f[R] to match a single character. Setting allow on anything will deny all others. .IP \(bu 2 \f[B]deny\f[R] (array of strings): Glob patterns for denied commands. Deny rules take precedence over allow rules. .IP \(bu 2 \f[B]allowRedirects\f[R] (boolean): Whether to allow shell redirects (\f[CR]>\f[R], \f[CR]>>\f[R], \f[CR]<\f[R], etc.). Defaults to false. .PP \f[B]Rule evaluation:\f[R] .IP "1." 3 Check for dangerous characters (backticks outside single quotes, unquoted newlines) .IP "2." 3 Parse command into segments split by operators (\f[CR]&&\f[R], \f[CR]||\f[R], \f[CR]|\f[R], \f[CR];\f[R]) .IP "3." 3 If redirects detected and \f[CR]allowRedirects\f[R] is not true, command is denied .IP "4." 3 Each segment is validated against deny rules first, then allow rules .IP "5." 3 Subshell contents (\f[CR]$(...)\f[R] and \f[CR](...)\f[R]) are recursively validated .IP "6." 3 All segments must pass for the command to be allowed .PP \f[B]Examples:\f[R] .IP .EX \f[I]# Allow only npm and git commands.\f[R] export CLINE_COMMAND_PERMISSIONS=\(aq{\(dqallow\(dq: [\(dqnpm *\(dq, \(dqgit *\(dq]}\(aq \f[I]# Allow development commands but deny dangerous ones. Deny not strictly required here since allow is set.\f[R] export CLINE_COMMAND_PERMISSIONS=\(aq{\(dqallow\(dq: [\(dqnpm *\(dq, \(dqgit *\(dq, \(dqnode *\(dq], \(dqdeny\(dq: [\(dqrm \-rf *\(dq, \(dqsudo *\(dq]}\(aq \f[I]# Allow file operations with redirects\f[R] export CLINE_COMMAND_PERMISSIONS=\(aq{\(dqallow\(dq: [\(dqcat *\(dq, \(dqecho *\(dq], \(dqallowRedirects\(dq: true}\(aq .EE .SH CONFIGURATION FILES .IP .EX \(ti/.cline/ ├── data/ # Default configuration directory │ ├── globalState.json # Global settings and state │ ├── secrets.json # API keys and secrets (stored securely) │ ├── workspace/ # Workspace\-specific state │ └── tasks/ # Task history and conversation data └── log/ # Log files for debugging .EE .PP View logs with \f[CR]cline dev log\f[R]. .SH BUGS Report bugs at: \c .UR https://github.com/cline/cline/issues .UE \c .PP For real\-time help, join the Discord community at: \c .UR https://discord.gg/cline .UE \c .SH SEE ALSO Full documentation: \c .UR https://docs.cline.bot .UE \c .PP VS Code extension: \c .UR https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev .UE \c .SH AUTHORS Cline is developed by Cline Bot Inc.\ and the open source community. .SH COPYRIGHT Copyright © 2025 Cline Bot Inc.\ Licensed under the Apache License 2.0.