Ir para conteúdo principal

How to setup multiple Heroku accounts (for heroku-cli)

Lucas Caton

Lucas Caton



Both Heroku and its CLI are great. However, there's no way to access multiple accounts via terminal out of the box. If you have a personal and a work account and need an easy way to switch between them, I have good news for you! :)

Heroku's team has created a plugin called heroku-accounts. You can find how to install and how to use in its project page on Github.

To make it even easier, I've added the following aliases to my ~/.zshrc (or ~/.bashrc):

# Heroku
alias hp='heroku accounts:set personal'
alias hw='heroku accounts:set work'

Happy hacking!

Post atualizado em 10/2/2017, 10:00:00 AM