Actions24
- Code Interpreter Actions
- Command Actions
- File Actions
- Sandbox Actions
- Snapshot Actions
Command → Run
AI-generatedSummary
Runs a shell command inside an existing Declaw sandbox and waits for it to finish, returning the API's response for that command.
Inputs
- Sandbox ID (required) — ID of an existing sandbox (e.g. sbx-a1b2c3d4) to run the command in. The sandbox must already exist, for example from Sandbox > Create.
- Command (required) — Shell command to execute, e.g.
python3 script.py. - Additional Fields > Working Directory — Working directory for the command. Sent only if non-empty.
- Additional Fields > Timeout (Seconds) — Command timeout in seconds. Decimals are supported and 0 means no timeout. The UI default is 60, but the value is only sent if the field is added to the collection.
- Additional Fields > User — Unix user to run the command as. Sent only if non-empty.
- Additional Fields > Environment Variables — Key/value pairs, converted to an env map and sent with the command.
Output shape
One output item per input item, containing the JSON response from POST /sandboxes/{id}/commands. The request is sent with background=false, so the call blocks until the command completes.
The source doesn't define the response fields. The Code Interpreter operation reads stdout, stderr and exit_code from this same endpoint, so the response likely includes them. Errors fail the node, or are emitted as {error: message} items if Continue On Fail is enabled.
Examples
Example 1: Run a Python script previously written to the sandbox and capture its output
Sandbox ID = {{$json.sandbox_id}}, Command = python3 /home/user/main.py, Additional Fields: Working Directory = /home/user, Timeout = 120
Example 2: Install a package as a specific user with an env variable
Command = pip install requests, Additional Fields: User = user, Environment Variables: PIP_DISABLE_PIP_VERSION_CHECK=1