I'd like to print all environment variables set on my Heroku server. How can I do that with command line only?
I'd like to print all environment variables set on my Heroku server. How can I do that with command line only?
The heroku run command runs a one-off process inside a Heroku dyno. The unix command that prints environment variables is printenv (manual page). Thus
heroku run -a app-name printenv
is the command you are looking for.
heroku apps
Copy the name of your app
heroku config -a acme-web
Append -s to get the output in shell format, to paste directly to a .env file, for example.
heroku config -a your-app -s