Skip to main content

devbox global run

Starts a new shell and runs your script or command in it, exiting when done.

The script must be defined in devbox.json, or else it will be interpreted as an arbitrary command. You can pass arguments to your script or command. Everything after -- will be passed verbatim into your command (see example)

devbox global run <pkg>... [flags]

Examples

Run a command directly:

  devbox add cowsay
devbox global run cowsay hello
devbox global run -- cowsay -d hello

Run a script (defined as "moo": "cowsay moo") in your devbox.json:

  devbox global run moo

Options

OptionDescription
-e, --env stringToStringenvironment variables to set in the devbox environment (default [])
--env-file stringpath to a file containing environment variables to set in the devbox environment
-h, --helphelp for global run
-q, --quietsuppresses logs

SEE ALSO