Does Heroku have any sort of dotfile so you don't have to keep using --application or -a?

83 Views Asked by At

When I run Heroku commands, I'm always running them from the directory of the project I'm working on. So typing -a appname is annoying.

From this question's answers, it seems like you can set a heroku remote and that will handle it.

But instead of setting a heroku remote, I would rather use a dotfile .heroku where I could set the app and other settings for the Heroku CLI.

So does Heroku have any dotfile that I can use to configure this?

1

There are 1 best solutions below

0
On

Apart from the git remote, the Heroku CLI also looks into the HEROKU_APP environment variable.

By using direnv, dotenv or similar tools for project-specific environments you can easily set the respective Heroku app for each project.