安装前先检查
macOS/Linux 用户通常最顺;Windows 用户建议优先使用 WSL 或官方 PowerShell 安装方式。Node.js、npm、Python、Git、Shell 权限和 API Key 是最常见的失败点。
官方 CLI 安装命令
Claude Code Anthropic 官方
适合 Claude 用户和终端 Agent 工作流。需要 Claude 账号、套餐或 Anthropic API 使用条件。
# macOS / Linux / WSL
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
OpenAI Codex CLI OpenAI 官方
适合 ChatGPT/Codex 用户和代码 Agent 任务。可用官方安装脚本、npm 或 Homebrew。
# 官方安装脚本
curl -fsSL https://chatgpt.com/codex/install.sh | sh
# npm
npm install -g @openai/codex
Google Gemini CLI Google 官方
适合 Gemini 用户和 Google 生态。需要 Node.js/npm,登录 Google 账号或配置 Gemini API Key。
npm install -g @google/gemini-cli
gemini
Qwen Code Qwen 官方
适合通义千问 / 阿里云百炼生态。通常需要 Qwen 或百炼 API Key。
# Linux / macOS 官方安装脚本
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
Aider 第三方开源
适合命令行 + Git 工作流,支持多家模型 API。
pipx install aider-chat
aider
Cline CLI 第三方开源
适合自配 Provider、OpenAI-compatible endpoint 或团队统一接入地址。
npm i -g cline
图形化 Code 工具安装
| 工具 | 安装方式 | 需要条件 | 适合谁 |
|---|---|---|---|
| Cursor | 访问 cursor.com 下载 macOS / Windows / Linux 客户端 | Cursor 账号;可使用官方订阅或部分自带模型配置 | 想直接替代 VS Code 的用户 |
| GitHub Copilot | 在 VS Code / JetBrains 插件市场安装 GitHub Copilot | GitHub 账号和 Copilot 订阅/企业授权 | GitHub 用户、团队代码补全 |
| JetBrains AI Assistant | 在 JetBrains IDE 内启用或安装 AI Assistant | JetBrains 账号和可用订阅 | IntelliJ、PyCharm、WebStorm 用户 |
| Cline | 在 VS Code Extensions 搜索 Cline 安装 | 配置 Claude/OpenAI/Gemini/DeepSeek 或 OpenAI-compatible endpoint | 想让 Agent 读写项目文件的人 |
| Roo Code | 在 VS Code Extensions 搜索 Roo Code 安装 | 配置模型 Provider、API Key 和模式 | 需要多模式 Agent 的用户 |
| Continue | 安装 VS Code 或 JetBrains Continue 插件 | 配置模型、embedding 和代码库索引 | 想接本地模型或自定义上下文的人 |
安装条件对照表
| 工具 | 系统 | 运行环境 | 账号/API 条件 | 最常见问题 |
|---|---|---|---|---|
| Claude Code | macOS / Linux / WSL / Windows | Shell 或 PowerShell | Claude / Anthropic | 账号权限、网络、终端权限 |
| Codex CLI | macOS / Linux | npm 或安装脚本 | OpenAI / ChatGPT | 登录、模型额度、Node/npm |
| Gemini CLI | macOS / Linux / Windows | Node.js / npm | Google 账号或 Gemini API Key | Google 登录、API Key、Node 版本 |
| Qwen Code | macOS / Linux | 官方脚本或 Node.js | Qwen / 百炼 Key | Key 配置、Node 版本、网络 |
| Aider | 跨平台 | Python / pipx | 多模型 API Key | Python 版本、Key 环境变量 |
| Cline CLI | 跨平台 | Node.js / npm | Provider API Key | endpoint、模型名、额度 |