load

Populate ENV and return the values that changed

Ruby

Dotenvx.load(*filenames, **options)

Usage

Existing values win by default. Accepts multiple filenames, including arrays. Installs stdout redaction for secrets marked by policy.


require "dotenvx"
changed = Dotenvx.load(".env.production", ".env", strict: true)

Keyword options for load and parse are overwrite, ignore (diagnostic codes), strict, convention, environment, key_files, and resolve_references. References are opt-in.

markdown