> ## Documentation Index
> Fetch the complete documentation index at: https://www.jetify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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)

```bash theme={null}
devbox global run <pkg>... [flags]
```

## Examples[​](#examples "Direct link to Examples")

Run a command directly:

```bash theme={null}
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:

```bash theme={null}
devbox global run moo
```

## Options[​](#options "Direct link to Options")

| Option                     | Description                                                                      |
| -------------------------- | -------------------------------------------------------------------------------- |
| `-e, --env stringToString` | environment variables to set in the devbox environment (default \[])             |
| `--env-file string`        | path to a file containing environment variables to set in the devbox environment |
| `-h, --help`               | help for global run                                                              |
| `-q, --quiet`              | suppresses logs                                                                  |

## SEE ALSO[​](#see-also "Direct link to SEE ALSO")

* [devbox global](/docs/devbox/devbox-global/) - Manages global Devbox packages

[Edit this page](https://github.com/jetify-com/docs/tree/main/docs/devbox/cli-reference/devbox-global-run/index.mdx)
