Powershell module that load, unload variables from dotenv files (manually)
Install-Module PSDotEnv
Import me in $PROFILE
Import-Module PSDotEnv
# Your other cool stuffs
# ...
Load variables from .env
file (default)
> cd project
> Set-DotEnv -Verbose
VERBOSE: Checking .env exists
VERBOSE: Getting variables
VERBOSE: Setting foo
Load from a specific dotenv file
> cd project
> Set-DotEnv -Path .\.env.prod -Verbose
VERBOSE: Checking .env.prod exists
VERBOSE: Getting variables
VERBOSE: Setting foo
Unload dotenv
> cd project
> Redo-DotEnv -Path .\.env.prod -Verbose
VERBOSE: Checking .env.prod exists
VERBOSE: Getting variables
VERBOSE: Unsetting foo