runStreamingCommand() method is designed for executing long-running or interactive commands inside a sandbox while receiving real-time output streams.
runStreamingCommand(options)
Description:
Executes a long-running command with real-time output streaming. Callbacks are invoked as data arrives.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| cmd | string | Yes | Command to execute |
| args | string[] | Yes | Array of command arguments |
| stdin | string | No | Standard input to send to the command |
| onStdout | (data: string) => void | No | Callback for stdout data chunks |
| onStderr | (data: string) => void | No | Callback for stderr data chunks |
~/ shorthand notation, which the shell automatically expands to the user’s home directory (/home/damner).
Examples:
~/file.jsexpands to/home/damner/file.js~/project/script.shexpands to/home/damner/project/script.sh~/code/app.pyexpands to/home/damner/code/app.py
