Manage Environment Variables with Eco
Published on by Paul Redmond
Eco allows you and your team to effortlessly and securely share non-production environment variables, without the overhead of setting up dedicated secrets servers.
It’s been a busy week, but I wanted to get this out into the wild.
Introducing Eco CLI, a tool for managing (non-production) environment variables with your team. https://t.co/65gtNXLYLH
— Adam Campbell (@hotmeteor) September 10, 2020
By design, this package isn’t meant for production secrets. Still, it provides an “easy way to securely share environment variables with other project maintainers without need to set up 3rd party secrets management” for development.
It works by storing a local “vault” file to permanently store any environment variable you don’t want to lose. In the repo, this package provides a remote .eco file in the root of the repo; the eco file is comprised of shared, encrypted keys using the same strategy used by GitHub for safely storing unique key/value pairs.
Once you have the initial setup completed, you could get a fresh .env (based on .env.example) using the following CLI command:
eco env:fresh
You can push/pull env from the remote .eco file using:
# Pull a remote key/value pair from the remote .eco fileeco env:pull # Push a key/value pair to the remote eco fileeco env:push
Check out the readme for further details such as switching between GitHub organizations and repos to pull key/values from various repos. You can learn more at hotmeteor/eco-cli.