---
url: /process-functions/script-shell.md
description: Runs a shell command that has been set up on the MODLR instance.
---

# script.shell

Runs a shell command that has been set up on the MODLR instance. Commands are set up in the instance's config file, which can only be arranged through support. Any other command is refused.

```js
script.shell(command, ...args)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `command` | `string` | The command's name. |
| `args` | `string` | Optional. Arguments for the command. Shell special characters aren't allowed. |

## Returns

The result, as a JSON string. Use `JSON.parse()` to read it.

* On success: `{ "result": 1, "exitCode": 0, "response": "..." }`, where `response` is the command's output.
* On failure: `{ "result": 0, "error": "..." }`.

## Examples

```js
script.shell("example_command_name");
```
