Skip to main content
This is the reference for the latest runcloud command-line interface. Install it from npm:
Use runcloud --version to print the installed version and runcloud <command> --help to inspect the exact options supported by that version.

Authentication

Use runcloud login --manual when the browser cannot return to the local callback automatically. runcloud account --json returns machine-readable output. runcloud whoami reads the stored credential without calling the API, so it answers which credential will be sent — including one supplied through RUN_CLOUD_API_KEY, which takes precedence over the saved file. It exits non-zero when there is no credential or the saved one has expired. Signing in again is runcloud login; it now offers to keep the existing session rather than replacing it silently.

Mobile sessions

The iOS and Android command groups share the same lifecycle: open-url also accepts --json. Its successful JSON contains ok, platform, sessionId, device, leaseId, and the exact, unnormalized url argument. Percent-encode spaces, and quote a URL that contains &, #, or other shell syntax:
See Open URLs and Deep Links for the Android equivalent, authentication, encoding rules, the direct REST request, expected platform behavior, and stable error codes. Media injection accepts --bundle-id, --name, and --json on both platforms:
Camera files must be MP4 or MOV. Microphone files may be AAC, M4A, MP3, MP4-audio, or WAV. Each success response includes the retained media asset; use runcloud asset delete <asset-id> after the source is no longer needed.

Xcode builds

xcode build supports project/workspace and shared-scheme selection, iOS and watchOS device and simulator SDKs, Debug or Release, XcodeGen, React Native and Expo preparation, optional Git initialization, safe build settings, manual or cloud signing, App Store upload and automatic build numbering, custom output upload, source include/exclude rules, additional files, and independent remote and client wait timeouts. Pass --no-wait or --detach to return the durable build ID without losing access to later status, logs, or output. See Build with Xcode for executable unsigned and signed examples, source packaging behavior, and intentional compatibility differences. ios create and android create accept: iOS sessions also support runcloud ios tunnel <id> and runcloud ios tunnel-status for connecting a local development service to the remote simulator. See Run an iOS Simulator for the full workflow. ios logs and android logs return the last 200 current-lease entries by default. Set --tail from 1 to 1,000, use --follow for new entries, and add --json for structured output. --tail and --follow are mutually exclusive.

Simulator controls

Every control command is available under both runcloud ios and runcloud android unless the capability table says otherwise: rotate accepts portrait, portrait_upside_down, landscape_left, and landscape_right. Current iPhone Simulator sessions support portrait and the two landscape values; requesting portrait_upside_down returns a structured, non-retryable unsupported_action error. Android Emulator sessions support all four values. Coordinates are inclusive from 0 to 1, with {0, 0} at the top-left of the current display. Every control accepts --timeout <milliseconds> (100 to 60,000, default 15,000), --request-id <id>, and --json. Successful JSON contains ok, requestId, sessionId, platform, action, status, timestamps, duration, and action-specific result data. Error JSON contains the same correlation fields when available and an error object with code, message, retryable, and optional details. Ctrl-C while a request is pending exits with code 130 and an interaction_cancelled JSON error. A timeout has status timed_out and code interaction_timeout; neither case releases the session. Screenshot capture uses the parallel screenshot_cancelled, screenshot_timeout, screenshot_transport_error, and screenshot_invalid_response codes. accessibility-tree accepts --timeout (20,000 milliseconds by default) and --json. Without --json, it prints an indented tree. Its JSON is the stable cross-platform schema documented in Read the Accessibility Tree. Ctrl-C returns accessibility_cancelled; transport, timeout, and invalid-schema failures use the corresponding accessibility_* code and never release the session. See Control a Simulator for all keys, buttons, gestures, platform differences, and copy-pasteable examples.

Screen recordings

The recording command group is identical for iOS and Android: Every command accepts --json. The download result contains the local path, byte size, content type, and SHA-256 digest without printing a signed storage URL. See Record a Simulator for lifecycle, retention, retry, release, SDK, and REST examples.

Assets and samples

asset also accepts the plural alias assets; sample accepts samples. Xcode outputs appear as immutable Assets and can be installed on any authorized simulator host without exposing build-host credentials.

Capabilities and mobile launches

Use the same launch idempotency key after a timeout or lost response. A retry returns the original operation and never consumes a second simulator. See Build with Xcode for complete capability, event, Asset, rebundle, and launch examples.

Sandboxes

Sandboxes are the single compute noun. Persistence and a stable public hostname are capabilities you turn on, not a separate product: sandbox create accepts: sandbox expose accepts --port <port> (default 3000), --name <name> for a first exposure (defaults to the sandbox name), and --reconcile to retry hostname routing. See Persistent Sandboxes for creation and routing examples.

Images

See Custom Images for the full workflow, including CI pre-baking.

Deprecated: runcloud box

Earlier releases modeled an exposed persistent sandbox as a separate box noun. Every runcloud box … command still works as a deprecated alias and prints a pointer to its sandbox equivalent: SSH config blocks written by older releases keep connecting: the box proxy transport remains supported, and re-running setup-ssh rewrites the block to the current form.

Demos and agent skills

Available demos are eight-device-mosaic and live-camera-relay. Pass --open to open the viewer automatically.

Automation

Commands that return structured data accept --json. A typical shell workflow captures IDs rather than copying placeholders:
See the CLI quickstart for complete runnable examples.