osenv/README.md

44 lines
512 B
Markdown
Raw Normal View History

2020-01-21 16:18:58 +00:00
# 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)
```