Get the execution ID.
Get the devbox ID.
Wait for the execution to complete and return the result. If streaming callbacks were provided, also waits for all streams to finish.
Optionaloptions: RequestOptions<unknown> & {Request options with optional polling configuration
ExecutionResult with stdout, stderr, and exit code
const runloop = new RunloopSDK();
const devbox = runloop.devbox.fromId('devbox-123');
const execution = await devbox.cmd.execAsync('npm install');
// Other work while command runs...
const result = await execution.result();
if (result.success) {
console.log('Installation successful!');
console.log(await result.stdout());
} else {
console.error('Installation failed:', await result.stderr());
}
Get the current state of the execution.
Optionaloptions: RequestOptions<unknown>Kill the execution if it's still running.
Optionaloptions: RequestOptions<unknown>Request options
Promise that resolves when the execution is killed
Execution object for tracking async command execution with streaming support.
Remarks
Overview
The
Executionclass represents an asynchronous command execution on a devbox. It provides methods to track the execution state, wait for completion, and control the execution (e.g., kill it if needed).Quickstart
Executions are typically created via
devbox.cmd.execAsync():