To use Cline CLI, you install it with npm install -g cline, run cline auth to sign in or add a provider key, then run cline inside a project and describe the task. Unlike most coding CLIs, Cline approves its own tool calls by default, so pass --auto-approve false on a repository you care about.
This guide covers Cline CLI 3.0 as of November 2026 (version 3.0.74): install, sign-in, Plan and Act, approvals, headless runs with --json, sessions, models, rules, MCP and what it costs.
What Cline CLI is
Cline started as a VS Code extension and is one of the most used open coding agents. Cline CLI brings the same agent to the terminal. Version 3.0, released in May 2026, was a rewrite on Cline’s new SDK with a new terminal interface, so guides written for the 2.x CLI are out of date.
Cline is model-agnostic. You can use a Cline account with credits, a ClinePass subscription, or your own key for Anthropic, OpenAI, Gemini, OpenRouter, Bedrock, Vertex, DeepSeek, a local model through Ollama or LM Studio, and more than thirty other providers.
Step 1: install the CLI
npm install -g cline
That is the only official install method. Prebuilt binaries ship for macOS, Linux and Windows on both arm64 and x64; use Node 22 to be safe, since the docs and the package disagree on the minimum version. Update later with cline update. If you want the newest build, npm install -g cline@nightly installs the nightly channel.
Step 2: sign in or add a key
cline auth
This opens an interactive setup. cline auth cline signs in to a Cline account in the browser. To set a provider without prompts, for example on a server:
cline auth -p anthropic -k "$ANTHROPIC_API_KEY" -m claude-sonnet-5-5
Cline also reads keys from the environment (ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, CLINE_API_KEY and others). Saved credentials go to ~/.cline/data/settings/providers.json.
Step 3: work in the interactive view
cd my-project
cline
Describe the task in plain words, or start with one: cline -i "add tests for the price formatter". Useful keys and commands:
Tabswitches between Plan and Act. Plan mode reads and discusses but cannot edit files; Act mode, the default, makes the changes.cline -pstarts in Plan.Shift+Tabturns auto-approve on or off.@fileadds a file (or an image) to the message./modeland/settingschange the setup;/mcpmanages servers;/compactshortens a long conversation;/undoreverts the last change;/historyopens past sessions.Ctrl+Cstops the current turn; press it twice, orCtrl+D, to exit.
A good habit for bigger tasks: start in Plan, agree on the steps, then switch to Act.
Step 4: decide how much Cline may do on its own
This is the setting that surprises people most. In Cline CLI:
| Situation | What happens |
|---|---|
cline (interactive) | --auto-approve is on unless you turn it off |
cline --auto-approve false | Asks Approve tool …? [y/N] before each tool |
cline "task" (one-shot) or piped input | Runs in yolo mode |
cline -y | Yolo mode; Cline’s own help calls it dangerous outside a sandbox |
There is no allow or deny list for shell commands. To block a command, add a PreToolUse hook (Step 7). On a real repository, start with --auto-approve false or work on a clean branch so every change is easy to throw away.
Step 5: headless runs and CI
Cline runs without the interactive view when you pass --json, pipe something in, or redirect its output:
git diff | cline "review this diff for bugs"
cline --json "summarize the changes on this branch" | jq -r 'select(.type=="run_result") | .text'
--json prints one JSON event per line and ends with a run_result that holds the final text, the finish reason and the token usage. Other flags worth knowing: -c sets the working folder, --worktree runs in a git worktree, -t sets a timeout in seconds and --data-dir keeps state in an isolated folder.
In CI, install with npm, run cline auth with a key from the secrets store, then run the task. Remember that one-shot runs approve everything, so give the job only the permissions it needs.
Step 6: sessions and models
cline history lists past sessions in a picker where you can resume or delete them. To reopen one directly:
cline history --json --limit 10
cline --id <session-id>
Sessions live in ~/.cline/data/sessions/. cline history export <session-id> -o session.html saves one as a page.
To pick a model for one run, use -P for the provider and -m for the model; --thinking takes none, low, medium, high or xhigh. In the interactive view, use /model. With a Cline account and no model chosen, the default is Claude Sonnet 5.5 as of version 3.0.73.
Step 7: rules, hooks and MCP servers
Rules. Put project rules in .clinerules/ or .cline/rules/, and global ones in ~/.cline/rules. Cline also reads AGENTS.md at the project root, so a file you already keep for Codex or other agents works as is. Our guide to CLAUDE.md and AGENTS.md covers what to put in it.
Skills and hooks. Skills live in .cline/skills/ or .agents/skills/ and run as /skill-name; cline skill add <owner/repo> installs one. Hooks are executable scripts named after the event, such as .cline/hooks/PreToolUse.sh, and are the way to block risky commands.
MCP. Add servers from the command line:
cline mcp add memory --yes -- npx -y @modelcontextprotocol/server-memory
cline mcp add docs https://example.com/mcp --transport http --yes
They are saved under mcpServers in ~/.cline/data/settings/cline_mcp_settings.json. cline mcp opens a menu, and cline mcp remove <name> deletes one.
What Cline CLI costs (as of November 2026)
| Option | Price | Notes |
|---|---|---|
| Cline CLI | Free | The tool itself |
| Cline credits | Pay as you go | Bought on app.cline.bot; some free models with a small quota |
| ClinePass | $9.99/month | Higher limits on selected open models |
| Your own key | Your provider’s price | Anthropic, OpenAI, OpenRouter, local models and more |
| Enterprise | Custom | SSO, SLA, role-based access, central billing |
Check Cline’s pricing page before you decide.
Common pitfalls
- Auto-approve on by default. Turn it off with
--auto-approve falseuntil you trust the setup. - Following 2.x guides. The 3.0 rewrite changed commands and flags. When in doubt, run
cline --helpfor your version; a few flags, such as-y, are missing from the online reference. - Headless OAuth. OAuth providers never open a browser in headless runs. Run
cline auth <provider>once on that machine first. - Stuck background processes.
cline doctorchecks the setup, andcline doctor fixstops stale processes. .clineignoreis on its way out. Use aPreToolUsehook to keep Cline away from files.
Running Cline CLI next to other CLIs in AgentVera
If Cline is the only agent you use, its own interface may be all you need. It gets harder when Cline runs next to Claude Code, Codex or Gemini CLI on the same project. AgentVera is a desktop app that runs these CLIs side by side in real terminals, with your own installs and keys. Cline support works like this:
- One session per agent. AgentVera finds the session Cline creates through
cline history --jsonand reopens it withcline --id <id>on later launches, so the conversation survives an app restart. - Model and effort. The model you pick is passed with
--modeland the effort level with--thinking. - An account per agent. Under Settings → Accounts you can add Anthropic, OpenAI or OpenRouter keys; each Cline account gets its own providers file, and everything else stays shared.
- MCP and tokens. Servers from AgentVera’s MCP manager reach Cline through its MCP settings file, and AgentVera reads Cline’s token usage for token budgets.
- Panes and review. Run Cline in the workspace grid next to other agents and check their changes with code review.
The free plan runs 2 agents at once and includes MCP, Git, Docker, SSH, code review and token savings. Pro is $9.99 a month and has no agent limit; if you have never had a trial, your first sign-in to the app turns on Pro for 7 days with no card. To try it, download AgentVera.
Wrapping up
Cline CLI takes three commands to start: npm install -g cline, cline auth and cline. The choices that matter come right after: turn auto-approve off on real work, plan before you act on bigger tasks, keep the project’s rules in AGENTS.md or .clinerules/, and give one-shot CI runs only the access they need.
Sources: Cline CLI reference, CLI overview, authorizing, Cline rules, MCP, CLI changelog.