run-once
Execute a single command on a temporary virtual machine created from a specified image, then automatically delete the machine even if the command times out.
Instructions
Create a throwaway machine from an image, run one command, and delete the machine even on timeout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Environment variables | |
| cpus | No | ||
| image | Yes | ||
| stdin | No | ||
| target | No | Which fleet to talk to. local is smolvm serve on this host; cloud is smol cloud at SMOL_CLOUD_URL. | local |
| command | Yes | argv array, or a string run with sh -c | |
| network | No | Egress mode. Default open, except run-once on cloud which is blocked. Local: a blocked machine whose image still has to be pulled from a registry is refused by the API; pass open or an allow-list for that create. Cloud: blocked is sent as an allow-list of an unroutable range. | |
| workdir | No | ||
| memoryMb | No | ||
| allowCidrs | No | Egress allow-list of CIDR ranges. Overrides network. | |
| allowHosts | No | Egress allow-list of hostnames. Overrides network. Local: sent as allowedHosts. Cloud: sent inside the same cidrs list the published schema names, alongside allowCidrs. | |
| timeoutSecs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stderr | Yes | ||
| stdout | Yes | ||
| machine | Yes | ||
| exitCode | Yes | ||
| timedOut | Yes | ||
| truncated | Yes |