> ## Documentation Index
> Fetch the complete documentation index at: https://ag2dev.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 安装

> 在 macOS 和 Linux 上安装 Claude Code

## 系统要求

* **操作系统**：macOS、Linux 或 Windows WSL2
* **硬件**：4 GB+ 内存

## 安装

要安装 Claude Code，请使用以下方法之一：

<Tabs>
  <Tab title="最新版本（默认）">
    ```bash theme={null} theme={null}
    curl -fsSL https://claude.ai/install.sh | bash
    ```
  </Tab>

  <Tab title="稳定版本">
    ```bash theme={null} theme={null}
    curl -fsSL https://claude.ai/install.sh | bash -s stable
    ```
  </Tab>

  <Tab title="指定版本">
    ```bash theme={null} theme={null}
    curl -fsSL https://claude.ai/install.sh | bash -s 2.0.76
    ```
  </Tab>
</Tabs>

安装完成后，验证安装是否成功：

```bash theme={null} theme={null}
claude --version
# 2.0.76 (Claude Code)
```

<Tip>
  安装后运行 `claude doctor` 以检查您的安装类型和版本。
</Tip>

## 身份验证

要使用 Claude Code，需要订阅编码套餐或兼容 Anthropic API 的端点。

编码套餐使用非计费令牌模式，而 API 使用基于令牌的计费系统。

### 编码套餐

* [Claude 编码套餐](/zh/coding-agents/claude-code/coding-plan-claude)
* [GLM 编码套餐](/zh/coding-agents/claude-code/coding-plan-glm)
* [MiniMax 编码套餐](/zh/coding-agents/claude-code/coding-plan-minimax)
