osenv/README.md

44 lines
511 B
Markdown

# osenv
Apply .env files to shell environments!
## What is it
Given a .env like this:
```env
DB_USER=admin
DB_PASSWORD=changeme
```
it will generate scripts for bash (and likely other *sh) and powershell, like:
### Powershell
Example output:
```ps1
$env:DB_USER = "admin"
$env:DB_PASSWORD = "changeme"
```
Use `osenv` like this:
```ps1
osenv -s ps1 | iex
```
### *nix shell
Example output:
```sh
export DB_USER=admin
export DB_PASSWORD=changeme
```
Run `osenv` like this:
```sh
eval $(osenv)
```