Skip to main content

Module dotenv

Module dotenv 

Source
Expand description

.env parsing and serialization (the dotenv helpers zx re-exports).

Functionsยง

config
Load env files into a map suitable for Shell::env: the current process environment overlaid (without overriding) by the file values. Unlike zx this never mutates the process environment.
load
Read and merge env files; earlier files take precedence.
load_safe
Like load, but skips files that cannot be read.
parse
Parse dotenv text into key/value pairs (later keys overwrite earlier ones).
stringify
Serialize pairs as dotenv text, one KEY=value per line, quoting values so that parse reads them back unchanged.