> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instructorphp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox api bubblewrap echo

## Overview

Minimal bubblewrap driver API check.

## Example

```php theme={null}
<?php
require 'examples/boot.php';

use Cognesy\Sandbox\Config\ExecutionPolicy;
use Cognesy\Sandbox\Sandbox;

$policy = ExecutionPolicy::in(__DIR__)
    ->withTimeout(10);

try {
    $result = Sandbox::bubblewrap($policy)
        ->execute(['sh', '-lc', 'echo "hello from bubblewrap sandbox"']);

    assert($result->exitCode() === 0, 'Bubblewrap echo should exit with code 0');
    echo "Exit: {$result->exitCode()}\n";
    echo $result->stdout();
} catch (Throwable $e) {
    echo "Bubblewrap sandbox unavailable: {$e->getMessage()}\n";
}
?>
```
