Cline CLIの使い方:npm インストール、cline auth、最初のリポジトリ作業
Cline CLI を入れ、cline auth で認証し、リポジトリで最初の diff 可能な Agent タスク。
The first hour with Cline CLI in the terminal usually breaks on Node.js version, a missing cline on PATH, or skipping cline auth at app.cline.bot. Install from official docs, authenticate from your repo folder, then finish one reviewable task.
The query is Cline CLI のインストールと使い方. This page follows docs.cline.bot CLI setup: npm install -g cline, cline auth, and cline "your task". The VS Code extension is a separate UI path; here we stay in the terminal. To walk a diff on a short call, open a room on wbmeet; see how to create and join a room.
Who Cline CLI is for
Cline is an autonomous coding agent in the editor sidebar or terminal: it maps the repo, searches files, proposes diffs, and runs commands you approve step by step. The CLI path targets scripts and terminal-only workflows. Official Quick Start requires Node.js 20+ (22 recommended). Sign up only at app.cline.bot, or bring your own API keys for Anthropic, OpenAI, Gemini, and other supported providers—no shared or stolen accounts.
Install Cline CLI with npm
- 1
Prepare Node.js
Check
node -vis 20 or higher (22 recommended). Use nvm or official installers on macOS/Linux; use the Node installer or WSL on Windows. - 2
Global install
Run
npm install -g cline. Open a new terminal and runcline --helporcline --versionper current CLI output. Ifcommand not found, add npm’s global bin directory to PATH. - 3
CLI vs VS Code extension
The Marketplace Cline extension is the in-editor UI. The same brand ships a
clinebinary for terminal work without opening VS Code.
cline auth and model access
- 1
Run cline auth
Execute
cline authand complete sign-up or login at app.cline.bot in the browser. Return to the terminal when the flow succeeds. - 2
Bring your own API key (optional)
Instead of Cline credits, configure keys from Anthropic, OpenAI, Google Gemini, or other supported vendors in Cline settings. Store secrets in env vars or local config—never in Git.
- 3
Verify connectivity
Send a short prompt or
cline "reply OK if connected". Free vs paid models are labeled in the account dashboard and model picker.
First reviewable task in your repo
- 1
cd to the project root
Work in a Git repo you own; run
git statusfirst. Cline scans from the current working directory—on large trees, name one or two files in hour one. - 2
Interactive or one-shot
Interactive:
cline. One-shot:cline "read the entry under src and list public exports". Naming paths likesrc/main.tsin the prompt narrows context like an @ file reference. - 3
Land a diff-friendly change
Follow with a concrete ask: add a unit test for one untested helper or fix one typo in README—show the diff before applying. Approve tool calls carefully; read
git diffbefore commit.
# First hour · Cline CLI · 2026-10-09
node -v # 20+
npm install -g cline
cline auth
cd /path/to/your/repo
cline "Summarize src/index.ts exports; add one unit test; show diff first"CLI vs extension and pitfalls
| Path | Good for | First-hour note |
|---|---|---|
| npm global cline | Terminal / automation trials | PATH includes npm global bin |
| cline auth | Official Cline account | Sign up only at app.cline.bot |
| BYOK | Existing vendor billing | Keys stay out of Git |
| VS Code extension | Visual diffs | Can coexist with CLI |
cline not found
Check npm global path and open a new terminal. Use npm prefix -g to locate bin.
Auth browser stuck
Copy the OAuth URL from the terminal; check proxy and default browser.
First task too large
Split steps; start read-only; insist on diff-first.
Official path: Node 20+ →
npm install -g cline→cline auth→clineor a quoted task in your repo → review diff. Trust docs.cline.bot for your installed version.
- Vs Gemini CLI / Claude Code
- Different install and auth commands; you can keep several agents. See our Gemini CLI and Claude Code notes.
- Cline account required?
- Official OAuth is the fast path; BYOK routes billing to your vendor.
- Not a meeting-product guide
- Only Cline CLI’s first hour. Short call: wbmeet.
Questions worth checking
Does Cline CLI work on Windows?
Install Node 20+ and npm global cline. Platform support may evolve—check docs.cline.bot for the current CLI preview notes.
Is cline auth the same as extension Sign Up?
Both use the app.cline.bot account system; CLI uses cline auth, the extension uses the sidebar Sign Up button.
How do I limit files in a prompt?
Put relative paths in the task string (e.g. src/foo.ts). Cline uses search and read tools; start with one or two key files.
Will it run shell commands automatically?
Cline typically asks you to approve commands and diffs; in hour one approve only read-only or small writes.