1 | heroku-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 |
|
7 | Heroku CLI plugin to run one-off dyno processes.
|
8 |
|
9 |
|
10 | * [`heroku logs`](#heroku-logs)
|
11 | * [`heroku run`](#heroku-run)
|
12 | * [`heroku run:detached`](#heroku-rundetached)
|
13 |
|
14 | ## `heroku logs`
|
15 |
|
16 | display recent log output
|
17 |
|
18 | ```
|
19 | USAGE
|
20 | $ heroku logs
|
21 |
|
22 | OPTIONS
|
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 |
|
31 | DESCRIPTION
|
32 | disable colors with --no-color, HEROKU_LOGS_COLOR=0, or HEROKU_COLOR=0
|
33 |
|
34 | EXAMPLES
|
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 | ## `heroku run`
|
41 |
|
42 | run a one-off process inside a heroku dyno
|
43 |
|
44 | ```
|
45 | USAGE
|
46 | $ heroku run
|
47 |
|
48 | OPTIONS
|
49 | -a, --app=app (required) app to run command against
|
50 | -e, --env=env environment variables to set (use ';' to split multiple vars)
|
51 | -r, --remote=remote git remote of app to use
|
52 | -s, --size=size dyno size
|
53 | -x, --exit-code passthrough the exit code of the remote command
|
54 | --no-notify disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0)
|
55 | --no-tty force the command to not run in a tty
|
56 | --type=type process type
|
57 |
|
58 | DESCRIPTION
|
59 | Shows a notification if the dyno takes more than 20 seconds to start.
|
60 |
|
61 | EXAMPLES
|
62 | $ heroku run bash
|
63 | Running bash on app.... up, run.1
|
64 | ~ $
|
65 |
|
66 | $ heroku run -s hobby -- myscript.sh -a arg1 -s arg2
|
67 | Running myscript.sh -a arg1 -s arg2 on app.... up, run.1
|
68 | ```
|
69 |
|
70 | ## `heroku run:detached`
|
71 |
|
72 | run a detached dyno, where output is sent to your logs
|
73 |
|
74 | ```
|
75 | USAGE
|
76 | $ heroku run:detached
|
77 |
|
78 | OPTIONS
|
79 | -a, --app=app (required) app to run command against
|
80 | -e, --env=env environment variables to set (use ';' to split multiple vars)
|
81 | -r, --remote=remote git remote of app to use
|
82 | -s, --size=size dyno size
|
83 | -t, --tail stream logs from the dyno
|
84 | --type=type process type
|
85 |
|
86 | EXAMPLES
|
87 | $ heroku run:detached ls
|
88 | Running ls on app [detached]... up, run.1
|
89 | Run heroku logs -a app -p run.1 to view the output.
|
90 | ```
|
91 |
|