Is there a way to set a default app for Heroku Toolbelt?

You could also go for:

heroku git:remote -a <name-of-the-app>

or if you tend to make a lot of mistakes in the configuration of wrong apps, you can use this library I made: https://github.com/kubek2k/heroshell

This is a Heroku wrapper shell that allows you to work in the context of a given Heroku application


You can set the heroku.remote key in your repo's Git config to the name of the default remote. For example, if your remote is called staging, you could do this:

$ git config heroku.remote staging

To see how this works, here is the relevant source.

For more, information about this, see Managing Multiple Environments for an App.


You can set the HEROKU_APP environment variable.

Found this question while searching for it myself. The other answers refer to Heroku's old ruby-based CLI. The new JS CLI doesn't seem to support the same git-remote-reading feature. A quick search of the source code on GitHub found this.