create - Create an app

heroku create sushi

access - Collaboration

# Manage collaborators
  heroku access                     # List
  heroku access:add
  heroku access:remove

# Transfer to another owner
  heroku apps:transfer

logs - Show logs

heroku logs
heroku logs -t      # --tail (stream)
heroku logs -s app  # --source (only on app logs)


heroku releases
heroku releases:info v25
heroku rollback

pg - Postgresql

# Start a database
  heroku addons:add heroku-postgresql

# Enable backups
  heroku addons:add pgbackups:auto-month

ps - Managing processes

heroku ps              # list
heroku ps:scale web=1  # spawn more dynos


heroku restart

run - Running

heroku run bash
heroku run console                  # Rails console
heroku run rake assets:precompile

config - Environment var configuration

heroku config        # List
heroku config -s     # List in shell format

heroku config:get KEY

heroku config:set KEY=val
heroku config:set KEY1=val KEY2=val ...

heroku config:unset KEY1

apps - Applications

heroku apps                  # list
heroku apps:create [NAME]
heroku apps:destroy --app APP
heroku apps:info
heroku apps:open             # open in browser
heroku apps:rename NEWNAME


heroku maintenance:on
heroku maintenance:off

domains - Custom domains

# Add both!
  heroku domains:add
  heroku domains:add

# Removing:
  heroku domains:clear
  heroku domains:remove

Wildcard domains

heroku addons:add wildcard_domains

* =>

htpasswd (for PHP apps)

Create an .htaccess file in the webroot:

AuthUserFile /app/www/.htpasswd
AuthType Basic
AuthName "Restricted Access"
Require valid-user

Create a .htpasswd file:

$ htpasswd -c .htpasswd [username]