开源项目 GitHub Trending 2026-09-16T12:00 正文 ok 993 words

Cline:覆盖 IDE、终端与桌面的开源编程 Agent

英文标题:🔥 cline/cline

Cline 是一款开源编程 Agent,可作为 SDK、CLI、桌面应用、VS Code 扩展和 JetBrains 插件使用。它能够跨项目修改代码、执行终端命令、监控编译与测试结果,并通过计划模式、人工审批和检查点机制让开发者保持控制权。Cline 支持 Claude、OpenAI GPT、Gemini、OpenRouter、Ollama 以及任意 OpenAI 兼容 API,并可通过插件、MCP、多 Agent 协作和定时任务扩展能力。对于开发者和团队而言,它还可接入 Slack、Telegram、Discord 等通信平台,并以无交互模式集成到脚本和 CI/CD 流程中。
打开原文相关 6 · 机会 3
media4.9 KB

中文

Cline

面向 IDE、终端和桌面的开源编程 Agent。

在终端中运行 Cline。支持交互式聊天,也支持完全无头模式,用于 CI/CD 和脚本自动化。了解更多 适用于 macOS 和 Windows 的原生 Cline 应用。可在任意文件夹中运行 Agent 会话、安排例行任务,并管理模型、插件和 MCP 服务器。下载 macOS 和 Windows 版本
编辑器中的 AI 编程助手。可创建文件、运行命令、浏览网页,并在人工审批机制下使用工具。从 VS Marketplace 安装 在 IntelliJ IDEA、PyCharm、WebStorm、GoLand 及其他 JetBrains 产品中获得同样的 Cline 体验。从 JetBrains Marketplace 安装

使用驱动 CLI、桌面应用、VS Code 扩展和 JetBrains 插件的同一引擎,构建你自己的 AI Agent 和集成。支持自定义工具、多 Agent 团队、连接器、定时自动化等。文档



产品 描述 位置 更新日志
SDK Node.js 编程式 Agent API 和扩展导出。 sdk/ CHANGELOG.md
CLI 终端 UI、无头模式、Shell 命令和 CLI 专属流程。 apps/cli/ CHANGELOG.md
VS Code 扩展 Marketplace 扩展及扩展宿主集成。 /(正在迁移) CHANGELOG.md
桌面应用 原生 macOS 和 Windows 应用(Tauri shell、Bun sidecar、Next.js UI)。 apps/examples/desktop-app/ CHANGELOG.md
JetBrains 插件 与共享 Agent 核心通信的 JetBrains 托管客户端。 目前我们尚未开源 JetBrains 插件 -
文档站点 公开文档页面。 docs/ -

跨整个项目编辑代码

Cline 会读取你的项目结构、理解文件之间的关系,并在整个代码库中进行协调修改。它会在工作过程中监控 linter 和编译器错误,在你看到问题之前修复缺失导入、类型不匹配和语法错误等问题。在 VS Code 和 JetBrains 中,每一项编辑都会以 diff 形式呈现,你可以审阅、修改或回退。所有变更都会通过检查点追踪,因此你可以轻松撤销 Agent 的工作。

Cline 可直接在终端中执行命令,并实时监控输出。你可以安装软件包、运行构建脚本、执行测试、部署应用和管理数据库。对于开发服务器等长时间运行的进程,Cline 会在后台持续工作,并在新输出出现时作出响应,及时捕捉编译错误、测试失败和服务器崩溃。

可在 Plan 模式与 Act 模式之间切换。在 Plan 模式下,Cline 会探索你的代码库、提出澄清问题并制定策略。当你确认方案后,切换到 Act 模式,Cline 就会执行该计划。每一次文件编辑和终端命令都需要你的批准,因此你始终掌控实际发生的变更。你也可以开启自动批准,让 Cline 自主运行。

在 .clinerules 文件中定义项目专属规则,以指导 Cline 在你的代码库中的工作方式,包括编码标准、架构约定、部署流程和测试要求。CLI、VS Code 扩展和 JetBrains 插件都会自动读取这些规则。还可以使用 skills,让模型在需要时加载特定规则。

Cline 不受限于单一 AI 提供商。你可以使用最适合自身工作流的模型:

提供商 模型
Anthropic Claude Opus、Sonnet、Haiku
OpenAI GPT 系列模型
Google Gemini 系列模型
OpenRouter 来自任意提供商的 200 多种模型
Vercel AI Gateway 通过一个网关路由至多个提供商
AWS Bedrock Claude、Llama 等
Azure / GCP Vertex 所有托管模型
Cerebras / Groq 快速推理模型
Ollama / LM Studio 在本机运行本地模型
任意 OpenAI 兼容 API 自托管或第三方端点

使用插件或 MCP 服务器扩展

使用插件扩展 Cline 的能力。借助 SDK,可通过插件系统以编程方式注册工具和生命周期钩子,用于日志记录、审计、策略执行或增加特定领域能力。下面是一个简单的插件示例。

import { Agent, createTool } from "@cline/sdk"

const deployTool = createTool({
  name: "deploy",
  description: "Deploy the current branch to staging.",
  inputSchema: { type: "object", properties: { env: { type: "string" } }, required: ["env"] },
  execute: async (input) => {
    // your deployment logic
  },
})

const agent = new Agent({ tools: [deployTool], /* ... */ })

……或者使用 MCP 连接数据库、查询 API、管理云基础设施,并与外部系统交互。你可以使用社区构建的服务器,也可以让 Cline 按需创建自定义工具。在 CLI 中,使用 cline mcp 管理服务器。

协调多个 Agent 共同处理复杂任务。协调 Agent 会将工作拆分为子任务,并委派给专业 Agent;每个 Agent 都拥有各自的工具和上下文。团队状态会跨会话持续保存,因此你可以从上次中断的地方继续。

cline --team-name auth-sprint "Plan and implement user authentication with tests"

在 cron 定时计划中运行 Agent,以执行重复性自动化任务。例如,每日 PR 摘要、每周依赖项检查和代码库健康报告。定时计划会在重启后持续保留,并独立于任何终端会话运行。

cline schedule create "PR summary" \
  --cron "0 9 * * MON-FRI" \
  --prompt "List all open PRs and their review status" \
  --workspace /path/to/repo

连接 Slack、Telegram、Discord 等平台

可从任意消息平台与你的 Agent 对话,包括 Telegram、Slack、Discord、Google Chat、WhatsApp 和 Linear。每个对话线程都会映射到一个拥有完整上下文的 Agent 会话。你可以设置访问控制,限制可与你的 Agent 交互的人员。

# Connect to Telegram
cline connect telegram -k $BOT_TOKEN
# Connect to Slack through webhook
cline connect slack --bot-token $SLACK_TOKEN --signing-secret $SECRET --base-url $URL
# Connect to Slack using socket mode
cline connect slack --bot-token $SLACK_TOKEN --app-token $SLACK_APP_TOKEN

以零交互方式运行 Cline,用于脚本和自动化。可通过管道传入输入、获取 JSON 输出、串联命令,并集成到 CI/CD 流水线中。

cline "Run tests and fix any failures"
git diff origin/main | cline "Review these changes for issues"
cline --json "List all TODO comments" | jq -r 'select(.type == "agent_event" and .event.text) | .event.text'

请从贡献指南开始。加入我们的 Discord,前往 #contributors 频道与其他贡献者交流。也可查看我们的招聘页面,了解全职岗位信息。

Apache 2.0 © 2026 Cline Bot Inc.

English / 原文

Cline

The open source coding agent in your IDE, terminal, and desktop.

Run Cline in your terminal. Interactive chat or fully headless for CI/CD and scripting. Learn more

| Cline as a native app for macOS and Windows. Run agent sessions in any folder, schedule routines, and manage models, plugins, and MCP servers. Download for macOS and Windows

---|---
AI coding assistant in your editor. Create files, run commands, browse the web, and use tools with human-in-the-loop approval. Install from VS Marketplace

| The same Cline experience in IntelliJ IDEA, PyCharm, WebStorm, GoLand, and the rest of the JetBrains family. Install from JetBrains Marketplace

Build your own AI agents and integrations powered by the same engine that runs the CLI, desktop app, VS Code extension, and JetBrains plugin. Custom tools, multi-agent teams, connectors, scheduled automations, and more. Documentation



Product Description Location CHANGELOG
SDK Node.js programmatic agent API and extension exports. sdk/ CHANGELOG.md
CLI Terminal UI, headless mode, shell commands, and CLI-specific flows. apps/cli/ CHANGELOG.md
VS Code Extension The Marketplace extension and extension host integration. / (WIP migrating) CHANGELOG.md
Desktop App Native macOS and Windows app (Tauri shell, Bun sidecar, Next.js UI). apps/examples/desktop-app/ CHANGELOG.md
JetBrains Plugin JetBrains-hosted client that talks to the shared agent core. Currently we are not open-sourcing JetBrains plugins -
Docs site Public documentation pages. docs/ -

Edits Code Across Your Project

Cline reads your project structure, understands the relationships between files, and makes coordinated changes across your codebase. It monitors linter and compiler errors as it works, fixing issues like missing imports, type mismatches, and syntax errors before you even see them. In VS Code and JetBrains, every edit shows up as a diff you can review, modify, or revert. All changes are tracked with checkpoints, so you can easily undo the agent's work.

Cline executes commands directly in your terminal and watches the output in real time. Install packages, run build scripts, execute tests, deploy applications, manage databases. For long-running processes like dev servers, Cline continues working in the background and reacts to new output as it appears, catching compile errors, test failures, and server crashes as they happen.

Toggle between Plan mode and Act mode. In Plan mode, Cline explores your codebase, asks clarifying questions, and lays out a strategy. Once you're aligned, switch to Act mode and Cline executes the plan. Every file edit and terminal command requires your approval, so you stay in control of what actually changes. Or toggle auto-approve and let Cline run autonomously.

Define project-specific rules in .clinerules files that guide how Cline works in your codebase: coding standards, architecture conventions, deployment procedures, testing requirements. Rules are picked up automatically by the CLI, VS Code extension, and JetBrains plugin. Use skills to let the model load specific rules when needed.

Cline is not locked to a single AI provider. Use whichever model fits your workflow:

Provider Models
Anthropic Claude Opus, Sonnet, Haiku
OpenAI GPT series models
Google Gemini series models
OpenRouter 200+ models from any provider
Vercel AI Gateway Route to many providers through one gateway
AWS Bedrock Claude, Llama, and more
Azure / GCP Vertex All hosted models
Cerebras / Groq Fast inference models
Ollama / LM Studio Run local models on your machine
Any OpenAI-compatible API Self-hosted or third-party endpoints

Extend With Plugins or MCP Servers

Extend Cline's capabilities with plugins. Using the SDK, register tools and lifecycle hooks programmatically through the plugin system for logging, auditing, policy enforcement, or adding domain-specific capabilities. Simple plugin example below.

import { Agent, createTool } from "@cline/sdk"

const deployTool = createTool({
  name: "deploy",
  description: "Deploy the current branch to staging.",
  inputSchema: { type: "object", properties: { env: { type: "string" } }, required: ["env"] },
  execute: async (input) => {
    // your deployment logic
  },
})

const agent = new Agent({ tools: [deployTool], /* ... */ })

...or use MCPs to connect to databases, query APIs, manage cloud infrastructure, and interact with external systems. Use community-built servers or ask Cline to create custom tools on the fly. In the CLI, manage servers with cline mcp.

Coordinate multiple agents working together on complex tasks. A coordinator agent breaks the work into subtasks and delegates to specialist agents, each with their own tools and context. Team state persists across sessions so you can pick up where you left off.

cline --team-name auth-sprint "Plan and implement user authentication with tests"

Run agents on cron schedules for recurring automations. Daily PR summaries, weekly dependency checks, codebase health reports. Schedules persist across restarts and run independently of any terminal session.

cline schedule create "PR summary" \
  --cron "0 9 * * MON-FRI" \
  --prompt "List all open PRs and their review status" \
  --workspace /path/to/repo

Connect to Slack, Telegram, Discord, and More

Chat with your agent from any messaging platform: Telegram, Slack, Discord, Google Chat, WhatsApp, and Linear. Each conversation thread maps to an agent session with full context. Set up access control to restrict who can interact with your agent.

# Connect to Telegram
cline connect telegram -k $BOT_TOKEN
# Connect to Slack through webhook
cline connect slack --bot-token $SLACK_TOKEN --signing-secret $SECRET --base-url $URL
# Connect to Slack using socket mode
cline connect slack --bot-token $SLACK_TOKEN --app-token $SLACK_APP_TOKEN

Run Cline with zero interaction for scripting and automation. Pipe input, get JSON output, chain commands, integrate into CI/CD pipelines.

cline "Run tests and fix any failures"
git diff origin/main | cline "Review these changes for issues"
cline --json "List all TODO comments" | jq -r 'select(.type == "agent_event" and .event.text) | .event.text'

Start with the Contributing Guide. Join our Discord and head to the #contributors channel to connect with other contributors. Check our careers page for full-time roles.

Apache 2.0 © 2026 Cline Bot Inc.