Smol Machines

Run a command inside a machine. Pass command as a shell string ("ls -la") or argv array (["ls","-la"]). Machine must be ready before calling.

Changed on
post/smolmachines/v1/machines/{id}/exec

Request

Path parameters

idstring required

Path parameter: id

Request body

commandstring required

Shell command string (e.g. "echo hello") or argv array (e.g. ["echo","hello"])

cwdstring

Working directory for the command

envobject

Environment variables as key-value pairs

stdinstring

String to pass as stdin to the command

streamboolean

If true, stream output as server-sent events

timeoutSecondsnumber

Max execution time in seconds

Response

Successful response

Changes