Switch Heroku Accounts

I have several Heroku accounts that I need to switch between for clients. I’ve been doing it by hand for a while, and then I remembered that I could just write a bash script to make a command for my forgetful brain.

The basic steps are:

  • >heroku keys:clear
  • >rm ~/.heroku/credentials
  • >heroku list

So, my little bash script is:

#!/bin/bash

heroku keys:clear && rm ~/.heroku/credentials && heroku list

do a quick
>chmod 775 switch_heroku

and now I can switch with that simple command.
This is on OS X. Probably very similar on Linux. No idea on windows.

This entry was posted in Uncategorized and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

You must be logged in to post a comment.