mirror of
https://github.com/Luzifer/envrun.git
synced 2024-11-14 00:52:42 +00:00
Update README
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
dcb3280c98
commit
dc70a88edc
1 changed files with 19 additions and 5 deletions
24
README.md
24
README.md
|
@ -1,3 +1,8 @@
|
||||||
|
[![Go Report Card](https://goreportcard.com/badge/github.com/Luzifer/envrun)](https://goreportcard.com/report/github.com/Luzifer/envrun)
|
||||||
|
![](https://badges.fyi/github/license/Luzifer/envrun)
|
||||||
|
![](https://badges.fyi/github/downloads/Luzifer/envrun)
|
||||||
|
![](https://badges.fyi/github/latest-release/Luzifer/envrun)
|
||||||
|
|
||||||
# Luzifer / envrun
|
# Luzifer / envrun
|
||||||
|
|
||||||
`envrun` is a small helper utility I wrote for myself to debug programs and scripts during their development expecting environment variables to be set to special values. Sure there is [gin](https://github.com/codegangsta/gin) for go webservers doing the same but I wanted something also for commandline utilities.
|
`envrun` is a small helper utility I wrote for myself to debug programs and scripts during their development expecting environment variables to be set to special values. Sure there is [gin](https://github.com/codegangsta/gin) for go webservers doing the same but I wanted something also for commandline utilities.
|
||||||
|
@ -27,9 +32,14 @@ ANOTHER_VAR=foo
|
||||||
|
|
||||||
# envrun --help
|
# envrun --help
|
||||||
Usage of envrun:
|
Usage of envrun:
|
||||||
--clean[=false]: Do not pass current environment to child process
|
--clean Do not pass current environment to child process
|
||||||
--env-file=".env": Location of the environment file
|
--encryption string Encryption method used for encrypted env-file (Available: openssl-md5) (default "openssl-md5")
|
||||||
--q[=false]: Suppress informational messages from envrun
|
--env-file string Location of the environment file (default ".env")
|
||||||
|
--log-level string Log level (debug, info, warn, error, fatal) (default "info")
|
||||||
|
-p, --password string Password to decrypt environment file
|
||||||
|
--password-file string Read encryption key from file
|
||||||
|
--q Suppress informational messages from envrun (DEPRECATED, use --log-level=warn)
|
||||||
|
--version Prints current version and exits
|
||||||
|
|
||||||
# envrun python test.py | grep MY_TEST_VAR
|
# envrun python test.py | grep MY_TEST_VAR
|
||||||
MY_TEST_VAR = hello world
|
MY_TEST_VAR = hello world
|
||||||
|
@ -48,10 +58,14 @@ MY_TEST_VAR = hello world
|
||||||
|
|
||||||
## Encrypted `.env`-file
|
## Encrypted `.env`-file
|
||||||
|
|
||||||
In case you don't want to put the environment variables into a plain text file onto your disk you can use an AES256 encrypted file and provide a password to `envrun`:
|
In case you don't want to put the environment variables into a plain text file onto your disk you can use an encrypted file and provide a password to `envrun`:
|
||||||
|
|
||||||
|
### OpenSSL AES256 encryption
|
||||||
|
|
||||||
|
Pay attention on the `-md md5` flag: OpenSSL 1.1.0f and newer uses an incompatible hasing algorithm for the passwords!
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# echo 'MYVAR=myvalue' | openssl enc -e -aes-256-cbc -pass pass:justatest -base64 -out .env
|
# echo 'MYVAR=myvalue' | openssl enc -e -aes-256-cbc -pass pass:justatest -md md5 -base64 -out .env
|
||||||
|
|
||||||
# cat .env
|
# cat .env
|
||||||
U2FsdGVkX18xcVIMejjwWzh1DppzptJCHhORH/JDj10=
|
U2FsdGVkX18xcVIMejjwWzh1DppzptJCHhORH/JDj10=
|
||||||
|
|
Loading…
Reference in a new issue