Push and pull your Heroku configs to your local environment.
Heavily inspired by ddollar's version, but using the new Heroku cli.
Running this code has the potential to delete your configurations if misused.
Specifically, the -o
flag will overwrite values at the destination. Only use that if the source has more up to date info and you're feeling brave. Otherwise, this merges configs and is fairly safe. Just thought you should know.
You can install the package by running
heroku plugins:install heroku-config
This package includes two commands:
heroku config:pull
: Writes the contents ofheroku config
into a local fileheroku config:push
: Writes the contents of a local file intoheroku config
Run heroku help config:pull
and heroku help config:push
to see a full list of flags.
After cloning, follow these instructions to run locally! I welcome pull requests with fixes or new features.