在哪里运行 Claude Code
根据您喜欢的工作方式和项目所在位置选择平台。
CLI 是终端原生工作的最完整界面:脚本编写、第三方提供商和 Agent SDK 仅限 CLI。Desktop 和 IDE 扩展为了视觉审查和更紧密的编辑器集成而放弃了一些仅限 CLI 的功能。Web 在 Anthropic 的云中运行,因此任务在您断开连接后继续进行。
您可以在同一项目上混合使用多个界面。配置、项目内存和 MCP 服务器在本地界面之间共享。
连接您的工具
集成让 Claude 与代码库外的服务协作。| 集成 | 功能 | 用途 |
|---|---|---|
| Chrome | 使用您登录的会话控制浏览器 | 测试 Web 应用、填充表单、自动化没有 API 的网站 |
| GitHub Actions | 在 CI 管道中运行 Claude | 自动化 PR 审查、问题分类、计划维护 |
| GitLab CI/CD | 与 GitHub Actions 相同,但用于 GitLab | GitLab 上的 CI 驱动自动化 |
| Code Review | 自动审查每个 PR | 在人工审查前捕获错误 |
| Slack | 响应频道中的 @Claude 提及 | 将错误报告转换为团队聊天中的拉取请求 |
远离终端时工作
Claude Code offers several ways to work when you’re not at your terminal. They differ in what triggers the work, where Claude runs, and how much you need to set up.| Trigger | Claude runs on | Setup | Best for | |
|---|---|---|---|---|
| Dispatch | Message a task from the Claude mobile app | Your machine (Desktop) | Pair the mobile app with Desktop | Delegating work while you’re away, minimal setup |
| Remote Control | Drive a running session from claude.ai/code or the Claude mobile app | Your machine (CLI or VS Code) | Run claude remote-control | Steering in-progress work from another device |
| Channels | Push events from a chat app like Telegram or Discord, or your own server | Your machine (CLI) | Install a channel plugin or build your own | Reacting to external events like CI failures or chat messages |
| Slack | Mention @Claude in a team channel | Anthropic cloud | Install the Slack app with Claude Code on the web enabled | PRs and reviews from team chat |
| Scheduled tasks | Set a schedule | CLI, Desktop, or cloud | Pick a frequency | Recurring automation like daily reviews |
相关资源
平台
- CLI 快速入门:在终端中安装并运行您的第一个命令
- Desktop:视觉 diff 审查、并行会话、计算机使用和 Dispatch
- VS Code:编辑器内的 Claude Code 扩展
- JetBrains:IntelliJ、PyCharm 和其他 JetBrains IDE 的扩展
- Web 上的 Claude Code:断开连接时继续运行的云会话
集成
- Chrome:使用您登录的会话自动化浏览器任务
- GitHub Actions:在 CI 管道中运行 Claude
- GitLab CI/CD:GitLab 的相同功能
- Code Review:每个拉取请求上的自动审查
- Slack:从团队聊天发送任务,获取 PR 返回
远程访问
- Dispatch:从您的手机发送任务,它可以生成 Desktop 会话
- Remote Control:从您的手机或浏览器驱动运行中的会话
- Channels:将来自聊天应用或您自己的服务器的事件推送到会话中
- Scheduled tasks:按定期计划运行提示