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

# Deep Links

> Launch Firebender with pre-configured queries using jetbrains:// URLs

## Deep Link Integration

Firebender supports deep links through the `jetbrains://` protocol, allowing you to launch the IDE and pre-populate queries with specific prompts, models, and configurations. This is particularly useful for automation, shortcuts, and integrating Firebender with external tools.

## Prerequisites

To use deep links, you need to have **JetBrains Toolbox** installed on your system. The Toolbox App registers the `jetbrains://` protocol handler that enables deep link functionality across all JetBrains IDEs.

Download JetBrains Toolbox from: [https://www.jetbrains.com/toolbox-app/](https://www.jetbrains.com/toolbox-app/)

## URL Format

Deep links follow this pattern:

```
jetbrains://[ide]/firebender/chat?[parameters]
```

Where `[ide]` can be any of the following JetBrains IDE identifiers:

* `idea` - IntelliJ IDEA
* `studio` - Android Studio

See the full list of supported IDEs on the [JetBrains products page](https://www.jetbrains.com/products/).

And `[parameters]` are URL-encoded query parameters

## Supported Parameters

| Parameter | Description                                                                         | Example                                           |
| --------- | ----------------------------------------------------------------------------------- | ------------------------------------------------- |
| `prompt`  | The query text to populate in the chat                                              | `prompt=Fix+this+bug`                             |
| `model`   | The model ID to use (case-insensitive)                                              | `model=claude-sonnet-4-20250514` or `model=gpt-5` |
| `mode`    | Query mode: Write, Ask, Plan, or Composer (case insensitive)                        | `mode=write`                                      |
| `project` | Absolute path to project (must have been opened in IDE before to have .idea folder) | `project=/Users/username/my-project`              |
| `newchat` | Reset the chat session before executing (value doesn't matter)                      | `newchat`                                         |

## Available Models

For a full list of available model IDs, see [available models](/get-started/models).

## Example URLs

### Basic Query

Launch with a simple prompt:

```
jetbrains://idea/firebender/chat?prompt=Hello
```

### Query with Specific Model

Use Claude for debugging assistance:

```
jetbrains://studio/firebender/chat?prompt=Debug+issue&model=claude-sonnet-4-20250514
```

### Write Mode with GPT-5

Launch in Write mode for feature development:

```
jetbrains://studio/firebender/chat?prompt=Build+feature&mode=write&model=gpt-5
```

### Ask Mode for Code Explanation

Use Ask mode to understand existing code without making changes:

```
jetbrains://idea/firebender/chat?prompt=Explain+code&mode=ask
```

### Fresh Chat Session

Start a new chat session:

```
jetbrains://studio/firebender/chat?prompt=Fresh+start&newchat
```

### Complex Query

Multiple parameters combined:

```
jetbrains://idea/firebender/chat?prompt=Refactor+authentication+logic&model=claude-sonnet-4-20250514&mode=write&newchat
```

## Integration Examples

### Shell Scripts

Create shortcuts in your shell profile:

```bash theme={null}
# Add to ~/.bashrc or ~/.zshrc
alias fb-debug='open "jetbrains://studio/firebender/chat?prompt=Debug+current+issue&model=claude-sonnet-4-20250514"'
alias fb-refactor='open "jetbrains://idea/firebender/chat?prompt=Refactor+selected+code&mode=write"'
```

### Browser Bookmarks

Save frequently used queries as browser bookmarks for quick access:

* **Debug Helper**: `jetbrains://studio/firebender/chat?prompt=Help+debug+this+issue&model=claude-sonnet-4-20250514`
* **Code Review**: `jetbrains://idea/firebender/chat?prompt=Review+this+code&mode=read`
* **Feature Builder**: `jetbrains://idea/firebender/chat?prompt=Build+new+feature&mode=write&newchat`

### External Tool Integration

Integrate with project management tools, CI/CD pipelines, or custom automation scripts to launch Firebender with context-specific queries.

## URL Encoding

Remember to URL-encode special characters in parameters:

* Spaces: `+` or `%20`
* Ampersands: `%26`
* Question marks: `%3F`
* Hash symbols: `%23`

## Troubleshooting

If deep links aren't working:

1. **Check IDE Registration**: Ensure your JetBrains IDE is properly registered to handle `jetbrains://` URLs
2. **Verify Plugin Installation**: Make sure the Firebender plugin is installed and enabled
3. **URL Format**: Double-check the URL format and parameter encoding
4. **IDE Running**: The target IDE should be running for optimal performance

The deep link system will show error dialogs if there are issues processing the request, helping you identify and resolve problems quickly.
