|
| 1 | +--- |
| 2 | +title: intellij-idea |
| 3 | +description: A reference page for the intellij-idea resource |
| 4 | +--- |
| 5 | + |
| 6 | +The intellij-idea resource installs [JetBrains IntelliJ IDEA](https://www.jetbrains.com/idea/), a general-purpose JVM/Java IDE. As of 2025.3, IntelliJ IDEA ships as a unified distribution that includes both the free Community tier and Ultimate features, which unlock within the same install via a subscription. On macOS it is installed via Homebrew Cask (`brew install --cask intellij-idea`); on Linux via Snap (`snap install intellij-idea-community --classic`). |
| 7 | + |
| 8 | +## Parameters |
| 9 | + |
| 10 | +- **settingsZip** *(string, optional)* — Absolute path to an IntelliJ IDEA settings ZIP file (exported via *File | Manage IDE Settings | Export Settings*) to import on first install. The archive is extracted directly into the IntelliJ IDEA config directory, so all exported settings (keymaps, code styles, inspections, etc.) are applied before IntelliJ IDEA is first launched. |
| 11 | + |
| 12 | +- **importSettings** *(boolean, optional, default: `true`)* — Controls whether the `settingsZip` is imported during `create`. Set to `false` to skip the import even when `settingsZip` is specified. This is a setting parameter and is not tracked as state, so it only has effect when the resource is first applied. |
| 13 | + |
| 14 | +- **plugins** *(string[], optional)* — JetBrains Marketplace plugin IDs to install (e.g. `"com.github.copilot"`, `"Docker"`). Plugin IDs can be found on the plugin's page in the Marketplace under *Additional Information*. Plugins are managed statefully: Codify adds missing plugins and removes plugins no longer in the list. |
| 15 | + |
| 16 | +- **jvmMaxHeapSize** *(string, optional)* — Maximum JVM heap allocated to IntelliJ IDEA, e.g. `"2048m"` for 2 GB or `"4096m"` for 4 GB. Written to `idea.vmoptions` in the IDE config directory as `-Xmx<value>`. |
| 17 | + |
| 18 | +- **jvmMinHeapSize** *(string, optional)* — Initial JVM heap allocated to IntelliJ IDEA, e.g. `"512m"`. Written to `idea.vmoptions` as `-Xms<value>`. Typically set to half the max heap size. |
| 19 | + |
| 20 | +## Example usage |
| 21 | + |
| 22 | +### Install IntelliJ IDEA with plugins |
| 23 | + |
| 24 | +```json title="codify.jsonc" |
| 25 | +[ |
| 26 | + { |
| 27 | + "type": "intellij-idea", |
| 28 | + "plugins": [ |
| 29 | + "com.github.copilot", |
| 30 | + "Docker" |
| 31 | + ] |
| 32 | + } |
| 33 | +] |
| 34 | +``` |
| 35 | + |
| 36 | +### Install IntelliJ IDEA, import previous settings, and increase heap |
| 37 | + |
| 38 | +```json title="codify.jsonc" |
| 39 | +[ |
| 40 | + { |
| 41 | + "type": "intellij-idea", |
| 42 | + "settingsZip": "/path/to/intellij-idea-settings.zip", |
| 43 | + "importSettings": true, |
| 44 | + "jvmMaxHeapSize": "4096m", |
| 45 | + "jvmMinHeapSize": "1024m", |
| 46 | + "plugins": [ |
| 47 | + "com.github.copilot", |
| 48 | + "Docker" |
| 49 | + ] |
| 50 | + } |
| 51 | +] |
| 52 | +``` |
| 53 | + |
| 54 | +## Notes |
| 55 | + |
| 56 | +- On macOS a CLI launcher symlink is created at `/usr/local/bin/idea` during install so that `idea` is available in terminal sessions. It is removed on destroy. |
| 57 | +- Plugin IDs must be exact JetBrains Marketplace IDs. You can find them on the plugin's Marketplace page under *Additional Information → Plugin ID*. |
| 58 | +- The `settingsZip` import only runs during `create` (first apply), not on subsequent applies. If you need to re-import, destroy and re-apply the resource. |
| 59 | +- JVM options are written to `idea.vmoptions` in `~/Library/Application Support/JetBrains/IntelliJIdea<version>/` on macOS and `~/.config/JetBrains/IntelliJIdea<version>/` on Linux. If IntelliJ IDEA has never been launched, Codify creates this directory and file automatically. |
| 60 | +- On Linux, Snap must be available. Codify will attempt to install `snapd` via the system package manager if it is not found. |
| 61 | +- IntelliJ IDEA is the unified distribution covering both the free Community tier and the Ultimate edition; Ultimate features are unlocked within the same install via an active subscription. |
0 commit comments