UNPKG

3.76 kBMarkdownView Raw
1# @heroku-cli/plugin-run
2
3[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
4[![Version](https://img.shields.io/npm/v/@heroku-cli/plugin-run.svg)](https://npmjs.org/package/@heroku-cli/plugin-run)
5[![CircleCI](https://circleci.com/gh/heroku/heroku-cli-plugin-run/tree/master.svg?style=shield)](https://circleci.com/gh/heroku/heroku-cli-plugin-run/tree/master)
6[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/heroku/heroku-cli-plugin-run?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/heroku-cli-plugin-run/branch/master)
7[![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/plugin-run.svg)](https://npmjs.org/package/@heroku-cli/plugin-run)
8[![License](https://img.shields.io/npm/l/@heroku-cli/plugin-run.svg)](https://github.com/heroku/heroku-cli-plugin-run/blob/master/package.json)
9
10<!-- toc -->
11* [@heroku-cli/plugin-run](#heroku-cliplugin-run)
12* [Usage](#usage)
13* [Commands](#commands)
14<!-- tocstop -->
15
16# Usage
17
18<!-- usage -->
19```sh-session
20$ npm install -g @heroku-cli/plugin-run
21$ heroku COMMAND
22running command...
23$ heroku (-v|--version|version)
24@heroku-cli/plugin-run/7.54.0 darwin-x64 node-v12.18.4
25$ heroku --help [COMMAND]
26USAGE
27 $ heroku COMMAND
28...
29```
30<!-- usagestop -->
31
32# Commands
33
34<!-- commands -->
35* [`heroku logs`](#heroku-logs)
36* [`heroku run`](#heroku-run)
37* [`heroku run:detached`](#heroku-rundetached)
38
39## `heroku logs`
40
41display recent log output
42
43```
44USAGE
45 $ heroku logs
46
47OPTIONS
48 -a, --app=app (required) app to run command against
49 -d, --dyno=dyno only show output from this dyno type (such as "web" or "worker")
50 -n, --num=num number of lines to display
51 -r, --remote=remote git remote of app to use
52 -s, --source=source only show output from this source (such as "app" or "heroku")
53 -t, --tail continually stream logs
54 --force-colors force use of colors (even on non-tty output)
55
56DESCRIPTION
57 disable colors with --no-color, HEROKU_LOGS_COLOR=0, or HEROKU_COLOR=0
58
59EXAMPLES
60 $ heroku logs --app=my-app
61 $ heroku logs --num=50
62 $ heroku logs --dyno=web --app=my-app
63 $ heroku logs --app=my-app --tail
64```
65
66_See code: [src/commands/logs.ts](https://github.com/heroku/cli/blob/v7.54.0/src/commands/logs.ts)_
67
68## `heroku run`
69
70run a one-off process inside a heroku dyno
71
72```
73USAGE
74 $ heroku run
75
76OPTIONS
77 -a, --app=app (required) parent app used by review apps
78 -e, --env=env environment variables to set (use ';' to split multiple vars)
79 -r, --remote=remote git remote of app to use
80 -s, --size=size dyno size
81 -x, --exit-code passthrough the exit code of the remote command
82 --no-notify disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0)
83 --no-tty force the command to not run in a tty
84 --type=type process type
85
86DESCRIPTION
87 Shows a notification if the dyno takes more than 20 seconds to start.
88
89EXAMPLES
90 $ heroku run bash
91 $ heroku run -s hobby -- myscript.sh -a arg1 -s arg2
92```
93
94_See code: [src/commands/run/index.ts](https://github.com/heroku/cli/blob/v7.54.0/src/commands/run/index.ts)_
95
96## `heroku run:detached`
97
98run a detached dyno, where output is sent to your logs
99
100```
101USAGE
102 $ heroku run:detached
103
104OPTIONS
105 -a, --app=app (required) app to run command against
106 -e, --env=env environment variables to set (use ';' to split multiple vars)
107 -r, --remote=remote git remote of app to use
108 -s, --size=size dyno size
109 -t, --tail continually stream logs
110 --type=type process type
111
112EXAMPLE
113 $ heroku run:detached ls
114```
115
116_See code: [src/commands/run/detached.ts](https://github.com/heroku/cli/blob/v7.54.0/src/commands/run/detached.ts)_
117<!-- commandsstop -->