# Claude 代码 概述

> ## 文档 索引
> 获取 the 完成 文档 索引 at: https://代码.claude.com/docs/llms.txt
> 使用 this 文件 to disc结束 所有 可用 页s 之前探索 further.

# Claude 代码 概述

> Claude 代码 is an 代理ic coding 工具 that 读取s your 代码基础, 编辑s 文件, 运行s 命令, and integ速率s with your 开发 工具. 可用 in your 终端, IDE, 桌面 应用, and 浏览器.

Claude 代码 is an AI-权力ed coding assistant that 帮助s you 构建 features, 修复 缺陷s, and automate 开发 任务s. It understands your 整个 代码基础 and can 工作 across mul提示le 文件 and 工具 to get 薄gs 完成.

## 开始使用

选择您的环境 to 开始使用. 大多数界面需要 a [Claude 订阅](https://claude.com/pricing?utm_来源=claude_代码\&utm_中=docs\&utm_满意=概述_pricing) or [Anthropic 控制台](https://控制台.anthropic.com/) 说明. The 终端 CLI and VS 代码 also 支持 [third-部分y 提供者s](/en/third-部分y-集成s).

  
    The 满-featured CLI for工作 with Claude 代码 直接ly in your 终端. 编辑 文件, 运行 命令, and manage your 整个 项目 from the 命令 行.

    To 安装 Claude 代码, 使用 one of the跟随 方法:

    
      
        **macOS、Linux、WSL:**

        ```bash  主题={空}
        curl -fsSL https://claude.ai/安装.sh | bash
        ```

        **风ows 权力命令行:**

        ```权力命令行  主题={空}
        irm https://claude.ai/安装.ps1 | iex
        ```

        **风ows CMD:**

        ```batch  主题={空}
        curl -fsSL https://claude.ai/安装.cmd -o 安装.cmd && 安装.cmd && del 安装.cmd
        ```

        If you看见 `The 令牌 '&&' is not a 有效 州ment separator`, you're in 权力命令行, not CMD. 使用 the 权力命令行 命令 above instead. Your 及时 显示s `PS C:\` when you're in 权力命令行.

        **风ows requ怒s [Git for 风ows](https://Git-scm.com/下载s/win).** 安装 it 第一个 if you don't have it.

        
          原生安装ations 自动所有y 更新 in the 背景 to keep you on the 最新 版本.
        
      

      
        ```bash  主题={空}
        brew 安装 --cask claude-代码
        ```

        
          Homebrew 安装s do not auto-更新. 运行 `brew 升级 claude-代码` 期间ic所有y to get the 最新 features and 安全 修复es.
        
      

      
        ```权力命令行  主题={空}
        WinGet 安装 Anthropic.Clau解码
        ```

        
          WinGet 安装s do not auto-更新. 运行 `WinGet 升级 Anthropic.Clau解码` 期间ic所有y to get the 最新 features and 安全 修复es.
        
      
    

    Then 启动 Claude 代码 in 任何 项目:

    ```bash  主题={空}
    cd your-项目
    claude
    ```

    You'll be 及时ed to 日志 in on 第一个 使用. That's it! [继续 with the 快速入门 →](/en/快速入门)

    
     看见 [先进 设置](/en/设置) for 安装 选项, 手册 更新s, or un安装 说明. Visit [故障排除](/en/故障排除) if you hit 问题s.
    
  

  
    The VS 代码 扩展 provides in行 diffs, @-mentions, 计划 re视图, and 对话 history 直接ly in your 编辑or.

    * [安装 for VS 代码](vs代码:扩展/anthropic.claude-代码)
    * [安装 for Cursor](cursor:扩展/anthropic.claude-代码)

    Or 搜索 for "Claude 代码" in the 扩展s视图 (`Cmd+Shift+X` on Mac, `Ctrl+Shift+X` on 风ows/Linux). 之后安装, 打开 the 命令 浅tte (`Cmd+Shift+P` / `Ctrl+Shift+P`), 类型 "Claude 代码", and 选择 **打开 in 新 Tab**.

    [开始使用 with VS 代码 →](/en/vs-代码#get-开始)
  

  
    A 独立 应用 for 运行中 Claude 代码 外部 your IDE or 终端. Re视图 diffs visu所有y, 运行 mul提示le 会话s side by side, 安排重复任务, and kick off 云 会话s.

    下载 and 安装:

    * [macOS](https://claude.ai/api/桌面/darwin/普遍/dmg/最新/重定向?utm_来源=claude_代码\&utm_中=docs) (Intel and 应用le Sil图标)
    * [风ows](https://claude.ai/api/桌面/win32/x64/设置/最新/重定向?utm_来源=claude_代码\&utm_中=docs) (x64)
    * [风ows ARM64](https://claude.ai/api/桌面/win32/arm64/设置/最新/重定向?utm_来源=claude_代码\&utm_中=docs) (远程 会话s only)

    之后安装, 启动 Claude, 标志 in, and click the **代码** tab to 启动 coding. A [支付 sub脚本ion](https://claude.com/pricing?utm_来源=claude_代码\&utm_中=docs\&utm_满意=概述_桌面_pricing) is 必需.

    [Learn 更多 about the 桌面 应用 →](/en/桌面-快速入门)
  

  
    运行 Claude 代码 in your 浏览器 with no 本地 设置. Kick off 长-运行中 任务s and 检查 返回 when they're 完成, 工作 on repos you don't have 本地ly, or 运行 mul提示le 任务s in 平行. 可用 on 桌面 浏览器s and the Claude iOS 应用.

    启动 coding at [claude.ai/代码](https://claude.ai/代码).

    [开始使用 on the 网页 →](/en/claude-代码-on-the-网页#getting-开始)
  

  
    A 插件 for IntelliJ 想法, PyCharm, 网页风暴, and other JetB雨s IDEs with 交互 diff查看 and 选择 上下文分享.

    安装 the [Claude 代码 插件](https://插件s.jetb雨s.com/插件/27310-claude-代码-beta-) from the JetB雨s 市场place and 重启 your IDE.

    [开始使用 with JetB雨s →](/en/jetb雨s)
  

## 您可以做什么

Here are 一些 of the 方式s you can 使用 Claude 代码:

  
    Claude 代码 handles the 乏味 任务s that eat 上 your day:写作 测试s for un测试 代码,固定 lint 错误 across a 项目,解决 合并 conflicts,更新 依赖, and写作 释放 注意s.

    ```bash  主题={空}
    claude "写入 测试s for the auth 模块, 运行 them, and 修复 任何 失败s"
    ```
  

  
    Describe what you 想要 in 简单 language. Claude 代码 计划s the 方法, 写入s the 代码 across mul提示le 文件, and verifies it 工作s.

    For 缺陷s, 粘贴 an 错误 消息 or describe the 症状. Claude 代码 跟踪s the 问题 th粗糙 your 代码基础, identifies the 根 原因, and 实现s a 修复.看见 [通用工作流](/en/常见-工作流s) for 更多 示例.
  

  
    Claude 代码 工作s 直接ly with Git. It 阶段s 更改s, 写入s 提交 消息s, 创建s 分支es, and 打开s 拉取请求s.

    ```bash  主题={空}
    claude "提交 my 更改s with a de脚本ive 消息"
    ```

    In CI, you can automate 代码 re视图 and 问题 triage with [GitHub 行动s](/en/GitHub-行动s) or [GitLab CI/CD](/en/Gitlab-ci-cd).
  

  
    The [模型上下文协议 (MCP)](/en/mcp) is an 打开 标准 for连接 AI 工具 to 外部 数据 来源s. With MCP, Claude 代码 can 读取 your 设计 docs in 前往ogle Drive, 更新 tickets in Jira, 拉取 数据 from 松弛, or 使用 your own 习俗 工具ing.
  

  
    [`CLAUDE.md`](/en/记忆) is a mark下 文件 you 添加 to your 项目 根 that Claude 代码 读取s at the 启动 of 每个 会话. 使用 it to 设置 coding 标准, 架构 决定s, preferred libraries, and re视图 检查列表s. Claude also 构建s [auto 记忆](/en/记忆#auto-记忆) as it 工作s,保存 learnings 像 构建 命令 and 调试ging insights across 会话s without you写作 任何薄g.

    创建 [习俗 命令](/en/技能) to 包 repea表 工作流s your 团队 can share, 像 `/re视图-pr` or `/部署-预发布`.

    [钩子](/en/钩子) let you 运行 命令行 命令 之前 or 之后 Claude 代码 行动s, 像 auto-格式ting 之后 每个 文件 编辑 or 运行中 lint 之前 a 提交.
  

  
    Spawn [mul提示le Claude 代码 代理s](/en/sub-代理s) that 工作 on 不同 部分s of a 任务 simultaneously. A 领导 代理 首席运营官rdinates the 工作, as标志s sub任务s, and 合并s 结果s.

    For 满y 习俗 工作流s, the [代理 SDK](https://平台.claude.com/docs/en/代理-sdk/概述) lets you 构建 your own 代理s 权力ed by Claude 代码's 工具 and 能力, with 满 控制 结束 orchest比率n, 工具 access, and 权限.
  

  
    Claude 代码 is compos能够 and fol低s the Unix pH值ilosopH值y. 管道 日志s into it, 运行 it in CI, or chain it with other 工具:

    ```bash  主题={空}
    #分析 最近 日志 输出
    tail -200 应用.日志 | claude -p "松弛 me if you看见 任何 anomalies"

    # Automate translations in CI
    claude -p "tran板岩 新 字符串s into French and raise a PR for re视图"

    # Bulk 运营 across 文件
    Git diff 主 --名称-only | claude -p "re视图 these 更改d 文件 for 安全 问题s"
    ```

   看见 the [CLI 参考](/en/cli-参考) for the 满 设置 of 命令 and 标志.
  

  
    运行 Claude on a 时间表 to automate 工作 that repeats: morning PR re视图s, 结束night CI 失败 分析, weekly dep结束ency audits, or 同步ing docs 之后 PRs 合并.

    * [云 计划 任务s](/en/网页-计划-任务s) 运行 on Anthropic-管理 基础设施, so they keep 运行中 偶数 when your computer is off. 创建 them from the 网页, the 桌面 应用, or by 运行中 `/时间表` in the CLI.
    * [桌面 计划 任务s](/en/桌面#时间表-recurring-任务s) 运行 on your machine, with 直接 access to your 本地 文件 and 工具
    * [`/loop`](/en/计划-任务s) repeats a 及时 在...内 a CLI 会话 for 快 polling
  

  
    会话s aren't tied to a single 表面. 移动 工作 between 环境s as your 上下文 更改s:

    *步骤 a方式 from your desk and keep工作 from your pH值one or 任何 浏览器 with [远程 控制](/en/远程-控制)
    * 消息 [Dis补丁](/en/桌面#会话s-from-dis补丁) a 任务 from your pH值one and 打开 the 桌面 会话 it 创建s
    * Kick off a 长-运行中 任务 on the [网页](/en/claude-代码-on-the-网页) or [iOS 应用](https://应用s.应用le.com/应用/claude-by-anthropic/id6473753684), then 拉取 it into your 终端 with `claude --tele端口`
    * Hand off a 终端 会话 to the [桌面 应用](/en/桌面) with `/桌面` for visual diff re视图
    * 路由 任务s from 团队 chat: mention `@Claude` in [松弛](/en/松弛) with a 缺陷 报告 and get a 拉取请求 返回
  

## 使用 Claude 代码 每个where

每个 表面 connects to the 相同 under躺 Claude 代码 engine, so your CLAUDE.md 文件, 设置, and MCP 服务器 工作 across 所有 of them.

超出 the [终端](/en/快速入门), [VS 代码](/en/vs-代码), [JetB雨s](/en/jetb雨s), [桌面](/en/桌面), and [网页](/en/claude-代码-on-the-网页) 环境s above, Claude 代码 integ速率s with CI/CD, chat, and 浏览器 工作流s:

| I 想要 to...                                                                    | 最佳 选项                                                                                                         |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| 继续 a 本地 会话 from my pH值one or another device                        | [远程 控制](/en/远程-控制)                                                                                |
| 推送 事件s from Telegram, 不和, i消息, or my own 网页钩子 into a 会话 | [通道s](/en/通道s)                                                                                            |
| 启动 a 任务 本地ly, 继续 on 移动                                        | [网页](/en/claude-代码-on-the-网页) or [Claude iOS 应用](https://应用s.应用le.com/应用/claude-by-anthropic/id6473753684)  |
| 运行 Claude on a recurring 时间表                                              | [云 计划 任务s](/en/网页-计划-任务s) or [桌面 计划 任务s](/en/桌面#时间表-recurring-任务s) |
| Automate PR re视图s and 问题 triage                                            | [GitHub 行动s](/en/GitHub-行动s) or [GitLab CI/CD](/en/Gitlab-ci-cd)                                            |
| Get 自动 代码 re视图 on 每个 PR                                           | [GitHub 代码 Re视图](/en/代码-re视图)                                                                               |
| 路由 缺陷 报告s from 松弛 to 拉取请求s                                   | [松弛](/en/松弛)                                                                                                  |
| 调试 live 网页 应用程序s                                                     | [Chrome](/en/chrome)                                                                                                |
| 构建 习俗 代理s for your own 工作流s                                      | [代理 SDK](https://平台.claude.com/docs/en/代理-sdk/概述)                                                 |

## 下一步

Once you've 安装ed Claude 代码, these 指南s 帮助 you 前往 深er.

* [快速入门](/en/快速入门):走 th粗糙 your 第一个 真实 任务, from探索 a 代码基础 to 提交ting a 修复
* [Store 说明 and memories](/en/记忆): give Claude 持续 说明 with CLAUDE.md 文件 and auto 记忆
* [通用工作流](/en/常见-工作流s) and [最佳实践](/en/最佳-实践): 模式s for getting the 最多 out of Claude 代码
* [设置](/en/设置): 习俗ize Claude 代码 for your 工作流
* [故障排除](/en/故障排除): 解决方案 for 常见问题
* [代码.claude.com](https://代码.claude.com/): demos,定价, and 产品 详情s