Commands resource provides shell command execution capabilities for running system commands, scripts, and tools inside sandboxes.
Accessing Commands Resource
Running Commands
run()
Execute a shell command and wait for completion.
CommandResponse object
CommandResponse
TheCommandResponse object contains command execution results:
Basic Usage
Simple Commands
Timeouts
Set custom timeouts for long-running commands:Working Directory
Execute commands in a specific directory:Environment Variables
Pass environment variables for a specific command:Background Execution
Run commands in the background:Error Handling
Handle command execution errors:Examples
Package Installation
Related
- Sandbox Class - Main sandbox class
- Code Execution - Execute code
- File Operations - File management

