DotEnv-Tools.psm1
function Set-DotEnv { $envFilePath = ".env" if (Test-Path $envFilePath) { Get-Content $envFilePath | ForEach-Object { if ($_ -match "^\s*([^#][^=]*)\s*=\s*(.*)\s*$") { $name = $matches[1].Trim() $value = $matches[2].Trim() [System.Environment]::SetEnvironmentVariable($name, $value, [System.EnvironmentVariableTarget]::Process) } } } } Export-ModuleMember -Function Set-DotEnv |