import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.browsers.process.exec('id', { command: 'command' });
console.log(response.duration_ms);{
"exit_code": 123,
"stdout_b64": "<string>",
"stderr_b64": "<string>",
"duration_ms": 123
}import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.browsers.process.exec('id', { command: 'command' });
console.log(response.duration_ms);{
"exit_code": 123,
"stdout_b64": "<string>",
"stderr_b64": "<string>",
"duration_ms": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Browser session ID
Request to execute a command synchronously.
Executable or shell command to run.
Command arguments.
Working directory (absolute path) to run the command in.
^/.*Environment variables to set for the process.
Show child attributes
Run the process as this user.
Run the process with root privileges.
Maximum execution time in seconds.