# JetBrains IDEs

> JetBrains IDEs provide native support for AI coding assistants through the Agent Client Protocol (ACP). This integration allows you to use HopCode directly within your JetBrains IDE with real-time code suggestions.

### Features

- **Native agent experience**: Integrated AI assistant panel within your JetBrains IDE
- **Agent Client Protocol**: Full support for ACP enabling advanced IDE interactions
- **Symbol management**: #-mention files to add them to the conversation context
- **Conversation history**: Access to past conversations within the IDE

### Requirements

- JetBrains IDE with ACP support (IntelliJ IDEA, WebStorm, PyCharm, etc.)
- HopCode CLI installed

### Installation

#### Install from ACP Registry (Recommend)

1. Install HopCode CLI:

   ```bash
   npm install -g @hoptrendy/hopcode
   ```

2. Open your JetBrains IDE and navigate to AI Chat tool window.

3. Click **Add ACP Agent**, then click **Install**.

   ![Install](https://img.alicdn.com/imgextra/i4/O1CN01qNdPCW1y8AcqxRgCy_!!6000000006533-2-tps-2490-1788.png)

   For users using JetBrains AI Assistant and/or other ACP agents, click **Install From ACP Registry** in Agents List, then install HopCode ACP.

   ![Add from Agents List](https://img.alicdn.com/imgextra/i2/O1CN01ZyOugP26BOKzNgZXx_!!6000000007623-2-tps-479-523.png)

4. The HopCode agent should now be available in the AI Assistant panel.

   ![HopCode in JetBrains AI Chat](https://img.alicdn.com/imgextra/i4/O1CN013kAVE41XVzbIZOxyv_!!6000000002930-2-tps-3188-2170.png)

#### Manual Install (for older version of JetBrains IDEs)

1. Install HopCode CLI:

   ```bash
   npm install -g @hoptrendy/hopcode
   ```

2. Open your JetBrains IDE and navigate to AI Chat tool window.

3. Click the 3-dot menu in the upper-right corner and select **Configure ACP Agent** and configure HopCode with the following settings:

```json
{
  "agent_servers": {
    "hopcode": {
      "command": "/path/to/hopcode",
      "args": ["--acp"],
      "env": {}
    }
  }
}
```

4. The HopCode agent should now be available in the AI Assistant panel

![HopCode in JetBrains AI Chat](https://img.alicdn.com/imgextra/i3/O1CN01ZxYel21y433Ci6eg0_!!6000000006524-2-tps-2774-1494.png)

## Troubleshooting

### Agent not appearing

- Run `hopcode --version` in terminal to verify installation
- Ensure your JetBrains IDE version supports ACP
- Restart your JetBrains IDE

### HopCode not responding

- Check your internet connection
- Verify CLI works by running `hopcode` in terminal
- [File an issue on GitHub](https://github.com/TaimoorSiddiquiOfficial/HopCode/issues) if the problem persists
