> ## Documentation Index
> Fetch the complete documentation index at: https://docs.run.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with run.cloud: install the CLI, sign in, start a remote iOS simulator or Android emulator, upload and install your app, then release the session.

Use the CLI for interactive terminal workflows or the TypeScript SDK for
API-key based applications, CI, and agents.

> [!TIP]
>
> Working in Claude, ChatGPT, Claude Code or Codex? Use the
> [MCP server](https://docs.run.cloud/integrations/mcp.md) instead: one URL, no install.

## Install the CLI

```bash theme={null}
curl -fsSL https://run.cloud/install | sh
```

This installs the CLI and starts sign-in. With Node already available:

```bash theme={null}
npm install -g runcloud
# or
npx runcloud ios create
```

See [Install the CLI](https://docs.run.cloud/cli/install.md) for pinned versions, install paths, and how
sign-in is skipped in CI, containers, and agent environments.

## Authenticate

CLI commands can use a saved browser-authenticated session:

```bash theme={null}
runcloud login
```

For CI and other non-interactive CLI use, provide both the API key and API URL:

```bash theme={null}
export RUN_CLOUD_API_KEY="rc_live_..."
export RUN_CLOUD_API_URL="https://api.run.cloud"
```

The TypeScript SDK uses an API key created in the [run.cloud dashboard](https://run.cloud/dashboard):

```bash theme={null}
export RUN_CLOUD_API_KEY="rc_live_..."
```

The SDK does not require `RUN_CLOUD_API_URL`; it defaults to the production API.
The CLI accepts either the saved `runcloud login` credential or the API key and
API URL together. It does not require both login and an API key. See the
[TypeScript SDK guide](https://docs.run.cloud/cli/typescript-sdk.md) for the walkthrough, or use the
[CLI reference](https://docs.run.cloud/cli/latest.md) and [SDK reference](https://docs.run.cloud/sdk/latest.md) for the complete
surface.

## Create a Linux sandbox

```bash Bash theme={null}
SANDBOX_ID=$(runcloud sandbox create --json | jq -r '.id')
trap 'runcloud sandbox rm "$SANDBOX_ID"' EXIT

runcloud sandbox exec "$SANDBOX_ID" "echo hello from the microVM"
```

```typescript TypeScript theme={null}
import { Client } from "@run-cloud/sdk";

const cloud = new Client();
const sandbox = await cloud.sandboxes.create({ image: "runcloud/agent-base" });

try {
  const result = await cloud.sandboxes.exec(sandbox.id, "echo hello from the microVM");
  console.log(result.exitCode, result.stdout);
} finally {
  await cloud.sandboxes.destroy(sandbox.id);
}
```

The CLI example extracts the returned sandbox ID and releases the sandbox when
the shell exits.

See [Linux sandboxes](https://docs.run.cloud/sandboxes.md) for sizing, snapshots, and the full API.

## Stop reinstalling dependencies on every boot

If your sandbox installs the same system packages or project dependencies every
time it starts, bake them into an OCI image and register that image once:

```bash theme={null}
runcloud image create --ref ghcr.io/acme/video-renderer:latest
runcloud sandbox create --image ghcr.io/acme/video-renderer:latest
```

`runcloud image create` converts the image to a bootable microVM filesystem
ahead of time and waits until it is ready. Later sandboxes reuse that prepared
image instead of repeating setup work on every boot. Publish the OCI image to a
registry first; local Dockerfile build contexts are not supported yet.

See [Custom images](https://docs.run.cloud/compute/images.md) for deterministic digest pins, CI
pre-baking, refreshes, and build status.

## Create a mobile simulator

```bash Bash theme={null}
runcloud ios create --json
runcloud android create --json
```

```typescript TypeScript theme={null}
import { Client } from "@run-cloud/sdk";

const cloud = new Client();
const ios = await cloud.ios.create({
  displayName: "iOS smoke",
  inactivityTimeout: "60s",
});
try {
  const android = await cloud.android.create({
    displayName: "Android smoke",
    inactivityTimeout: "60s",
  });
  try {
    await cloud.ios.tap(ios.id, { x: 0.5, y: 0.5 });
    await cloud.android.tap(android.id, { x: 0.5, y: 0.5 });
    console.log([ios.url, android.url]);
  } finally {
    await cloud.android.delete(android.id);
  }
} finally {
  await cloud.ios.delete(ios.id);
}
```

Create returns a signed browser URL, device id, lease id, and session id. For
CLI scripts, prefer JSON:

```bash theme={null}
SESSION_ID=$(runcloud ios create --json | jq -r '.id')
runcloud ios get "$SESSION_ID" --json
```

See [Run an iOS Simulator](https://docs.run.cloud/ios/run-simulator.md) and
[Run an Android Emulator](https://docs.run.cloud/android/run-emulator.md) for platform-specific command
references. See [Control a Simulator](https://docs.run.cloud/platform/simulator-interactions.md) for
taps, gestures, text, keys, buttons, screenshots, MP4 screen recordings, and other interactions. For
full runnable SDK source, see
[newly-app/run-cloud-examples/sdk-ios-android](https://github.com/newly-app/run-cloud-examples/tree/main/sdk-ios-android).

## Run a bundled demo

The CLI includes its maintained demos, so you can launch the default
eight-device mosaic from any directory without cloning a repo or installing
project dependencies:

```bash theme={null}
runcloud demo run --open
```

Run the live camera relay explicitly when you want to connect your webcam to
one broadcaster simulator and two receivers:

```bash theme={null}
runcloud demo run live-camera-relay --open
```

Both demos release their sessions automatically.

## Upload and install an app

Download checksum-verified onboarding apps with the CLI:

```bash theme={null}
runcloud sample download ios
runcloud ios create --install ./run-cloud-sample-ios.app.tar.gz

runcloud sample download android
runcloud android create --install ./run-cloud-sample-android.apk
```

Or download the same public fixtures with `curl`:

```bash theme={null}
curl -fLO https://run.cloud/downloads/run-cloud-sample-ios.app.tar.gz
curl -fLO https://run.cloud/downloads/run-cloud-sample-android.apk
```

The iOS download is a simulator-compatible `.app` bundle packaged as
`.tar.gz`. The Android download is a signed APK. Their filenames, sizes, and
SHA-256 checksums are published in the
[sample manifest](https://run.cloud/downloads/manifest.json).

To install your own build instead:

```bash theme={null}
runcloud ios create --install ./MyApp.tar.gz
```

`--install` accepts app artifacts for the target platform. iOS Simulator
reliability depends on a simulator-compatible build; Android emulator sessions
expect an APK or another Android-compatible artifact.

You can also upload once and reuse the asset:

```bash theme={null}
runcloud asset push ./MyApp.tar.gz -n my-app
runcloud ios create --install-asset my-app
runcloud android create --install-asset my-app
```

## Clean up

```bash Bash theme={null}
runcloud ios list
runcloud android list
runcloud ios delete <session-id>
runcloud android delete <session-id>
```

```typescript TypeScript theme={null}
import { Client } from "@run-cloud/sdk";

const cloud = new Client();
const iosSessionId = process.env.IOS_SESSION_ID;
const androidSessionId = process.env.ANDROID_SESSION_ID;
if (!iosSessionId || !androidSessionId) {
  throw new Error("IOS_SESSION_ID and ANDROID_SESSION_ID are required");
}

await cloud.ios.delete(iosSessionId);
await cloud.android.delete(androidSessionId);
```

Sessions are metered per second while active, and explicit release stops
billing at that second. If the organization reaches its run.cloud credit ceiling, active sessions are closed
automatically.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.