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 runcline with no arguments, or with a prompt while stdin is a TTY.
- Real-time conversation with back-and-forth iteration
- File mentions with
@and fuzzy-search autocomplete - Slash commands (
/settings,/history,/models,/help) Tabto toggle Plan / Act mode;Shift+Tabto 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.
Mode detection reference
| Invocation | Mode | Reason |
|---|---|---|
cline | Interactive | No arguments, TTY connected |
cline "task" | Interactive | TTY connected |
cline -y "task" | Headless | --yolo flag |
cline --json "task" | Headless | --json flag |
cat file | cline "task" | Headless | stdin is piped |
cline "task" > out.txt | Headless | stdout is redirected |
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:| VS Code extension | Cline CLI | |
|---|---|---|
| Interface | Sidebar panel in VS Code | Terminal (TUI or plain text) |
| File context | Open editors, workspace | @file mentions, piped stdin |
| Automation | Manual | Headless mode, shell scripting |
| CI/CD use | Not suitable | First-class support |
| Editor integration | VS Code only | Any ACP-compatible editor |
| MCP servers | cline_mcp_settings.json | Same file, same format |
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:| Provider | Provider ID |
|---|---|
| Anthropic (Claude) | anthropic |
| OpenAI (GPT-4o, GPT-4) | openai-native |
| OpenAI Codex (ChatGPT subscription) | openai-codex |
| OpenRouter | openrouter |
| AWS Bedrock | bedrock |
| Google Gemini | gemini |
| X AI (Grok) | xai |
| Cerebras | cerebras |
| DeepSeek | deepseek |
| Moonshot (Kimi) | moonshot |
| Ollama (local) | ollama |
| LM Studio (local) | lmstudio |
| OpenAI-compatible | openai |
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
| Feature | Interactive mode | Headless mode |
|---|---|---|
| Conversational chat | Yes | No |
File mentions (@) | Yes | Yes (inline) |
Slash commands (/) | Yes | No |
| Settings panel | Yes | cline config |
| Plan / Act toggle | Yes (Tab) | -p / -a flags |
| Auto-approve | Yes (Shift+Tab) | -y flag |
| Session summary on exit | Yes | No |
| JSON output | No | --json flag |
| Piped stdin | No | Yes |
| MCP servers | Yes | Yes |
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.