direnv integration for JetBrains IDEs
This plugin provides an action to import environment variables from direnv into the Java process that is running the IDE.
A button next to the Reload All from Disk
action will start the process.
Note: This plugin handles only .envrc
files in the project root automatically but you can manually import any .envrc
file inside the project dir.
Note: You need direnv
in your path.
Installation
-
Using IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "intellij-direnv" > Install Plugin
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
Building from source
git clone https://github.com/fehnomenal/intellij-direnv
cd intellij-direnv
./gradlew buildPlugin
The plugin is now in the folder build/distributions/
and can be installed manually.
On NixOS
The gradle plugins downloads JetBrains' JRE and fails to execute it.
Add the following in build.gradle.kts
:
tasks.withType<org.jetbrains.intellij.tasks.RunIdeBase> {
conventionMapping("executable") {
org.gradle.internal.jvm.Jvm.current().javaExecutable.absolutePath
}
}
Logo and icon source: https://github.com/direnv/direnv-logo/tree/0949c12bafa532da0b23482a1bb042cf41b654fc
Plugin based on the IntelliJ Platform Plugin Template.