Skip to content

Instantly share code, notes, and snippets.

@tatiC
Created October 13, 2011 20:23
Show Gist options
  • Save tatiC/1285403 to your computer and use it in GitHub Desktop.
Save tatiC/1285403 to your computer and use it in GitHub Desktop.
heroku_commands.rb
$ heroku help
=== General Commands
help # show this usage
version # show the gem version
login # log in with your heroku credentials
logout # clear local authentication credentials
list # list your apps
create [<name>] # create a new app
info # show app info, like web url and git repo
open # open the app in a web browser
rename <newname> # rename the app
destroy # destroy the app permanently
dynos <qty> # scale to qty web processes
workers <qty> # scale to qty background processes
console <command> # remotely execute a single console command
console # start an interactive console to the remote app
rake <command> # remotely execute a rake command
ps # show process list
restart # restart app processes
addons # list installed addons
addons:info # list all available addons
addons:add name [key=value] # install addon (with zero or more config vars)
addons:remove name # uninstall an addon
addons:clear # uninstall all addons
addons:open name # open an addon's page in your browser
config # display the app's config vars (environment)
config:add key=val [...] # add one or more config vars
config:remove key [...] # remove one or more config vars
db:pull [<database_url>] # pull the app's database into a local database
db:push [<database_url>] # push a local database into the app's remote database
domains:add <domain> # add a custom domain name
domains:remove <domain> # remove a custom domain name
domains:clear # remove all custom domains
keys # show your user's public keys
keys:add [<path to keyfile>] # add a public key
keys:remove <keyname> # remove a key by name (user@host)
keys:clear # remove all keys
ssl:add <pem> <key> # add SSL cert to the app
ssl:remove <domain> # removes SSL cert from the app domain
ssl:clear # remove all SSL certs from the app
logs # fetch recent log output for debugging
logs:cron # fetch cron log output
maintenance:on # put the app into maintenance mode
maintenance:off # take the app out of maintenance mode
sharing:add <email> # add a collaborator
sharing:remove <email> # remove a collaborator
sharing:transfer <email> # transfers the app ownership
stack # show current stack and list of available stacks
stack:migrate # prepare migration of this app to a new stack
=== Plugins
plugins # list installed plugins
plugins:install <url> # install the plugin from the specified git url
plugins:uninstall <url/name> # remove the specified plugin
=== Logging (Expanded)
logs --tail # realtime logs tail
logs:drains # list syslog drains
logs:drains add <url> # add a syslog drain
logs:drains remove <url> # remove a syslog drain
logs:drains clear # remove all syslog drains
=== heroku-postgresql
pg:info [--db <DATABASE>] # show database status
pg:reset --db <DATABASE> # delete all data in the specified database
pg:promote --db <DATABASE> # set a database identifier to the DATABASE_URL
pg:psql [--db <DATABASE>] # open a psql shell to the database (dedicated only)
pg:ingress [--db <DATABASE>] # allow new connections from this IP to the database for one minute (dedicated only)
=== pgbackups
pgbackups # list captured backups
pgbackups:capture [<DB_ID>] # capture a backup from database ID (default: DATABASE_URL)
pgbackups:url [<BACKUP_ID>] # get a temporary URL for a backup
pgbackups:destroy <BACKUP_ID> # destroy a backup
pgbackups:restore <BACKUP_ID> --db <DB_ID> # restore the database ID (default: DATABASE_URL) from a backup
pgbackups:restore <url> --db <DB_ID> # restore the database ID (default: DATABASE_URL) from a URL
=== Releases
releases # list releases
releases:info <release> # detailed info for a release
rollback [<release>] # roll back to a prior release
=== Bundle Install on Developemnt
bundle install --without development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment