PowerShell DotEnv
This is a simple script to load the .env file to process environment from the current directory.
Add the function Set-PsEnv to the prompt function.
Set-PsEnv
# This is function is called by convention in PowerShell
function prompt {
Set-PsEnv
}
Create a .env file at the folder level the environment variable has to be exported
Sample .env file
#This is a comment
#Prefix to a variable
PATH := c:\test
#Append to a variable
PATH =: c:\suffix\bin
#Assign a variable
PYTHON=c:\python
Install-Module -Name Set-PsEnv