Local Shell Command
Execute shell command on the host machine.
Runs a command line through the system shell of the host that runs the worker and returns its trimmed stdout and stderr.
How it works
- Resolves the config.
command,cwdandtimeout(default 10000 ms) fall back to the same keys of the incoming payload. - Fails through
errorwhencommandis empty. - Runs
commandin a shell, incwd(default: the working directory of the orchestrator process), and stops it aftertimeoutms. - Exit code 0 leaves through
outwith{ stdout, stderr }trimmed; a non-zero exit, a timeout or a launch failure leaves througherrorwith the untrimmed output.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-list-exports",
"label": "List exports",
"operator_slug": "io.local.shell",
"operator_version": "1.0.0",
"config": {
"command": "ls /data/exports | grep orders",
"cwd": "/data",
"timeout": 10000
}
}{
"ok": true,
"data": {
"stdout": "orders-2026-11-25.csv\norders-2026-11-26.csv",
"stderr": ""
},
"port": "out"
}Configuration
-
commandstring Required -
Command to execute
-
cwdstring Optional -
Current Working Directory
-
timeoutnumber Optional
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
command - Interpreted by the shell: pipes, redirections and
&&work, and values inserted with expressions become part of the command line. To pass data from upstream nodes as arguments, prefercode.shell, which runs a program with an argument list and no shell.
Output ports
out default The command exited with code 0.
{
"stdout": "orders-2026-11-25.csv\norders-2026-11-26.csv",
"stderr": ""
}error The command exited non-zero, timed out, exceeded the output buffer or could not start. Data is { error, stderr, stdout }; for a missing command, only { error }.
{
"error": "Command failed: ls /data/missing\nls: /data/missing: No such file or directory\n",
"stderr": "ls: /data/missing: No such file or directory\n",
"stdout": ""
}In expressions
What a later node can read from this node's output with $("Local Shell Command").item.json.<path> (write your node's label instead of Local Shell Command). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Local Shell Command").item.json.stdout | ||
$("Local Shell Command").item.json.stderr |
Errors
| Message | Port | Cause and fix |
|---|---|---|
command is required | error | No command in the config nor in the incoming payload. |
Command failed: <command>
<stderr> | error | The command exited non-zero or was stopped after timeout ms. Read stderr for the reason; raise timeout for long commands. |
stdout maxBuffer length exceeded | error | The command wrote more than about 1 MB to stdout or stderr. Write large output to a file and read it with io.local.file. |
Input contract
-
commandstring Required -
cwdstring Optional -
timeoutnumber Optional
Output contract
-
stdoutstring Optional -
stderrstring Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "io.local.shell",
"name": "Local Shell Command",
"category": "io",
"version": "1.0.0",
"description": "Execute shell command on the host machine.",
"capabilities": [
"shell",
"local",
"terminal"
],
"config_schema": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Command to execute"
},
"cwd": {
"type": "string",
"description": "Current Working Directory"
},
"timeout": {
"type": "number",
"default": 10000
}
},
"required": [
"command"
]
},
"input_contract_schema": {
"type": "object",
"properties": {
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"timeout": {
"type": "number"
}
},
"required": [
"command"
]
},
"output_contract_schema": {
"type": "object",
"properties": {
"stdout": {
"type": "string"
},
"stderr": {
"type": "string"
}
}
},
"ports": [
{
"port_id": "out",
"label": "Output",
"description": "Command executed successfully",
"is_default": true,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Command returned non-zero exit code or failed",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"required_resources": [],
"compatible_worker_pools": [
"desktop-agent",
"local-agent"
],
"tags": [
"local",
"terminal"
],
"is_stateful": false,
"publisher": {
"identity": "org_link_loom",
"profile": {
"name": "Link Loom",
"verified": true,
"url": "https://me.veripass.com/link-loom",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Command to execute"
},
"cwd": {
"type": "string",
"description": "Current Working Directory"
},
"timeout": {
"type": "number",
"default": 10000
}
},
"required": [
"command"
]
}{
"type": "object",
"properties": {
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"timeout": {
"type": "number"
}
},
"required": [
"command"
]
}{
"type": "object",
"properties": {
"stdout": {
"type": "string"
},
"stderr": {
"type": "string"
}
}
}[
{
"port_id": "out",
"label": "Output",
"description": "Command executed successfully",
"is_default": true,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Command returned non-zero exit code or failed",
"is_default": false,
"supports_condition": false
}
]Execution
- Execution
async- Stateful
- No
- Capabilities
shelllocalterminal- Tags
localterminal
Notes and limits
- The exit code is not included in the output;
outmeans exit code 0. - The command runs on the host or container of the orchestrator worker, with that process's user and permissions.
Reviewed against the orchestrator code · 31e874b · 2026-11-26