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

# Claude Code for JetBrains 配置指南

> Claude Code 集成指南 - Ace Data Cloud

## 1. 获取 API Key

打开 [Ace Data Cloud 应用列表](https://platform.acedata.cloud/console/applications)，进入可用的应用并复制 API Key。

![获取 Ace Data Cloud API Key](https://cdn.acedata.cloud/dvc3cg.jpg)

## 2. 安装 CLI 和插件

先安装 Claude Code CLI。

macOS / Linux / WSL：

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

Windows PowerShell：

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

再从 JetBrains Marketplace 安装 **Claude Code** 插件并重启 IDE。插件调用本机的 `claude` 命令；如果提示找不到命令，在 **Settings → Tools → Claude Code** 中填写其完整路径。

## 3. 配置 Ace Data Cloud

在启动 JetBrains backend 的环境中设置。

macOS / Linux / WSL：

```bash theme={null}
export ANTHROPIC_BASE_URL="https://api.acedata.cloud"
export ANTHROPIC_AUTH_TOKEN="你的 API Key"
unset ANTHROPIC_API_KEY
```

Windows PowerShell：

```powershell theme={null}
$env:ANTHROPIC_BASE_URL = "https://api.acedata.cloud"
$env:ANTHROPIC_AUTH_TOKEN = "你的 API Key"
Remove-Item Env:ANTHROPIC_API_KEY -ErrorAction SilentlyContinue
```

也可以在项目中使用已忽略的 `.claude/settings.local.json`：

```json theme={null}
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.acedata.cloud",
    "ANTHROPIC_AUTH_TOKEN": "你的 API Key"
  }
}
```

Remote Development 要在远程 Host 配置并安装插件；WSL 用户可将 Claude command 设为 `wsl -d Ubuntu -- bash -lic "claude"`。

## 4. 验证

从 IDE 集成终端运行 `claude`，或在外部终端启动后输入 `/ide`。连接成功后让 Claude 回复 `OK`，再读取一个测试文件，并在 Ace Data Cloud [使用历史](https://platform.acedata.cloud/console/usages) 核对该请求。

如果插件无法启动，先在同一终端运行 `claude --version`；401 则检查 backend 实际继承的环境变量和旧 `ANTHROPIC_API_KEY`。

## 官方参考

* [Claude Code JetBrains](https://code.claude.com/docs/en/jetbrains)
* [Claude Code 设置](https://code.claude.com/docs/en/settings)
