This core plugin comes preinstalled to the Heroku CLI.
$ npm install -g @heroku-cli/plugin-apps-v5
$ heroku COMMAND
running command...
$ heroku (--version)
@heroku-cli/plugin-apps-v5/8.2.0 darwin-x64 node-v16.19.0
$ heroku --help [COMMAND]
USAGE
$ heroku COMMAND
...
heroku apps
heroku apps:create [APP]
heroku apps:destroy
heroku apps:errors
heroku apps:favorites
heroku apps:favorites:add
heroku apps:favorites:remove
heroku apps:info
heroku apps:open [PATH]
heroku apps:rename NEWNAME
heroku apps:stacks
heroku apps:stacks:set STACK
heroku config:set
heroku drains
heroku drains:add URL
heroku drains:remove [URL|TOKEN]
heroku dyno:kill DYNO
heroku dyno:resize
heroku dyno:restart [DYNO]
heroku dyno:scale
heroku dyno:stop DYNO
heroku features
heroku features:disable FEATURE
heroku features:enable FEATURE
heroku features:info FEATURE
heroku keys
heroku keys:add [KEY]
heroku keys:clear
heroku keys:remove KEY
heroku labs
heroku labs:enable FEATURE
heroku labs:info FEATURE
heroku maintenance
heroku maintenance:off
heroku maintenance:on
heroku notifications
heroku ps [TYPE [TYPE ...]]
heroku ps:kill DYNO
heroku ps:resize
heroku ps:restart [DYNO]
heroku ps:scale
heroku ps:stop DYNO
heroku ps:type
heroku releases
heroku releases:info [RELEASE]
heroku releases:output [RELEASE]
heroku releases:rollback [RELEASE]
list your apps
USAGE
$ heroku apps [-A] [--json] [-s <value>] [-p] [-t <value>]
FLAGS
-A, --all include apps in all teams
-p, --personal list apps in personal account when a default team is set
-s, --space=<value> filter by space
-t, --team=<value> team to use
--json output in json format
DESCRIPTION
list your apps
EXAMPLES
$ heroku apps
=== My Apps
example
example2
=== Collaborated Apps
theirapp [email protected]
creates a new app
USAGE
$ heroku apps:create [APP] [--addons <value>] [-b <value>] [-n] [-r <value>] [-s <value>] [--space <value>]
[--region <value>] [--json] [-t <value>]
ARGUMENTS
APP name of app to create
FLAGS
-b, --buildpack=<value> buildpack url to use for this app
-n, --no-remote do not create a git remote
-r, --remote=<value> the git remote to create, default "heroku"
-s, --stack=<value> the stack to create the app on
-t, --team=<value> team to use
--addons=<value> comma-delimited list of addons to install
--json output in json format
--region=<value> specify region for the app to run in
--space=<value> the private space to create the app in
DESCRIPTION
creates a new app
EXAMPLES
$ heroku apps:create
Creating app... done, stack is heroku-22
https://floating-dragon-42.heroku.com/ | https://git.heroku.com/floating-dragon-42.git
# or just
$ heroku create
# use a heroku.yml manifest file
$ heroku apps:create --manifest
# specify a buildpack
$ heroku apps:create --buildpack https://github.com/some/buildpack.git
# specify a name
$ heroku apps:create example
# create a staging app
$ heroku apps:create example-staging --remote staging
# create an app in the eu region
$ heroku apps:create --region eu
permanently destroy an app
USAGE
$ heroku apps:destroy [APP] [-c <value>] [-a <value>] [-r <value>]
FLAGS
-a, --app=<value> app to run command against
-c, --confirm=<value>
-r, --remote=<value> git remote of app to use
DESCRIPTION
permanently destroy an app
This will also destroy all add-ons on the app.
view app errors
USAGE
$ heroku apps:errors -a <value> [--json] [--hours <value>] [--router] [--dyno] [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--dyno show only dyno errors
--hours=<value> number of hours to look back (default 24)
--json output in json format
--router show only router errors
DESCRIPTION
view app errors
list favorited apps
USAGE
$ heroku apps:favorites [--json]
FLAGS
--json output in json format
DESCRIPTION
list favorited apps
favorites an app
USAGE
$ heroku apps:favorites:add -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
favorites an app
unfavorites an app
USAGE
$ heroku apps:favorites:remove -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
unfavorites an app
show detailed app information
USAGE
$ heroku apps:info [APP] [-s] [-j] [-a <value>] [-r <value>]
FLAGS
-a, --app=<value> app to run command against
-j, --json
-r, --remote=<value> git remote of app to use
-s, --shell output more shell friendly key/value pairs
DESCRIPTION
show detailed app information
$ heroku apps:info
=== example
Git URL: https://git.heroku.com/example.git
Repo Size: 5M
...
$ heroku apps:info --shell
git_url=https://git.heroku.com/example.git
repo_size=5000000
...
open the app in a web browser
USAGE
$ heroku apps:open [PATH] -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
open the app in a web browser
EXAMPLES
$ heroku open -a myapp
# opens https://myapp.herokuapp.com
$ heroku open -a myapp /foo
# opens https://myapp.herokuapp.com/foo
rename an app
USAGE
$ heroku apps:rename NEWNAME -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
rename an app
This will locally update the git remote if it is set to the old app.
EXAMPLES
$ heroku apps:rename --app oldname newname
https://newname-xxxxxxxxxxxx.herokuapp.com/ | https://git.heroku.com/newname.git
Git remote heroku updated
show the list of available stacks
USAGE
$ heroku apps:stacks -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
show the list of available stacks
set the stack of an app
USAGE
$ heroku apps:stacks:set STACK -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
set the stack of an app
EXAMPLES
$ heroku stack:set heroku-22 -a myapp
Setting stack to heroku-22... done
You will need to redeploy myapp for the change to take effect.
Run git push heroku main to trigger a new build on myapp.
set one or more config vars
USAGE
$ heroku config:set -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
set one or more config vars
EXAMPLES
$ heroku config:set RAILS_ENV=staging
Setting config vars and restarting example... done, v10
RAILS_ENV: staging
$ heroku config:set RAILS_ENV=staging RACK_ENV=staging
Setting config vars and restarting example... done, v11
RAILS_ENV: staging
RACK_ENV: staging
display the log drains of an app
USAGE
$ heroku drains -a <value> [--json] [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--json output in json format
DESCRIPTION
display the log drains of an app
adds a log drain to an app
USAGE
$ heroku drains:add URL -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
adds a log drain to an app
removes a log drain from an app
USAGE
$ heroku drains:remove [URL|TOKEN]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
removes a log drain from an app
stop app dyno
USAGE
$ heroku dyno:kill DYNO -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
stop app dyno
stop app dyno or dyno type
EXAMPLES
$ heroku ps:stop run.1828
Stopping run.1828 dyno... done
$ heroku ps:stop run
Stopping run dynos... done
manage dyno sizes
USAGE
$ heroku dyno:resize -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
manage dyno sizes
Called with no arguments shows the current dyno size.
Called with one argument sets the size.
Where SIZE is one of eco|basic|standard-1x|standard-2x|performance
Called with 1..n TYPE=SIZE arguments sets the quantity per type.
restart app dynos
USAGE
$ heroku dyno:restart [DYNO] -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
restart app dynos
if DYNO is not specified, restarts all dynos on app
EXAMPLES
$ heroku ps:restart web.1
Restarting web.1 dyno... done
$ heroku ps:restart web
Restarting web dynos... done
$ heroku ps:restart
Restarting dynos... done
scale dyno quantity up or down
USAGE
$ heroku dyno:scale -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
scale dyno quantity up or down
Appending a size (eg. web=2:Standard-2X) allows simultaneous scaling and resizing.
Omitting any arguments will display the app's current dyno formation, in a
format suitable for passing back into ps:scale.
EXAMPLES
$ heroku ps:scale web=3:Standard-2X worker+1
Scaling dynos... done, now running web at 3:Standard-2X, worker at 1:Standard-1X.
$ heroku ps:scale
web=3:Standard-2X worker=1:Standard-1X
stop app dyno
USAGE
$ heroku dyno:stop DYNO -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
stop app dyno
stop app dyno or dyno type
EXAMPLES
$ heroku ps:stop run.1828
Stopping run.1828 dyno... done
$ heroku ps:stop run
Stopping run dynos... done
list available app features
USAGE
$ heroku features -a <value> [--json] [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--json output in json format
DESCRIPTION
list available app features
disables an app feature
USAGE
$ heroku features:disable FEATURE -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
disables an app feature
enables an app feature
USAGE
$ heroku features:enable FEATURE -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
enables an app feature
display information about a feature
USAGE
$ heroku features:info FEATURE -a <value> [--json] [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--json output in json format
DESCRIPTION
display information about a feature
display your SSH keys
USAGE
$ heroku keys [-l] [--json]
FLAGS
-l, --long display full SSH keys
--json output in json format
DESCRIPTION
display your SSH keys
add an SSH key for a user
USAGE
$ heroku keys:add [KEY] [-y]
FLAGS
-y, --yes automatically answer yes for all prompts
DESCRIPTION
add an SSH key for a user
if no KEY is specified, will try to find ~/.ssh/id_rsa.pub
EXAMPLES
$ heroku keys:add
Could not find an existing public key.
Would you like to generate one? [Yn] y
Generating new SSH public key.
Uploading SSH public key /.ssh/id_rsa.pub... done
$ heroku keys:add /my/key.pub
Uploading SSH public key /my/key.pub... done
remove all SSH keys for current user
USAGE
$ heroku keys:clear
DESCRIPTION
remove all SSH keys for current user
remove an SSH key from the user
USAGE
$ heroku keys:remove KEY
DESCRIPTION
remove an SSH key from the user
EXAMPLES
$ heroku keys:remove [email protected]
Removing [email protected] SSH key... done
list experimental features
USAGE
$ heroku labs [--json] [-a <value>] [-r <value>]
FLAGS
-a, --app=<value> app to run command against
-r, --remote=<value> git remote of app to use
--json display as json
DESCRIPTION
list experimental features
enables an experimental feature
USAGE
$ heroku labs:enable FEATURE [-a <value>] [-r <value>]
FLAGS
-a, --app=<value> app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
enables an experimental feature
show feature info
USAGE
$ heroku labs:info FEATURE [--json] [-a <value>] [-r <value>]
FLAGS
-a, --app=<value> app to run command against
-r, --remote=<value> git remote of app to use
--json display as json
DESCRIPTION
show feature info
display the current maintenance status of app
USAGE
$ heroku maintenance -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
display the current maintenance status of app
take the app out of maintenance mode
USAGE
$ heroku maintenance:off -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
take the app out of maintenance mode
put the app into maintenance mode
USAGE
$ heroku maintenance:on -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
put the app into maintenance mode
display notifications
USAGE
$ heroku notifications [--all] [--json] [--read] [-a <value>] [-r <value>]
FLAGS
-a, --app=<value> app to run command against
-r, --remote=<value> git remote of app to use
--all view all notifications (not just the ones for the current app)
--json output in json format
--read show notifications already read
DESCRIPTION
display notifications
list dynos for an app
USAGE
$ heroku ps [TYPE [TYPE ...]]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--json display as json
DESCRIPTION
list dynos for an app
EXAMPLES
$ heroku ps
=== run: one-off dyno
run.1: up for 5m: bash
=== web: bundle exec thin start -p $PORT
web.1: created for 30s
$ heroku ps run # specifying types
=== run: one-off dyno
run.1: up for 5m: bash
stop app dyno
USAGE
$ heroku ps:kill DYNO -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
stop app dyno
stop app dyno or dyno type
EXAMPLES
$ heroku ps:stop run.1828
Stopping run.1828 dyno... done
$ heroku ps:stop run
Stopping run dynos... done
manage dyno sizes
USAGE
$ heroku ps:resize -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
manage dyno sizes
Called with no arguments shows the current dyno size.
Called with one argument sets the size.
Where SIZE is one of eco|basic|standard-1x|standard-2x|performance
Called with 1..n TYPE=SIZE arguments sets the quantity per type.
restart app dynos
USAGE
$ heroku ps:restart [DYNO] -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
restart app dynos
if DYNO is not specified, restarts all dynos on app
EXAMPLES
$ heroku ps:restart web.1
Restarting web.1 dyno... done
$ heroku ps:restart web
Restarting web dynos... done
$ heroku ps:restart
Restarting dynos... done
scale dyno quantity up or down
USAGE
$ heroku ps:scale -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
scale dyno quantity up or down
Appending a size (eg. web=2:Standard-2X) allows simultaneous scaling and resizing.
Omitting any arguments will display the app's current dyno formation, in a
format suitable for passing back into ps:scale.
EXAMPLES
$ heroku ps:scale web=3:Standard-2X worker+1
Scaling dynos... done, now running web at 3:Standard-2X, worker at 1:Standard-1X.
$ heroku ps:scale
web=3:Standard-2X worker=1:Standard-1X
stop app dyno
USAGE
$ heroku ps:stop DYNO -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
stop app dyno
stop app dyno or dyno type
EXAMPLES
$ heroku ps:stop run.1828
Stopping run.1828 dyno... done
$ heroku ps:stop run
Stopping run dynos... done
manage dyno sizes
USAGE
$ heroku ps:type -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
manage dyno sizes
Called with no arguments shows the current dyno size.
Called with one argument sets the size.
Where SIZE is one of eco|basic|standard-1x|standard-2x|performance
Called with 1..n TYPE=SIZE arguments sets the quantity per type.
display the releases for an app
USAGE
$ heroku releases -a <value> [-n <value>] [--json] [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-n, --num=<value> number of releases to show
-r, --remote=<value> git remote of app to use
--json output releases in json format
DESCRIPTION
display the releases for an app
EXAMPLES
$ heroku releases
=== example Releases
v1 Config add FOO_BAR [email protected] 2015/11/17 17:37:41 (~ 1h ago)
v2 Config add BAR_BAZ [email protected] 2015/11/17 17:37:41 (~ 1h ago)
v3 Config add BAZ_QUX [email protected] 2015/11/17 17:37:41 (~ 1h ago)
view detailed information for a release
USAGE
$ heroku releases:info [RELEASE] -a <value> [--json] [-s] [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
-s, --shell output in shell format
--json output in json format
DESCRIPTION
view detailed information for a release
View the release command output
USAGE
$ heroku releases:output [RELEASE] -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
View the release command output
rollback to a previous release
USAGE
$ heroku releases:rollback [RELEASE] -a <value> [-r <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
rollback to a previous release
If RELEASE is not specified, it will rollback one release