Invite a friend, get 1 month of Pro freeHow it works

How to use Cline CLI: a step-by-step guide to Cline in the terminal

How to use Cline CLI: install with npm, sign in or bring your own key, switch Plan and Act, run headless with --json, resume sessions and add rules and MCP.

Solviera Teknoloji 7 min read

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:

  • Tab switches between Plan and Act. Plan mode reads and discusses but cannot edit files; Act mode, the default, makes the changes. cline -p starts in Plan.
  • Shift+Tab turns auto-approve on or off.
  • @file adds a file (or an image) to the message.
  • /model and /settings change the setup; /mcp manages servers; /compact shortens a long conversation; /undo reverts the last change; /history opens past sessions.
  • Ctrl+C stops the current turn; press it twice, or Ctrl+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:

SituationWhat happens
cline (interactive)--auto-approve is on unless you turn it off
cline --auto-approve falseAsks Approve tool …? [y/N] before each tool
cline "task" (one-shot) or piped inputRuns in yolo mode
cline -yYolo 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)

OptionPriceNotes
Cline CLIFreeThe tool itself
Cline creditsPay as you goBought on app.cline.bot; some free models with a small quota
ClinePass$9.99/monthHigher limits on selected open models
Your own keyYour provider’s priceAnthropic, OpenAI, OpenRouter, local models and more
EnterpriseCustomSSO, 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 false until you trust the setup.
  • Following 2.x guides. The 3.0 rewrite changed commands and flags. When in doubt, run cline --help for 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 doctor checks the setup, and cline doctor fix stops stale processes.
  • .clineignore is on its way out. Use a PreToolUse hook 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 --json and reopens it with cline --id <id> on later launches, so the conversation survives an app restart.
  • Model and effort. The model you pick is passed with --model and 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.

Questions

Is Cline CLI free?

The CLI itself costs nothing. You pay for the model: Cline credits bought on app.cline.bot, a ClinePass subscription ($9.99 a month as of November 2026, for selected open models), or your own API key from Anthropic, OpenAI, OpenRouter and many other providers. Some free models come with a small quota.

Does Cline CLI ask before it edits files?

Not by default. --auto-approve defaults to true, and a one-shot run such as cline "task" runs in yolo mode. Start with --auto-approve false to get a yes/no prompt for each tool, or toggle auto-approve with Shift+Tab in the interactive view.

How do I resume a Cline CLI session?

Run cline history to pick a past session from a list, or cline --id <session-id> to reopen one directly. cline history --json lists sessions with their ids, which is handy in scripts.

Does Cline CLI read AGENTS.md?

Yes. Besides its own rules folders (.clinerules/ or .cline/rules/ in the project, ~/.cline/rules globally), Cline reads AGENTS.md at the project root, and also .cursorrules and .windsurfrules.

Can I use my Claude Code or ChatGPT subscription with Cline CLI?

Cline lists a Claude Code provider and a ChatGPT (openai-codex) sign-in among its providers. Check the provider’s own terms before you use a subscription through another tool.

Bring your agents to one desk.

Download AgentVera for free; your installed CLIs are ready to go.

More posts