What is Heroku Command Line:
The heroku command-line tool is an interface to the Heroku Platform API and includes support for things like creating/renaming apps, running one-off dynos, taking backups, and configuring add-ons. It is generally installed in your local development operating system.
Installing the Heroku CLI on Ubuntu: Use following steps to properly install heroku in your Ubuntu system:
1. Run the following command in your terminal to install heroku toolbelt:
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
2. To verify your toolbelt installation use the following command:
After running the above command, you should be able to see the result like following:
heroku-toolbelt/3.43.5 (i686-linux) ruby/1.9.3
3. To find out where the executable is located, run the following command:
After running this command, result should be similar to this:
The path to the heroku command should not be a Ruby gem directory. If it is, uninstall it and any other heroku gems using the following command:
gem uninstall heroku –allLog in to Heroku:
4. You can run the following command to log in:
You will be asked to enter your Heroku credentials the first time you run a command; after the first time, your email address and an API token will be saved to ~/.netrc for future use.
Using command line tools in Heroku: After installing and log in, you can use heroku command line to perform the various operation of your choice, like following:
1. To get a list of apps you created or are a collaborator on, run following command:
It will list all the apps on heroku that you are eligible to access.
2. If you have multiple heroku apps or want to execute an app command outside of a local working copy, you can specify an explicit app name as follows:
heroku apps:info --app example-abc
It will show the detail of your app like following:
Add-ons: heroku plugin you have used for your app:
Collaborators: email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com Dynos : web: 1 Git URL: https://git.heroku.com/example-abc.git Owner: firstname.lastname@example.org Region: us Repo Size: 44 MB Slug Size: 27 MB Stack: cedar-14