{
  "name": "Cline CLI (npm package `cline`, command `cline`)",
  "repo": "https://github.com/cline/cline",
  "docs": "https://docs.cline.bot/usage/cli-overview (the brief's https://docs.cline.bot/cline-cli/overview answers HTTP 308 with location /usage/cli-overview, checked 2026-10-27)",
  "headless": {
    "finding": "One prompt runs non-interactively as `cline [options] \"<prompt>\"`. Headless mode starts when --json is given, stdin is piped, or stdout is redirected. A prompt file or other context can be piped on stdin (`cat file | cline \"task\"`, `echo \"prompt\" | cline`). There is no dedicated prompt-file flag. The working directory is set with `-c, --cwd <path>`. Other relevant flags: `--json` (NDJSON events on stdout), `-t, --timeout <seconds>` (default 0, meaning no timeout), `--retries <count>` (default 3), `-P/--provider`, `-m/--model`, `-k/--key`, `--config`, `--data-dir`, `--worktree`. Approval prompts are auto-answered by default: `--auto-approve <boolean>` defaults to true (except in ACP mode, where it defaults to false). `-y, --yolo` auto-approves a limited tool set for unsupervised runs and turns off subagents and teams. Exit codes, read from source and not documented on the docs site: 0 when the run completes; 1 when finishReason is not `completed`, on a thrown error, or on a timeout. In headless mode the CLI does not try browser OAuth.",
    "quote": "Headless is triggered when using flags like `--json`, when stdin is piped, or when output is redirected. | `-c, --cwd <path>` | Working directory | `--auto-approve <boolean>` | Set tool auto-approval for all tools (default: `true`; ... | Source: `writeErr(`run timed out after ${config.timeoutSeconds}s`); process.exitCode = 1;` ... `if (result.finishReason !== \"completed\") { ... process.exitCode = 1;` ... `process.exitCode = 0;`",
    "url": "https://docs.cline.bot/usage/cli-overview ; https://docs.cline.bot/cli/cli-reference ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/runtime/run-agent.ts#L382-L423 ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/commands/program.ts#L26-L37 ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/main.ts#L975-L983",
    "third_party": false
  },
  "confinement": {
    "finding": "Confinement is weak, and there is no OS-level sandbox. (a) Shell commands: the CLI has no command allow or deny list. The docs say to block commands with a PreToolUse hook that cancels `run_commands` calls (hooks dir: `--hooks-dir`, `~/.cline/hooks`, `.cline/hooks`). A hook cancel ends the CLI run. (b) Approval: the CLI builds one wildcard tool policy, `\"*\": {autoApprove: <--auto-approve value>}`, so in the CLI approval is all-or-nothing. The SDK supports per-tool `toolPolicies` with `autoApprove` true/false and `enabled: false`. In the CLI, individual tools (for example `spawn_agent`, `teams`) can be turned off on the `/settings` Tools tab. The 'safe vs approval-required' split for commands is decided by the model (`requires_approval`), not by a fixed allowlist. (c) File writes: the extension's Auto Approve settings distinguish workspace edits from edits outside the workspace. No CLI-level path confinement was found apart from the PreToolUse `.clineignore` guard hook. (d) Plan mode (`-p`) has no file-edit tools and refuses some mutating shell commands, but the docs say other commands can still write files. (e) Network: no switch to turn network off was found. The networking page covers only proxies and firewalls. (f) The CLI's 'sandbox mode' (`--data-dir` or `CLINE_SANDBOX=1`) only moves Cline's own state, settings and DB to a separate directory. It is not process isolation. `--worktree` runs the task in a detached git worktree. Docker, seatbelt, gVisor, bubblewrap or landlock are not used: none of these appear in the CLI or core sources, and Docker appears only in `cline doctor` container detection. The `--yolo` help text says to use it 'only in sandboxed environments', which leaves isolation to the caller.",
    "quote": "The CLI has no allow or deny list for shell commands. To block commands, use a `PreToolUse` hook that cancels `run_commands` calls you don't allow. | Source: `const toolPolicies: Record<string, ToolPolicy> = { \"*\": { autoApprove: effectiveToolAutoApprove, }, };` | `// Sandbox mode is enabled implicitly whenever --data-dir is provided, or // when CLINE_SANDBOX=1 is set in the environment` | Cline does not use a fixed allowlist. The model marks each command with a `requires_approval` flag based on the command and arguments.",
    "url": "https://docs.cline.bot/cli/cli-reference ; https://docs.cline.bot/usage/cli-overview ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/main.ts#L891-L895 ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/main.ts#L859-L868 ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/utils/helpers.ts#L583-L603 ; https://docs.cline.bot/features/auto-approve ; https://docs.cline.bot/customization/clineignore ; https://docs.cline.bot/features/subagents ; https://docs.cline.bot/sdk/guides/permission-handling ; https://docs.cline.bot/troubleshooting/networking-and-proxies",
    "third_party": false
  },
  "token_reporting": {
    "finding": "Yes. With `--json`, the CLI writes NDJSON to stdout. Lines include `agent_event` (whose event types include `usage`) and a final `run_result` line with `finishReason`, `iterations`, `usage`, `durationMs`, `model` and `text`. In source, `run_result` also carries `aggregateUsage` when it is present. The usage object (SDK `AgentUsage`) has `inputTokens`, `outputTokens`, `cacheReadTokens`, `cacheWriteTokens`, optional `reasoningTokenCount` and optional `totalCost`. In text mode with `-v`, the CLI prints a stats line such as `[Xs | N in, N out, N cache read, N cache write | $X est. cost | N iterations]`. The cost is shown only for some providers. Errors and timeouts go to stderr as JSON `{\"type\":\"error\",\"message\":...}`. Sessions are stored under `~/.cline/data/sessions/` and indexed in `db/sessions.db`. `cline history --json` lists sessions (usage fields in that listing were not checked). The subagents page says subagent token use and cost are added to the session total.",
    "quote": "| `run_result` | The run finished: `finishReason`, `iterations`, `usage`, `durationMs`, `model` and the final `text`. | Source: `inputTokens: number; outputTokens: number; cacheReadTokens: number; cacheWriteTokens: number; /** Provider-reported hidden reasoning tokens, when available. */ reasoningTokenCount?: number;` ... `totalCost?: number;`",
    "url": "https://docs.cline.bot/cli/cli-reference ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/sdk/packages/shared/src/agent.ts#L105-L123 ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/runtime/run-agent.ts#L92-L127 ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/runtime/run-agent.ts#L370-L379 ; https://docs.cline.bot/features/subagents",
    "third_party": false
  },
  "parallelism": {
    "finding": "Yes, in several forms. (1) Subagents: the model uses the `spawn_agent` tool. Several subagents can run at once, each with its own context window, and a subagent can start subagents of its own. Approving `spawn_agent` approves everything the subagent then does. Subagents are on by default in Act and Plan modes and can be turned off with the `spawn_agent` tool toggle. (2) Agent teams: a prompt starting with `/team` gets a coordinator with teammates and a shared task board. Team state lives in `~/.cline/data/db/teams.db`. Teams are not available with `--yolo`. (3) Background or many sessions: `-z/--zen` starts a session in the background hub daemon, `--worktree` isolates a run in a git worktree, `--data-dir` isolates state per run, and `cline schedule` runs cron agents. (4) Cline Kanban, a research preview, runs multiple agents in parallel in isolated git worktrees. In `--yolo` mode the source turns off spawn_agent and teams.",
    "quote": "Each subagent gets its own prompt and context window, does the work, and returns a report to the main agent. This keeps the main agent's context clean, and several subagents can run at the same time. | Teams are available in Act and Plan modes, and not with `--yolo`. | Source: `enableSpawnAgent: !isYoloMode, enableAgentTeams: !isYoloMode,`",
    "url": "https://docs.cline.bot/features/subagents ; https://docs.cline.bot/cli/agent-teams ; https://docs.cline.bot/cli/cli-reference ; https://docs.cline.bot/usage/kanban ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/main.ts#L1091-L1092",
    "third_party": false
  },
  "providers": {
    "finding": "Supported providers: Cline (usage-billing, the default with `-P cline`), ClinePass, Anthropic, Claude Code, OpenAI, OpenAI Codex, OpenAI-compatible, OpenRouter, Google Gemini, Vertex, AWS Bedrock (API key, IAM, SSO profile), DeepSeek, MiniMax, Qwen, Z AI, Poolside, and a list of 30+ others (Groq, Mistral, xAI, Together, Cerebras, Hugging Face, Vercel AI Gateway, Requesty, SambaNova, Nebius, Moonshot and more). Local backends: Ollama, LM Studio, Atomic Chat. Provider IDs found in the SDK source include cline, openai, openai-compatible, anthropic, google, vertex, bedrock, mistral, claude-code, openai-codex, opencode, dify, ollama and sap-ai-core. Non-interactive setup: `cline auth -p <id> -k <key> -m <model>`, or per run with `-P/-k/-m`.",
    "quote": "Run Cline with local models using Ollama, LM Studio or Atomic Chat. | cline auth -p anthropic -k \"$ANTHROPIC_API_KEY\" -m claude-sonnet-5-5 | Reference list for additional supported providers with shared configuration flow.",
    "url": "https://docs.cline.bot/llms.txt ; https://docs.cline.bot/running-models-locally/overview ; https://docs.cline.bot/provider-config/other-30-plus-providers ; https://docs.cline.bot/cli/cli-reference ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/sdk/packages/llms/src/providers/builtin-types.ts#L16-L29",
    "third_party": false
  },
  "subscription_login": {
    "finding": "Yes. `cline auth <provider>` supports OAuth login for the providers `cline` (Cline account sign-in), `openai-codex` (ChatGPT/OpenAI subscription) and `oca`. The docs describe a 'Claude Code' provider that uses a Claude Max/Pro subscription through an installed and authenticated Claude CLI, and `claude-code` is a built-in SDK provider ID. ClinePass, Cline's own $9.99/month plan, is a separate provider. In the CLI it is selected interactively ('CLI: Go to `/settings` and select **ClinePass** as your provider', https://docs.cline.bot/getting-started/clinepass). Whether that provider works in the CLI was not tested. No GitHub Copilot or Gemini subscription login was found. OAuth login needs an interactive terminal. Headless runs do not open browser OAuth, but they can use OAuth tokens saved by an earlier `cline auth`. So a worker must log in once interactively, or point `--config`/`--data-dir` at a directory where it already did.",
    "quote": "`provider \"${providerId}\" does not support OAuth login (supported: cline, openai-codex, oca)` | `// In headless mode (yolo / json / piped stdin without --tui), // don't attempt browser-based OAuth. Authentication may still resolve at // runtime from environment-based provider auth or persisted OAuth tokens.` | **[OpenAI Codex (Subscription OAuth)](#openai-codex-oauth):** Sign in with OpenAI account, using OAI subscriptions (no key management). | **[Claude Code (subscription-based)](#claude-code-subscription):** Use your Claude Max/Pro subscription through the Claude CLI.",
    "url": "https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/commands/auth.ts#L425-L436 ; https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/main.ts#L975-L983 ; https://docs.cline.bot/provider-config/openai ; https://docs.cline.bot/provider-config/anthropic ; https://docs.cline.bot/getting-started/authorizing-with-cline ; https://docs.cline.bot/getting-started/clinepass",
    "third_party": false
  },
  "license": {
    "finding": "Apache-2.0. The LICENSE file is the Apache License 2.0, the GitHub API reports spdx_id Apache-2.0, and the npm package `cline` declares license Apache-2.0.",
    "quote": "Apache License\n                           Version 2.0, January 2004",
    "url": "https://raw.githubusercontent.com/cline/cline/main/LICENSE ; https://api.github.com/repos/cline/cline ; https://registry.npmjs.org/cline",
    "third_party": false
  },
  "latest_stable": {
    "finding": "The CLI's newest stable release is tag `cli-v3.0.74` ('CLI v3.0.74'), published 2026-10-26T04:03:28Z (prerelease=false). On npm, `cline` dist-tag latest is 3.0.74, published 2026-10-26T04:04:22.234Z, from repository directory apps/cli. The monorepo's newest stable tag overall is `v4.1.26` (the IDE extension), published 2026-10-26T09:06:50Z. The repo also publishes `sdk/sdk/v*` and `desktop-v*` tags.",
    "quote": "\"tag_name\": \"cli-v3.0.74\", \"name\": \"CLI v3.0.74\", \"prerelease\": false, \"published_at\": \"2026-10-26T04:03:28Z\" | npm dist-tags { latest: '3.0.74', nightly: '3.0.73-nightly.1792632285' }",
    "url": "https://api.github.com/repos/cline/cline/releases?per_page=100 ; https://github.com/cline/cline/releases/tag/cli-v3.0.74 ; https://registry.npmjs.org/cline",
    "third_party": false
  },
  "latest_prerelease": {
    "finding": "Across all 468 releases from the GitHub releases API (pages 1-5 at per_page=100), the newest prerelease is `desktop-v0.0.23-beta.1`, published 2026-09-03T01:46:33Z (Cline Desktop, not the CLI). The newest prerelease whose tag starts with `cli-` is `cli-build-024bb65`, published 2026-02-12T01:27:12Z. CLI prereleases now ship on npm as the `nightly` dist-tag: 3.0.73-nightly.1792632285 (its publish date was not taken).",
    "quote": "desktop-v0.0.23-beta.1 prerelease=true published_at 2026-09-03T01:46:33Z | cli-build-024bb65 prerelease=true published_at 2026-02-12T01:27:12Z",
    "url": "https://api.github.com/repos/cline/cline/releases?per_page=100 ; https://api.github.com/repos/cline/cline/releases?per_page=100&page=3 ; https://github.com/cline/cline/releases/tag/desktop-v0.0.23-beta.1 ; https://registry.npmjs.org/cline",
    "third_party": false
  },
  "last_commit": {
    "finding": "The default branch is `main`. Its last commit is c35b729049c7bb26c340df63ea9235c40b32dd29, committed 2026-10-26T15:02:16Z, as of the query on 2026-10-27. The repo's pushed_at is 2026-10-27T04:07:02Z.",
    "quote": "\"sha\": \"c35b729049c7bb26c340df63ea9235c40b32dd29\" ... \"date\": \"2026-10-26T15:02:16Z\" ... \"message\": \"fix(desktop): handle update menu actions once on macOS (#14875) (#15296)\"",
    "url": "https://api.github.com/repos/cline/cline/commits?per_page=1",
    "third_party": false
  },
  "fork_of": {
    "finding": "Not a fork. The GitHub API reports fork=false for cline/cline. No statement that it derives from another coding agent was found in the pages checked.",
    "quote": "\"fork\": false",
    "url": "https://api.github.com/repos/cline/cline",
    "third_party": false
  },
  "maintenance": {
    "finding": "Actively maintained and not archived. The GitHub API reports archived=false. CLI releases came out roughly weekly in October 2026 (cli-v3.0.68 on 2026-10-02, then cli-v3.0.69 through cli-v3.0.74 on 2026-10-26). Note: the docs mark Kanban as a research preview and `.clineignore` as soon to be deprecated.",
    "quote": "\"archived\": false | > **`.clineignore` will be deprecated soon.**",
    "url": "https://api.github.com/repos/cline/cline ; https://api.github.com/repos/cline/cline/releases?per_page=100 ; https://docs.cline.bot/customization/clineignore",
    "third_party": false
  },
  "gaps": [
    "Exit codes are not documented on the docs site (checked https://docs.cline.bot/cli/cli-reference and https://docs.cline.bot/usage/cli-overview). The finding above comes from source (apps/cli/src/runtime/run-agent.ts). An externally aborted run (not a timeout) emits run_aborted and, in source, leaves exitCode at its earlier value of 0. This was not confirmed by running the CLI.",
    "No prompt-file flag (such as --file) was found in the CLI reference. Prompts come as a positional argument, and context can be piped on stdin.",
    "No built-in network off switch, and no OS sandbox (Docker, seatbelt, gVisor, bubblewrap, landlock) for the CLI. Checked https://docs.cline.bot/cli/cli-reference, https://docs.cline.bot/features/auto-approve, https://docs.cline.bot/troubleshooting/networking-and-proxies, and a grep of apps/cli/src and sdk/packages/core/src at commit c35b729. 'Sandbox mode' (--data-dir / CLINE_SANDBOX) only isolates state.",
    "No per-command or per-tool allow/deny list exposed as CLI flags. The per-tool `toolPolicies` (enabled/autoApprove) exist in the SDK (https://docs.cline.bot/sdk/guides/permission-handling), but the CLI sets a single '*' policy. Per-tool on/off in the CLI is through the interactive /settings Tools tab. Whether that maps to a documented settings-file key was not established.",
    "Whether the Claude Code (Max/Pro subscription) provider works in the headless CLI was not established. The docs page https://docs.cline.bot/provider-config/anthropic describes setup in 'Cline settings'.",
    "GitHub Copilot and Gemini subscription logins: not found (checked https://docs.cline.bot/llms.txt provider list, the auth.ts OAuth provider list, and https://docs.cline.bot/getting-started/authorizing-with-cline).",
    "Whether `cline history --json` includes token or cost fields was not checked. The publish date of the npm nightly 3.0.73-nightly.1792632285 was not taken.",
    "The task's docs URL https://docs.cline.bot/cline-cli/overview redirects to https://docs.cline.bot/usage/cli-overview. The docs site's own changelog page was not consulted. Release data came from the GitHub releases API."
  ],
  "sources": [
    "https://github.com/cline/cline",
    "https://docs.cline.bot/cline-cli/overview",
    "https://docs.cline.bot/usage/cli-overview",
    "https://docs.cline.bot/cli/cli-reference",
    "https://docs.cline.bot/llms.txt",
    "https://docs.cline.bot/features/auto-approve",
    "https://docs.cline.bot/features/subagents",
    "https://docs.cline.bot/cli/agent-teams",
    "https://docs.cline.bot/usage/kanban",
    "https://docs.cline.bot/customization/clineignore",
    "https://docs.cline.bot/troubleshooting/networking-and-proxies",
    "https://docs.cline.bot/sdk/guides/permission-handling",
    "https://docs.cline.bot/provider-config/anthropic",
    "https://docs.cline.bot/provider-config/openai",
    "https://docs.cline.bot/provider-config/other-30-plus-providers",
    "https://docs.cline.bot/running-models-locally/overview",
    "https://docs.cline.bot/getting-started/authorizing-with-cline",
    "https://docs.cline.bot/getting-started/clinepass",
    "https://raw.githubusercontent.com/cline/cline/main/LICENSE",
    "https://api.github.com/repos/cline/cline",
    "https://api.github.com/repos/cline/cline/releases?per_page=100",
    "https://api.github.com/repos/cline/cline/releases?per_page=100&page=3",
    "https://api.github.com/repos/cline/cline/commits?per_page=1",
    "https://github.com/cline/cline/releases/tag/cli-v3.0.74",
    "https://github.com/cline/cline/releases/tag/desktop-v0.0.23-beta.1",
    "https://registry.npmjs.org/cline",
    "https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/runtime/run-agent.ts",
    "https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/commands/program.ts",
    "https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/main.ts",
    "https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/utils/helpers.ts",
    "https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/apps/cli/src/commands/auth.ts",
    "https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/sdk/packages/shared/src/agent.ts",
    "https://github.com/cline/cline/blob/c35b729049c7bb26c340df63ea9235c40b32dd29/sdk/packages/llms/src/providers/builtin-types.ts"
  ]
}
