Heroku Cli
Heroku Cli is a powerful tool that you should master. Learn the basic commands and it will help you a lot.
If you named the remotes staging and production then you can use heroku cli with the -remote <remote_name> flag instead of -a <application_name>
Get Marco Fernandes’s stories in your inbox
Join Medium for free to get updates from this writer.
For example, when you have an error in the staging environment and you want to the check the logs:
$ heroku logs -t -a <my_application_name>can easily be replaced with:
$ heroku logs -t --remote stagingThis command can be reused in all the projects. No need to remember all the application names, and with repeated use it becomes second nature.
This also works for the console command
$ heroku console --remote stagingGet staging database to local for debugging with staging data? No worries:
$ heroku pg:pull DATABASE_URL <local_db_name> —-remote staging