| title |
Exec Command |
| description |
Run shell commands inside a browser VM |
Use exec_command to execute a command synchronously inside a browser VM. It returns decoded stdout, stderr, and the exit code. The command field is the executable; pass its arguments in args.
| Parameter |
Description |
session_id |
Browser session ID. Required. |
command |
Executable to run (e.g., cat, ls, curl). Required. |
args |
Arguments to pass to the command. |
cwd |
Working directory (absolute path). |
as_root |
Run with root privileges. |
timeout_sec |
Max execution time in seconds. |
{
"session_id": "browser_abc123",
"command": "curl",
"args": ["-I", "https://example.com"]
}