Machines and lifecycle
A machine is either a sandbox (code and headless work) or a computer (a full GUI desktop). Lifecycle commands work on both.
Create a sandbox
miosa create [name] [flags] miosa create my-box --wait
miosa create ci-box --size small --template miosa-sandbox --ttl 2h --wait
miosa create my-box --env staging --setup-file ./setup.sh | Flag | Meaning |
|---|---|
--size string | micro, tiny, xs, small, quad, medium, large, xl (default small) |
--template string | Sandbox template, for example miosa-sandbox, nextjs, fastapi, hono (default miosa-sandbox) |
--env string | Environment the sandbox starts from (default: your default environment) |
--no-env | Pass nothing of yours to the sandbox (safe to hand to third parties) |
--setup-file string | Shell script (UTF-8, max 64KB) run in the background once the sandbox is ready |
--ttl string | Time to live: seconds, 90m, 2h or 2d (default: the plan’s) |
--idle-timeout string | Pause after this much inactivity: seconds, 15m, 1h |
--meta stringArray | Metadata, KEY=VALUE (repeatable) |
--workspace string | Workspace slug to assign the sandbox to |
--wait | Wait until the sandbox is ready for commands |
--wait-timeout duration | How long --wait may take (default 3m0s) |
List and inspect
miosa list --state running
miosa list --json | jq -r '.data[].name'
miosa info my-box # state, environment and setup status
miosa usage my-box # runtime, time left and estimated cost miosa list takes --state, --tag, --template, --search, --workspace, --workspace-id, --limit, --page, --ids (print only ids) and --errored (include sandboxes in the error state).
miosa info shows the pinned environment version (for example staging v1) and whether an upgrade is available.
Current sandbox
miosa use my-box # set the current sandbox
miosa use # show it
miosa exec -- npm test Anywhere a sandbox is expected you may give its name, its id, current or self (inside a sandbox).
Start, stop, pause, resume
miosa stop my-box # keep the disk
miosa pause my-box # keep disk and memory state
miosa resume my-box Extend, tag and wait
miosa extend my-box --for 2h # replace the time to live
miosa tag my-box add team=ci
miosa wait my-box --for running miosa extend --for accepts seconds, 90m, 2h or 2d, and replaces the old value rather than adding to it.
Fork and recover
miosa fork my-box copy-box # a running copy of a sandbox
miosa recover my-box # recover the disk into a NEW sandbox Destroy
miosa destroy my-box --yes
miosa destroy my-box other-box --yes is required when there is no terminal. Destroy is permanent.
Computers
Computers are the GUI machines. Every command that acts on one takes --computer where a machine argument appears.
| Command | What it does |
|---|---|
miosa computer create --size small | Create a computer (--size, --template, --env, --setup-file) |
miosa computer list | List computers |
miosa computer get <id> | Details and status |
miosa computer start / stop / restart | Power states |
miosa computer logs | Recent VM-level logs |
miosa computer ports / urls | Exposed ports and public URLs |
miosa computer auto-stop | Auto-stop settings |
miosa computer rm --yes | Destroy permanently |