7 A one-page reference to common Heroku-CLI commands.
9 [Heroku](http://heroku.com/) is a web hosting platform supporting many languages, and this guide is a reference to Heroku's [command-line interface](http://heroku.com/).
12 ### `create` - Create an app
19 git push heroku master
22 ### `access` - Collaboration
24 #### Manage collaborators
28 heroku access:add me@xy.com
29 heroku access:remove me@xy.com
32 #### Transfer to another owner
35 heroku apps:transfer new@owner.com
38 ### `logs` - Show logs
42 heroku logs -t # --tail (stream)
43 heroku logs -s app # --source (only on app logs)
50 heroku releases:info v25
59 heroku addons:add heroku-postgresql
65 heroku addons:add pgbackups:auto-month
68 See: [Heroku PostgreSQL](https://devcenter.heroku.com/articles/heroku-postgresql) _(devcenter.heroku.com)_
70 ### `config` - Environment var configuration
76 heroku config -s # List in shell format
88 heroku config:set KEY=val
89 heroku config:set KEY1=val KEY2=val ...
93 heroku config:unset KEY1
96 ### `apps` - Applications
100 heroku apps:create [NAME]
101 heroku apps:destroy --app APP
103 heroku apps:open # open in browser
104 heroku apps:rename NEWNAME
110 heroku maintenance:on
114 heroku maintenance:off
120 ### `ps` - Managing processes
124 heroku ps:scale web=1 # spawn more dynos
133 ### `run` - Running tasks
137 heroku run console # Rails console
138 heroku run rake assets:precompile
143 ### `domains` - Custom domains
148 heroku domains:add example.com
149 heroku domains:add www.example.com
156 heroku domains:remove example.com
159 See: [Custom domains](https://devcenter.heroku.com/articles/custom-domains) _(devcenter.heroku.com)_
164 heroku addons:add wildcard_domains
168 *.yourdomain.com => heroku.com
173 ### htpasswd (for PHP apps)
175 Create an `.htaccess` file in the webroot:
178 AuthUserFile /app/www/.htpasswd
180 AuthName "Restricted Access"
184 Create a `.htpasswd` file:
187 $ htpasswd -c .htpasswd [username]
190 See: [gist.github.com](https://gist.github.com/3316425)
194 * <https://addons.heroku.com/>
195 * <https://devcenter.heroku.com/>