An open API service indexing awesome lists of open source software.

https://github.com/178inaba/y2e

y2e sets environment variables from a YAML file.
https://github.com/178inaba/y2e

environment-variables golang yaml

Last synced: 2 months ago
JSON representation

y2e sets environment variables from a YAML file.

Awesome Lists containing this project

README

          

# y2e

[![CircleCI](https://circleci.com/gh/178inaba/y2e.svg?style=svg)](https://circleci.com/gh/178inaba/y2e)
[![Go Report Card](https://goreportcard.com/badge/github.com/178inaba/y2e)](https://goreportcard.com/report/github.com/178inaba/y2e)

y2e sets environment variables from a YAML file.

## Usage

Create a YAML file with the environment variable name as the key.

```yaml
FOO: foo
BAR: 123
BAZ: true
```

Pass YAML file to `y2e` and execute it as a subcommand of `eval` command.
After execution, the value of the YAML file is set as an environment variable.

```console
$ eval "$(y2e your_env_var.yaml)"
$ env | grep -e FOO -e BAR -e BAZ
FOO=foo
BAR=123
BAZ=true
```

### Options

- `-verbose`
- Output detail log to the stderr.

## Install

```console
$ go get -u github.com/178inaba/y2e
```

## License

[MIT](LICENSE)

## Author

[178inaba](https://github.com/178inaba)