{/* TRANSLATED — 已翻译为中文 */}

> ## 文档索引
> 在此获取完整文档索引：https://code.claude.com/docs/llms.txt
> 使用此文件发现所有可用页面，然后再进一步探索。

# 高级设置

> Claude Code 的系统要求、平台特定安装、版本管理和卸载。

本页面涵盖系统要求、平台特定安装详情、更新和卸载。有关首次会话的引导演练，请参见[快速入门](/en/quickstart)。如果你从未使用过终端，请参见[终端指南](/en/terminal-guide)。

## 系统要求

Claude Code 运行在以下平台和配置上：

* **操作系统**：
  * macOS 13.0+
  * Windows 10 1809+ 或 Windows Server 2019+
  * Ubuntu 20.04+
  * Debian 10+
  * Alpine Linux 3.19+
* **硬件**：4 GB+ RAM，x64 或 ARM64 处理器
* **网络**：需要互联网连接。参见[网络配置](/en/network-config#network-access-requirements)。
* **Shell**：Bash、Zsh、PowerShell 或 CMD。
* **位置**：[Anthropic 支持的国家](https://www.anthropic.com/supported-countries)

### 附加依赖

* **ripgrep**：通常随 Claude Code 一起提供。如果搜索失败，请参见[搜索故障排除](/en/troubleshooting#search-and-discovery-issues)。

## 安装 Claude Code

<Tip>
  偏好图形界面？[桌面应用](/en/desktop-quickstart)让你无需终端即可使用 Claude Code。为 [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs) 或 [Windows](https://claude.com/download?utm_source=claude_code\&utm_medium=docs) 下载。

  初次使用终端？参见[终端指南](/en/terminal-guide)了解分步说明。
</Tip>

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

<Tabs>
  <Tab title="原生安装（推荐）">
    **macOS、Linux、WSL：**

    ```bash theme={null}
    curl -fsSL https://claude.ai/install.sh | bash
    ```

    **Windows PowerShell：**

    ```powershell theme={null}
    irm https://claude.ai/install.ps1 | iex
    ```

    **Windows CMD：**

    ```batch theme={null}
    curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
    ```

    如果你看到 `The token '&&' is not a valid statement separator`，说明你在 PowerShell 中，而不是 CMD。如果你看到 `'irm' is not recognized as an internal or external command`，说明你在 CMD 中，而不是 PowerShell。在 PowerShell 中提示符显示 `PS C:\`，在 CMD 中显示 `C:\`（没有 `PS`）。

    在原生 Windows 上建议安装 [Git for Windows](https://git-scm.com/downloads/win)，以便 Claude Code 使用 Bash 工具。如果未安装 Git for Windows，Claude Code 将改用 PowerShell 作为 shell 工具。WSL 环境不需要 Git for Windows。

    <Info>
      原生安装会在后台自动更新，确保你使用的是最新版本。
    </Info>
  </Tab>

  <Tab title="Homebrew">
    ```bash theme={null}
    brew install --cask claude-code
    ```

    Homebrew 提供两个 cask。`claude-code` 跟踪稳定发布渠道，通常落后约一周，并跳过有重大回退的版本。`claude-code@latest` 跟踪最新渠道，新版本发布后立即接收。

    <Info>
      Homebrew 安装不会自动更新。根据你安装的 cask，运行 `brew upgrade claude-code` 或 `brew upgrade claude-code@latest` 以获取最新功能和安全修复。
    </Info>
  </Tab>

  <Tab title="WinGet">
    ```powershell theme={null}
    winget install Anthropic.ClaudeCode
    ```

    <Info>
      WinGet 安装不会自动更新。定期运行 `winget upgrade Anthropic.ClaudeCode` 以获取最新功能和安全修复。
    </Info>
  </Tab>
</Tabs>

你也可以在 Debian、Fedora、RHEL 和 Alpine 上使用 [apt、dnf 或 apk](/en/setup#install-with-linux-package-managers) 安装。

安装完成后，在你想工作的项目中打开终端并启动 Claude Code：

```bash theme={null}
claude
```

如果在安装过程中遇到任何问题，请参见[故障排除安装和登录](/en/troubleshoot-install)。

### 在 Windows 上设置

你可以在 Windows 上原生运行 Claude Code 或在 WSL 内运行。根据你的项目位置和所需功能选择：

| 选项 | 要求 | [沙箱](/en/sandboxing) | 何时使用 |
| --- | --- | --- | --- |
| 原生 Windows | 无；[Git for Windows](https://git-scm.com/downloads/win) 可选 | 不支持 | Windows 原生项目和工具 |
| WSL 2 | 启用 WSL 2 | 支持 | Linux 工具链或沙箱命令执行 |
| WSL 1 | 启用 WSL 1 | 不支持 | 如果 WSL 2 不可用 |

**选项 1：原生 Windows**

从 PowerShell 或 CMD 运行安装命令。你不需要以管理员身份运行。安装 [Git for Windows](https://git-scm.com/downloads/win) 是可选的。它通过提供 Git Bash 启用 [Bash 工具](/en/tools-reference#bash-tool-behavior)。

从 PowerShell 还是 CMD 安装只影响你运行哪个安装命令。在 PowerShell 中提示符显示 `PS C:\Users\YourName>`，在 CMD 中显示 `C:\Users\YourName>`（没有 `PS`）。如果你是终端新手，[终端指南](/en/terminal-guide#windows)逐步引导每个步骤。

安装后，从任何终端启动 `claude`。

* **不安装 Git for Windows**，Claude Code 通过 [PowerShell 工具](/en/tools-reference#powershell-tool)运行 shell 命令。
* **安装了 Git for Windows**，Claude Code 使用 Git Bash 作为 [Bash 工具](/en/tools-reference#bash-tool-behavior)。如果 Claude Code 找不到 Git Bash，在你的 [settings.json 文件](/en/settings)中设置路径：

  ```json theme={null}
  {
    "env": {
      "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
    }
  }
  ```

安装了 Git for Windows 后，PowerShell 工具正在逐步推出，作为 Bash 的额外选项。设置 `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` 选择加入，设置 `0` 选择退出。参见 [PowerShell 工具](/en/tools-reference#powershell-tool)了解设置和限制。

**选项 2：WSL**

打开你的 WSL 发行版，从上面的[安装说明](#install-claude-code)运行 Linux 安装程序。你在 WSL 终端内安装和启动 `claude`，而不是从 PowerShell 或 CMD。

### Alpine Linux 和基于 musl 的发行版

Alpine 和其他基于 musl/uClibc 的发行版上的原生安装程序需要 `libgcc`、`libstdc++` 和 `ripgrep`。使用你的发行版包管理器安装这些，然后设置 `USE_BUILTIN_RIPGREP=0`。

此示例在 Alpine 上安装所需的包：

```bash theme={null}
apk add libgcc libstdc++ ripgrep
```

然后在你的 [`settings.json`](/en/settings#available-settings) 文件中将 `USE_BUILTIN_RIPGREP` 设置为 `0`：

```json theme={null}
{
  "env": {
    "USE_BUILTIN_RIPGREP": "0"
  }
}
```

## 验证安装

安装后，确认 Claude Code 正常工作：

```bash theme={null}
claude --version
```

如果此命令因 `command not found` 或其他错误而失败，请参见[故障排除安装和登录](/en/troubleshoot-install)。

要更详细地检查你的安装和配置，运行 [`claude doctor`](/en/troubleshooting#get-more-help)：

```bash theme={null}
claude doctor
```

## 认证

Claude Code 需要 Pro、Max、Team、Enterprise 或 Console 账户。免费的 Claude.ai 计划不包括 Claude Code 访问权限。你也可以使用第三方 API 提供商（如 [Amazon Bedrock](/en/amazon-bedrock)、[Google Vertex AI](/en/google-vertex-ai) 或 [Microsoft Foundry](/en/microsoft-foundry)）使用 Claude Code。

安装后，运行 `claude` 并按照浏览器提示登录。参见[认证](/en/authentication)了解所有账户类型和团队设置选项。

## 更新 Claude Code

原生安装会在后台自动更新。你可以[配置发布渠道](#configure-release-channel)来控制是立即接收更新还是按延迟的稳定计划接收，或完全[禁用自动更新](#disable-auto-updates)。Homebrew、WinGet 和 [Linux 包管理器](#install-with-linux-package-managers)安装默认需要手动更新。

### 自动更新

Claude Code 在启动时和运行期间定期检查更新。更新在后台下载和安装，然后在你下次启动 Claude Code 时生效。

<Note>
  Homebrew、WinGet、apt、dnf 和 apk 安装默认不会自动更新；参见下文了解如何为 Homebrew 和 WinGet 选择加入。要手动升级 Homebrew，根据你安装的 cask 运行 `brew upgrade claude-code` 或 `brew upgrade claude-code@latest`。对于 WinGet，运行 `winget upgrade Anthropic.ClaudeCode`。对于 Linux 包管理器，请参见[使用 Linux 包管理器安装](#install-with-linux-package-managers)中的升级命令。

  要让 Claude Code 在 Homebrew 或 WinGet 上为你运行升级命令，将 [`CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE`](/en/env-vars) 设置为 `1`。然后 Claude Code 在有新版本可用时在后台运行升级，成功后显示重启提示。升级仅针对 Claude Code 包，不会影响你安装的其他软件。

  在 WinGet 上，升级可能在 Claude Code 运行时失败，因为 Windows 锁定了可执行文件。在这种情况下，Claude Code 会显示手动命令。apt、dnf 和 apk 继续需要手动升级，因为这些命令需要提升权限。

  **已知问题：** Claude Code 可能会在新版本在这些包管理器中可用之前通知你更新。如果升级失败，请稍后重试。

  Homebrew 在升级后将旧版本保留在磁盘上。定期运行 `brew cleanup` 以回收磁盘空间。
</Note>

### 配置发布渠道

使用 `autoUpdatesChannel` 设置控制 Claude Code 跟踪哪个发布渠道进行自动更新和 `claude update`：

* `"latest"`，默认：发布后立即接收新功能
* `"stable"`：使用通常约一周前的版本，跳过有重大回退的版本

通过 `/config` → **Auto-update channel** 配置，或将其添加到你的 [settings.json 文件](/en/settings)：

```json theme={null}
{
  "autoUpdatesChannel": "stable"
}
```

对于企业部署，你可以使用[托管设置](/en/permissions#managed-settings)在整个组织中强制执行一致的发布渠道。

Homebrew 安装通过 cask 名称而非此设置选择渠道：`claude-code` 跟踪 stable，`claude-code@latest` 跟踪 latest。

### 固定最低版本

`minimumVersion` 设置建立了一个底线。后台自动更新和 `claude update` 拒绝安装低于此值的任何版本，因此切换到 `"stable"` 渠道不会降级你已经使用的更新的 `"latest"` 构建。

通过 `/config` 从 `"latest"` 切换到 `"stable"` 会提示你保持当前版本或允许降级。选择保持会将 `minimumVersion` 设置为该版本。切换回 `"latest"` 会清除它。

将其添加到你的 [settings.json 文件](/en/settings)以显式固定底线：

```json theme={null}
{
  "autoUpdatesChannel": "stable",
  "minimumVersion": "2.1.100"
}
```

在[托管设置](/en/permissions#managed-settings)中，这会强制执行全组织范围的最低版本，用户和项目设置无法覆盖。

### 禁用自动更新

在你的 [`settings.json`](/en/settings#available-settings) 文件的 `env` 键中设置 `DISABLE_AUTOUPDATER` 为 `"1"`：

```json theme={null}
{
  "env": {
    "DISABLE_AUTOUPDATER": "1"
  }
}
```

`DISABLE_AUTOUPDATER` 仅停止后台检查；`claude update` 和 `claude install` 仍然有效。要阻止所有更新路径（包括手动更新），改用 [`DISABLE_UPDATES`](/en/env-vars)。当你通过自己的渠道分发 Claude Code 并需要用户保持你提供的版本时使用此选项。

### 手动更新

要立即应用更新而不等待下次后台检查，运行：

```bash theme={null}
claude update
```

## 高级安装选项

这些选项用于版本固定、Linux 包管理器、npm 和验证二进制文件完整性。

### 安装特定版本

原生安装程序接受特定版本号或发布渠道（`latest` 或 `stable`）。你在安装时选择的渠道成为自动更新的默认值。参见[配置发布渠道](#configure-release-channel)了解更多信息。

要安装最新版本（默认）：

<Tabs>
  <Tab title="macOS、Linux、WSL">
    ```bash theme={null}
    curl -fsSL https://claude.ai/install.sh | bash
    ```
  </Tab>

  <Tab title="Windows PowerShell">
    ```powershell theme={null}
    irm https://claude.ai/install.ps1 | iex
    ```
  </Tab>

  <Tab title="Windows CMD">
    ```batch theme={null}
    curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
    ```
  </Tab>
</Tabs>

要安装稳定版本：

<Tabs>
  <Tab title="macOS、Linux、WSL">
    ```bash theme={null}
    curl -fsSL https://claude.ai/install.sh | bash -s stable
    ```
  </Tab>

  <Tab title="Windows PowerShell">
    ```powershell theme={null}
    & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable
    ```
  </Tab>

  <Tab title="Windows CMD">
    ```batch theme={null}
    curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd stable && del install.cmd
    ```
  </Tab>
</Tabs>

要安装特定版本号：

<Tabs>
  <Tab title="macOS、Linux、WSL">
    ```bash theme={null}
    curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89
    ```
  </Tab>

  <Tab title="Windows PowerShell">
    ```powershell theme={null}
    & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.1.89
    ```
  </Tab>

  <Tab title="Windows CMD">
    ```batch theme={null}
    curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd 2.1.89 && del install.cmd
    ```
  </Tab>
</Tabs>

### 使用 Linux 包管理器安装

Claude Code 发布签名的 apt、dnf 和 apk 仓库。将 `stable` 替换为 `latest` 以使用滚动渠道。包管理器安装不会通过 Claude Code 自动更新；更新通过你的正常系统升级工作流到达。

所有仓库都使用 [Claude Code 发布签名密钥](#binary-integrity-and-code-signing)签名。在信任密钥之前，请按照每个标签页中的说明验证它。

<Tabs>
  <Tab title="apt">
    适用于 Debian 和 Ubuntu。要使用滚动渠道，更改 `deb` 行中的两个 `stable` 出现位置：URL 路径和套件名称。

    ```bash theme={null}
    sudo install -d -m 0755 /etc/apt/keyrings
    sudo curl -fsSL https://downloads.claude.ai/keys/claude-code.asc \
      -o /etc/apt/keyrings/claude-code.asc
    echo "deb [signed-by=/etc/apt/keyrings/claude-code.asc] https://downloads.claude.ai/claude-code/apt/stable stable main" \
      | sudo tee /etc/apt/sources.list.d/claude-code.list
    sudo apt update
    sudo apt install claude-code
    ```

    在信任之前验证 GPG 密钥指纹：`gpg --show-keys /etc/apt/keyrings/claude-code.asc` 应报告 `31DD DE24 DDFA B679 F42D 7BD2 BAA9 29FF 1A7E CACE`。

    要稍后升级，运行 `sudo apt update && sudo apt upgrade claude-code`。
  </Tab>

  <Tab title="dnf">
    适用于 Fedora 和 RHEL：

    ```bash theme={null}
    sudo tee /etc/yum.repos.d/claude-code.repo <<'EOF'
    [claude-code]
    name=Claude Code
    baseurl=https://downloads.claude.ai/claude-code/rpm/stable
    enabled=1
    gpgcheck=1
    gpgkey=https://downloads.claude.ai/keys/claude-code.asc
    EOF
    sudo dnf install claude-code
    ```

    dnf 在首次安装时下载密钥并提示你确认指纹。在接受之前验证它与 `31DD DE24 DDFA B679 F42D 7BD2 BAA9 29FF 1A7E CACE` 匹配。

    要稍后升级，运行 `sudo dnf upgrade claude-code`。
  </Tab>

  <Tab title="apk">
    适用于 Alpine Linux：

    ```sh theme={null}
    wget -O /etc/apk/keys/claude-code.rsa.pub \
      https://downloads.claude.ai/keys/claude-code.rsa.pub
    echo "https://downloads.claude.ai/claude-code/apk/stable" >> /etc/apk/repositories
    apk add claude-code
    ```

    使用 `sha256sum /etc/apk/keys/claude-code.rsa.pub` 验证下载的密钥，应报告 `395759c1f7449ef4cdef305a42e820f3c766d6090d142634ebdb049f113168b6`。

    要稍后升级，运行 `apk update && apk upgrade claude-code`。
  </Tab>
</Tabs>

### 使用 npm 安装

你也可以将 Claude Code 安装为全局 npm 包。该包需要 [Node.js 18 或更高版本](https://nodejs.org/en/download)。

```bash theme={null}
npm install -g @anthropic-ai/claude-code
```

npm 包安装与独立安装程序相同的原生二进制文件。npm 通过每个平台的可选依赖（如 `@anthropic-ai/claude-code-darwin-arm64`）拉取二进制文件，postinstall 步骤将其链接到位。安装的 `claude` 二进制文件本身不调用 Node。

支持的 npm 安装平台是 `darwin-arm64`、`darwin-x64`、`linux-x64`、`linux-arm64`、`linux-x64-musl`、`linux-arm64-musl`、`win32-x64` 和 `win32-arm64`。你的包管理器必须允许可选依赖。如果安装后二进制文件缺失，请参见[故障排除](/en/troubleshoot-install#native-binary-not-found-after-npm-install)。

要升级 npm 安装，运行 `npm install -g @anthropic-ai/claude-code@latest`。避免使用 `npm update -g`，它遵循原始安装的 semver 范围，可能不会将你移到最新版本。

<Warning>
  不要使用 `sudo npm install -g`，因为这可能导致权限问题和安全风险。如果遇到权限错误，请参见[故障排除权限错误](/en/troubleshoot-install#permission-errors-during-installation)。
</Warning>

### 二进制完整性和代码签名

每个发布版本都发布一个 `manifest.json`，包含每个平台二进制文件的 SHA256 校验和。清单使用 Anthropic GPG 密钥签名，因此验证清单上的签名会传递性地验证它列出的每个二进制文件。

#### 验证清单签名

步骤 1-3 需要带有 `gpg` 和 `curl` 的 POSIX shell。在 Windows 上，在 Git Bash 或 WSL 中运行它们。步骤 4 包含 PowerShell 选项。

<Steps>
  <Step title="下载并导入公钥">
    发布签名密钥在固定 URL 发布。

    ```bash theme={null}
    curl -fsSL https://downloads.claude.ai/keys/claude-code.asc | gpg --import
    ```

    显示导入密钥的指纹。

    ```bash theme={null}
    gpg --fingerprint security@anthropic.com
    ```

    确认输出包含此指纹：

    ```text theme={null}
    31DD DE24 DDFA B679 F42D  7BD2 BAA9 29FF 1A7E CACE
    ```
  </Step>

  <Step title="下载清单和签名">
    将 `VERSION` 设置为你要验证的发布版本。

    ```bash theme={null}
    REPO=https://downloads.claude.ai/claude-code-releases
    VERSION=2.1.89
    curl -fsSLO "$REPO/$VERSION/manifest.json"
    curl -fsSLO "$REPO/$VERSION/manifest.json.sig"
    ```
  </Step>

  <Step title="验证签名">
    对清单验证分离签名。

    ```bash theme={null}
    gpg --verify manifest.json.sig manifest.json
    ```

    有效结果报告 `Good signature from "Anthropic Claude Code Release Signing <security@anthropic.com>"`。

    `gpg` 也会为任何新导入的密钥打印 `WARNING: This key is not certified with a trusted signature!`。这是预期的。`Good signature` 行确认加密检查通过。步骤 1 中的指纹比较确认密钥本身是真实的。
  </Step>

  <Step title="根据清单检查二进制文件">
    将下载的二进制文件的 SHA256 校验和与 `manifest.json` 中 `platforms.<platform>.checksum` 下列出的值进行比较。

    <Tabs>
      <Tab title="Linux">
        ```bash theme={null}
        sha256sum claude
        ```
      </Tab>

      <Tab title="macOS">
        ```bash theme={null}
        shasum -a 256 claude
        ```
      </Tab>

      <Tab title="Windows PowerShell">
        ```powershell theme={null}
        (Get-FileHash claude.exe -Algorithm SHA256).Hash.ToLower()
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>

<Note>
  清单签名从 `2.1.89` 版本开始可用。早期版本在 `manifest.json` 中发布校验和，但没有分离签名。
</Note>

#### 平台代码签名

除了签名的清单外，单个二进制文件在支持的地方携带平台原生代码签名。

* **macOS**：由 "Anthropic PBC" 签名并由 Apple 公证。使用 `codesign --verify --verbose ./claude` 验证。
* **Windows**：由 "Anthropic, PBC" 签名。使用 `Get-AuthenticodeSignature .\claude.exe` 验证。
* **Linux**：二进制文件没有单独的代码签名。如果你直接从 `claude-code-releases` 存储桶下载或使用原生安装程序，请使用上面的清单签名验证完整性。如果你使用 [apt、dnf 或 apk](#install-with-linux-package-managers) 安装，你的包管理器会使用仓库签名密钥自动验证签名。

## 卸载 Claude Code

要移除 Claude Code，请按照你的安装方法的说明操作。如果之后 `claude` 仍然运行，你可能有第二个安装或旧安装程序遗留的 shell 别名。参见[检查冲突安装](/en/troubleshoot-install#check-for-conflicting-installations)找到并移除它。

### 原生安装

移除 Claude Code 二进制文件和版本文件：

<Tabs>
  <Tab title="macOS、Linux、WSL">
    ```bash theme={null}
    rm -f ~/.local/bin/claude
    rm -rf ~/.local/share/claude
    ```
  </Tab>

  <Tab title="Windows PowerShell">
    ```powershell theme={null}
    Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
    Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
    ```
  </Tab>
</Tabs>

### Homebrew 安装

移除你安装的 Homebrew cask。如果你安装了 stable cask：

```bash theme={null}
brew uninstall --cask claude-code
```

如果你安装了 latest cask：

```bash theme={null}
brew uninstall --cask claude-code@latest
```

### WinGet 安装

移除 WinGet 包：

```powershell theme={null}
winget uninstall Anthropic.ClaudeCode
```

### apt / dnf / apk

移除包和仓库配置：

<Tabs>
  <Tab title="apt">
    ```bash theme={null}
    sudo apt remove claude-code
    sudo rm /etc/apt/sources.list.d/claude-code.list /etc/apt/keyrings/claude-code.asc
    ```
  </Tab>

  <Tab title="dnf">
    ```bash theme={null}
    sudo dnf remove claude-code
    sudo rm /etc/yum.repos.d/claude-code.repo
    ```
  </Tab>

  <Tab title="apk">
    ```sh theme={null}
    apk del claude-code
    sed -i '\|downloads.claude.ai/claude-code/apk|d' /etc/apk/repositories
    rm /etc/apk/keys/claude-code.rsa.pub
    ```
  </Tab>
</Tabs>

### npm

移除全局 npm 包：

```bash theme={null}
npm uninstall -g @anthropic-ai/claude-code
```

### 移除配置文件

<Warning>
  移除配置文件将删除你所有的设置、允许的工具、MCP 服务器配置和会话历史。
</Warning>

VS Code 扩展、JetBrains 插件和桌面应用也会写入 `~/.claude/`。如果其中任何一个仍然安装，目录会在下次运行时重新创建。要完全移除 Claude Code，请在删除这些文件之前卸载 [VS Code 扩展](/en/vs-code#uninstall-the-extension)、JetBrains 插件和桌面应用。

要移除 Claude Code 设置和缓存数据：

<Tabs>
  <Tab title="macOS、Linux、WSL">
    ```bash theme={null}
    # 移除用户设置和状态
    rm -rf ~/.claude
    rm ~/.claude.json

    # 移除项目特定设置（从项目目录运行）
    rm -rf .claude
    rm -f .mcp.json
    ```
  </Tab>

  <Tab title="Windows PowerShell">
    ```powershell theme={null}
    # 移除用户设置和状态
    Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
    Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force

    # 移除项目特定设置（从项目目录运行）
    Remove-Item -Path ".claude" -Recurse -Force
    Remove-Item -Path ".mcp.json" -Force
    ```
  </Tab>
</Tabs>
