How to Load Environment Variables from .env File in IntelliJ IDEA

Tadashi Shigeoka ·  Tue, September 6, 2022

I’ll introduce how to load environment variables from .env files in IntelliJ IDEA.

IntelliJ IDEA | インテリジェイ アイディア

Method 1: Launch via CLI

Launch IntelliJ IDEA.app from macOS Terminal with the following command:

open -na "IntelliJ IDEA.app"

Method 2: Use EnvFile Plugin

EnvFile - IntelliJ IDEs Plugin | Marketplace

That’s all from the Gemba, where I want to load environment variables from .env files in IntelliJ IDEA.