> ## 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 IDE User Guide

> Claude Code 集成指南 - Ace Data Cloud

Claude Code is an **Agentic Coding** tool launched by Anthropic, also known as one of the world's most powerful programming agents. Claude Code provides a dedicated plugin for JetBrains IDEs, supporting the entire series of JetBrains IDEs including IntelliJ IDEA, PyCharm, WebStorm, GoLand, PhpStorm, and Android Studio.

This document mainly introduces how to configure and use Claude Code in JetBrains IDE through the proxy service of AceData Cloud.

## Application Process

To use Claude Messages service page, first open the [Ace Data Cloud Console](https://platform.acedata.cloud/console/applications) and copy your API Token.

![](https://cdn.acedata.cloud/5hmkdg.jpg)

If you are not logged in, you will be redirected to sign in and brought back to this page automatically.

**A single API Token works across every service on the platform — no need to subscribe per service.** New accounts receive free starter credit; when it runs low you can top up your shared balance in the [console](https://platform.acedata.cloud/console/coin).

> 📘 Full documentation: [Claude Messages service page →](https://platform.acedata.cloud/documents/claude-messages)

## Supported IDEs

The Claude Code plugin supports the following JetBrains IDEs:

| IDE                | Applicable Languages/Scenarios    |
| ------------------ | --------------------------------- |
| **IntelliJ IDEA**  | Java, Kotlin, Scala, etc.         |
| **PyCharm**        | Python                            |
| **WebStorm**       | JavaScript, TypeScript            |
| **GoLand**         | Go                                |
| **PhpStorm**       | PHP                               |
| **Android Studio** | Android Development               |
| **Others**         | Most JetBrains IDEs are supported |

## Installation

### Prerequisites

The Claude Code JetBrains plugin depends on the Claude Code CLI, so please ensure that the CLI is installed first:

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

# Or use Homebrew
brew install claude-code
```

After installation, you can verify:

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

### Install Plugin

![Claude Code Plugin in JetBrains Marketplace](https://cdn.acedata.cloud/de78fd305b.png)

1. Open JetBrains IDE
2. Go to **Settings** → **Plugins** → **Marketplace**
3. Search for **Claude Code**
4. Click **Install** to install the plugin
5. Restart IDE

Alternatively, you can directly visit the [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/27310-claude-code-beta-) for online installation.

> **Important**: After installing the plugin, you need to **completely restart the IDE** (it may require multiple restarts) for it to take effect.

## Configure AceData Cloud API

The Claude Code JetBrains plugin runs the `claude` command through an integrated terminal, so the environment variable configuration method is the same as for the CLI.

### Step 1: Create config.json

Create the configuration file for Claude Code:

| System            | Path                                      |
| ----------------- | ----------------------------------------- |
| **macOS / Linux** | `~/.claude/config.json`                   |
| **Windows**       | `C:\Users\{username}\.claude\config.json` |

Write the following content in this file and save:

```json theme={null}
{
  "primaryApiKey": "self"
}
```

Quick creation command for macOS / Linux:

```bash theme={null}
mkdir -p ~/.claude && echo '{"primaryApiKey": "self"}' > ~/.claude/config.json
```

### Step 2: Configure Environment Variables

**Method 1: Set in Shell Configuration File (Recommended)**

Add the following content to your `~/.zshrc` or `~/.bashrc`, replacing `{token}` with your API token:

```bash theme={null}
# AceData Cloud - Claude Code Proxy Configuration
export ANTHROPIC_AUTH_TOKEN="{token}"
export ANTHROPIC_BASE_URL="https://api.acedata.cloud"
```

After modifying, execute `source ~/.zshrc` to make the configuration effective, then **restart JetBrains IDE**.

**Method 2: Set in Claude Code settings.json**

Edit `~/.claude/settings.json` (create it if it does not exist):

```json theme={null}
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "{token}",
    "ANTHROPIC_BASE_URL": "https://api.acedata.cloud"
  }
}
```

> **Tip**: The API token can be viewed in the [AceData Cloud Console](https://platform.acedata.cloud/console).

## Basic Usage

### Start from the IDE Integrated Terminal

Open the integrated terminal of JetBrains IDE and run:

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

When running in the IDE's integrated terminal, all integrated features (Diff view, context selection, etc.) will be automatically activated.

### Connect from an External Terminal

If you run Claude Code in an external terminal, you can use the `/ide` command to connect to JetBrains IDE:

```bash theme={null}
claude
> /ide
```

Make sure to start Claude Code from the same path as the IDE project root so that Claude can access the same set of files.

### Shortcuts

| Shortcut                                            | Function                                    |
| --------------------------------------------------- | ------------------------------------------- |
| `Cmd+Esc` (Mac) / `Ctrl+Esc` (Windows/Linux)        | Quickly open Claude Code                    |
| `Cmd+Option+K` (Mac) / `Alt+Ctrl+K` (Windows/Linux) | Insert file reference (e.g., `@File#L1-99`) |

### Integrated Features

The Claude Code JetBrains plugin provides the following integrated features:

* **Diff View**: Code changes are displayed directly in the IDE's Diff viewer
* **Context Selection**: The currently selected code and tabs are automatically shared with Claude
* **File Reference**: Quickly reference files and line numbers using shortcuts
* **Diagnostic Sharing**: Lint, syntax errors, and other diagnostic information in the IDE are automatically shared with Claude

## Plugin Settings

You can configure in **Settings** → **Tools** → **Claude Code \[Beta]**:

| Setting                       | Description                                                      |
| ----------------------------- | ---------------------------------------------------------------- |
| **Claude command**            | Custom Claude command path (e.g., `/usr/local/bin/claude`)       |
| **Enable automatic updates**  | Automatically check and install plugin updates                   |
| **Enable using Option+Enter** | Use Option+Enter to insert a new line in the prompt box on macOS |

### WSL User Configuration

If using in a WSL environment, set the Claude command to:

```
wsl -d Ubuntu -- bash -lic "claude"
```

(Replace `Ubuntu` with your WSL distribution name)

## Frequently Asked Questions

### What to do if the connection fails?

1. Check if the `~/.claude/config.json` file is created correctly
2. Confirm that the environment variables are set correctly
3. Confirm that the API token is valid (can be viewed in the [console](https://platform.acedata.cloud/console))
4. Restart JetBrains IDE and try again

### What if the plugin does not work?

1. Ensure Claude Code is run from the project root directory
2. Check if the plugin is enabled in the IDE settings
3. Completely restart the IDE (may require multiple restarts)
4. If using remote development mode, ensure the plugin is installed on the remote host (Settings → Plugin (Host))

### IDE not detected?

1. Confirm that the plugin is installed and enabled
2. Restart the IDE
3. Ensure Claude Code is running in the integrated terminal
4. WSL users please refer to the [WSL Troubleshooting Guide](https://code.claude.com/docs/en/troubleshooting#jetbrains-ide-not-detected-on-wsl2)

### command not found

If clicking the Claude icon prompts "command not found":

1. Confirm that the CLI is installed: `which claude`
2. Configure the full path of the Claude command in the plugin settings
3. WSL users use the above WSL command format

### How to check the remaining quota?

Log in to the [AceData Cloud Console](https://platform.acedata.cloud/console) to view the current account's remaining quota and usage.

## Learn more

* 📖 [Claude Code JetBrains Official Documentation](https://code.claude.com/docs/en/jetbrains)
* 🔧 [AceData Cloud Claude Code Service](https://platform.acedata.cloud/documents/claude-messages)
* 💬 If you have any questions, feel free to contact us through the platform's customer service.
