Reputation: 19270
Seems like a pretty standard thing to want to do, but I can’t find any easy way of doing it?
Upvotes: 21
Views: 17726
Reputation: 3286
Here's a command line solution using jq
and the --json
flag:
heroku apps -A --json | jq '.[] | .["web_url"]'
Upvotes: 6
Reputation: 879
You can use this command to list all the Heroku apps and respective domain names with Bash:
heroku apps | awk '{print $1;}' | sed 's/[^a-zA-Z0-9-]//g' | sed '/^$/d' | while read line ; do echo "$line" ; heroku domains --app $line | grep 'herokuapp\|herokudns\|herokussl' ; done
Upvotes: 1
Reputation: 1339
Method 1 :
In shell, you can execute this script to list app-name and domains.
apps=( `heroku apps` )
echo "Total number of apps :" $(( ${#apps[@]} -3 ))
for (( i = 3 ; i < ${#apps[@]} ; i++ ))
do
echo $(( i-2)) ] `heroku domains --app ${apps[$i]}`
done
Method 2:
You can use Heroku API
https://devcenter.heroku.com/articles/platform-api-quickstart#calling-the-api
Upvotes: 3
Reputation: 8247
Just type heroku apps
on the computer's command line that you have ssh keys for the heroku.
For further info click here.
Upvotes: 22
Reputation: 22238
In zsh, you can try something like this:
for site (`heroku list`); do echo `heroku domains --app $site`; done;
which will dump out the info for each app. It's not pretty, but it's a start.
Upvotes: 11
Reputation:
from your app folder run heroku domains
(--app name eventually)
heroku domains
Domain names for xxxx.herokuapp.com:
aa.example.com
bbb.example.com
Upvotes: 3
Reputation: 47
Go to: https://api.heroku.com/myapps
That lists all your apps that have been pushed up. Click on each one individually and it will tell you the domain name.
Upvotes: -1