Skip to main content
Cline CLI brings the full power of the Cline coding agent to your terminal. It’s the same AI that powers the VS Code extension — capable of reading and editing files, running shell commands, using a browser, and calling MCP tools — exposed as a command-line tool. The CLI runs on macOS, Linux, and Windows and supports every AI provider available in the VS Code extension.
Ready to get started? See Installation to install Cline CLI and configure your provider in a few minutes.

Two modes of operation

Cline CLI automatically selects the right mode based on how you invoke it.

Interactive mode

Launch cline to open a rich terminal UI. Chat with the agent, review plans, approve actions, and iterate — all without leaving your terminal.

Headless mode

Run cline -y "task" to let Cline work autonomously. Pipe input and output, get JSON results, and integrate with CI/CD pipelines and shell scripts.

Interactive mode

Interactive mode is for hands-on development sessions. It provides a full terminal UI with streaming output, keyboard shortcuts, and a conversational interface. Activates when: you run cline with no arguments, or with a prompt while stdin is a TTY.
Key capabilities:
  • Real-time conversation with back-and-forth iteration
  • File mentions with @ and fuzzy-search autocomplete
  • Slash commands (/settings, /history, /models, /help)
  • Tab to toggle Plan / Act mode; Shift+Tab to enable auto-approve
  • Session summary on exit showing files modified, commands run, and token usage
  • Settings panel for configuring providers, models, and auto-approve rules

Headless mode

Headless mode is for automation, scripting, and CI/CD pipelines where no human is present. Cline runs the task, writes clean text or JSON output, and exits. Activates when: the -y/--yolo flag is set, --json is passed, stdin is piped, or stdout is redirected.
The -y/--yolo flag gives Cline full autonomy — it approves all file writes and command executions without prompting. Always run on a clean git branch so you can revert if needed.

Mode detection reference

How it differs from the VS Code extension

The CLI and the VS Code extension share the same underlying agent — same models, same tools, same MCP server support, same rules and workflow files. The differences are in the interface:

What you can do with Cline CLI

Automated code maintenance

CI/CD integration

Shell pipelines

Supported providers

Cline CLI supports all providers available in the VS Code extension: Run cline auth to configure your provider interactively, or use flags for scripted setup:

MCP server support

Cline CLI supports MCP (Model Context Protocol) servers — the same extensibility system used in the VS Code extension. MCP servers give Cline access to external tools and data sources such as databases, APIs, and browser automation. Configure MCP servers in ~/.cline/data/settings/cline_mcp_settings.json, or add them from the CLI:

Features at a glance

Next steps

Installation

Install Cline CLI and authenticate with your preferred provider.

Interactive mode

Master the TUI with keyboard shortcuts and slash commands.

Headless mode

Run Cline autonomously in scripts, CI/CD, and automated workflows.

CLI reference

Complete documentation for all commands, flags, and options.