项目作者: PaulRosset

项目描述 :
🌿 Create persistent env variables easily and quickly for testing locally.
高级语言: Go
项目地址: git://github.com/PaulRosset/var-env.git
创建时间: 2018-08-06T16:28:07Z
项目社区:https://github.com/PaulRosset/var-env

开源协议:MIT License

下载


" class="reference-link">var-env Logo

Create persistent env variables easily and quickly for testing locally.

Travis CI Build Status
Go Report Card

MIT Licence

Install

go get github.com/PaulRosset/var-env/cmd/varenv

Usage

  1. $ varenv
  2. varenv - Create persistent env variables easily and quickly for testing locally.
  3. USAGE:
  4. cli [global options] command [command options] [arguments...]
  5. VERSION:
  6. 1.0.0
  7. COMMANDS:
  8. load The yaml file where the variables live in, from `FILE`
  9. list, l List all the persistent environment variables on your computer.
  10. add, a Quick commands to add an env variables through the cli interface
  11. remove, rm Quick commands to remove an env variables through the cli interface
  12. help, h Shows a list of commands or help for one command
  13. GLOBAL OPTIONS:
  14. --help, -h show help
  15. --version, -v print the version

You can either load a yaml file of the following format:

  1. [NAME_VAR]: [value]

Example:

  1. ENV: prod
  2. TOKEN_API: azeqcvhqsd677T4aze

Then:
varenv load ./path/of/the/yaml/file

or either load manually the variables with the add command, like the following:

varenv add ENV=PROD TOKEN_API=azeqcvhqsd677T4aze

Finally, if you want the change effective on your current shell, you need to do the following in order to refresh: source ~/.bashrc

License

MIT Paul Rosset