UNPKG

3.19 kBMarkdownView Raw
1heroku-run [![Circle CI](https://circleci.com/gh/heroku/heroku-run.svg?style=svg)](https://circleci.com/gh/heroku/heroku-run)
2==========
3
4[![codecov](https://codecov.io/gh/heroku/heroku-run/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-run)
5[![License](https://img.shields.io/github/license/heroku/heroku-run.svg)](https://github.com/heroku/heroku-run/blob/master/LICENSE)
6
7Heroku CLI plugin to run one-off dyno processes.
8
9<!-- commands -->
10* [`heroku logs`](#heroku-logs)
11* [`heroku run`](#heroku-run)
12* [`heroku run:detached`](#heroku-rundetached)
13
14## `heroku logs`
15
16display recent log output
17
18```
19USAGE
20 $ heroku logs
21
22OPTIONS
23 -a, --app=app (required) app to run command against
24 -d, --dyno=dyno only show output from this dyno type (such as "web" or "worker")
25 -n, --num=num number of lines to display
26 -r, --remote=remote git remote of app to use
27 -s, --source=source only show output from this source (such as "app" or "heroku")
28 -t, --tail continually stream logs
29 --force-colors force use of colors (even on non-tty output)
30
31DESCRIPTION
32 disable colors with --no-color, HEROKU_LOGS_COLOR=0, or HEROKU_COLOR=0
33
34EXAMPLES
35 $ heroku logs
36 2012-01-01T12:00:00+00:00 heroku[api]: Config add EXAMPLE by email@example.com
37 2012-01-01T12:00:01+00:00 heroku[api]: Release v1 created by email@example.com
38```
39
40_See code: [commands/logs.js](https://github.com/heroku/cli/blob/v7.17.1/packages/run-v5/commands/logs.js)_
41
42## `heroku run`
43
44run a one-off process inside a heroku dyno
45
46```
47USAGE
48 $ heroku run
49
50OPTIONS
51 -a, --app=app (required) app to run command against
52 -e, --env=env environment variables to set (use ';' to split multiple vars)
53 -r, --remote=remote git remote of app to use
54 -s, --size=size dyno size
55 -x, --exit-code passthrough the exit code of the remote command
56 --no-notify disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0)
57 --no-tty force the command to not run in a tty
58 --type=type process type
59
60DESCRIPTION
61 Shows a notification if the dyno takes more than 20 seconds to start.
62
63EXAMPLES
64 $ heroku run bash
65 Running bash on app.... up, run.1
66 ~ $
67
68 $ heroku run -s hobby -- myscript.sh -a arg1 -s arg2
69 Running myscript.sh -a arg1 -s arg2 on app.... up, run.1
70```
71
72_See code: [commands/run.js](https://github.com/heroku/cli/blob/v7.17.1/packages/run-v5/commands/run.js)_
73
74## `heroku run:detached`
75
76run a detached dyno, where output is sent to your logs
77
78```
79USAGE
80 $ heroku run:detached
81
82OPTIONS
83 -a, --app=app (required) app to run command against
84 -e, --env=env environment variables to set (use ';' to split multiple vars)
85 -r, --remote=remote git remote of app to use
86 -s, --size=size dyno size
87 -t, --tail stream logs from the dyno
88 --type=type process type
89
90EXAMPLES
91 $ heroku run:detached ls
92 Running ls on app [detached]... up, run.1
93 Run heroku logs -a app -p run.1 to view the output.
94```
95
96_See code: [commands/run/detached.js](https://github.com/heroku/cli/blob/v7.17.1/packages/run-v5/commands/run/detached.js)_
97<!-- commandsstop -->