envy
Use envy
to manage sensitive environment variables when running commands.
Project Overview
gophers.dev/cmds/envy
provides a command-line utility for managing
secretive environment variables when running commands.
envy
builds on ideas from envchain and schain. It makes use of the go-keyring library for multi-platform keyring management. Encryption is based on Go's built-in crypto/aes
library. Persistent storage is managed through boltdb.
Supports Linux, macOS, and Windows
Getting Started
Build from source
The envy
command can be compiled by running
$ go install gophers.dev/cmds/envy@latest
Example Usages
usage overview
Subcommands for envy:
exec Run command with environment variables from namespace.
list List all namespaces.
purge Purge a namespace.
set Set environment variable(s) for namespace.
show Show environment variable(s) in namespace.
update Add or Update environment variable(s) in namespace.
set a namespace
$ envy set example a=foo b=bar c=baz
stored 3 items in "example"
execute command
$ envy exec example hack/test.sh
a: is foo, b is: bar
list namespaces
$ envy list
consul/connect-acls:no_tls
example
nomad/e2e
test
show namespace
$ envy show test
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
show namespace w/ values
$ envy show --decrypt test
AWS_ACCESS_KEY_ID=aaabbbccc
AWS_SECRET_ACCESS_KEY=233kjsdf309jfsd
update variable in namespace
$ envy update test AWS_ACCESS_KEY_ID=xxxxyyyyzzz
updated 1 items in "test"
remove namespace
$ envy purge test
purged namespace "test"
Contributing
The gophers.dev/cmds/envy
module is always improving with new features
and error corrections. For contributing bug fixes and new features please file
an issue.
LICENSE
The gophers.dev/cmds/envy
module is open source under the MIT license.