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

> ## Agent Instructions
> To set up offstage cloud from a coding agent, read https://api.offstage.cloud/SKILL.md and follow it. The whole API guide is one file at https://api.offstage.cloud/llms.txt.

# Quickstart

> Run your first command on a real Mac in a few minutes.

**1. Get an API key**

[Create an account](https://console.offstage.cloud/sign-up) and get \$5 in free credit, with no credit card needed. Create a key under **API keys**. It starts with `sk_offstage_` and is shown once.

```bash theme={null}
export OFFSTAGE_API_KEY=sk_offstage_...
```

**2. Install the SDK**

Install the current SDK from its versioned tarball; the npm registry release is older. It is TypeScript compiled to ESM, with no runtime dependencies, and runs on Node 18+, Bun and Deno.

```bash theme={null}
npm install https://api.offstage.cloud/sdk/offstage-cloud-0.3.4.tgz
```

**3. Run something on a Mac**

Create a sandbox, run commands, write a file, then kill it. A sandbox bills by the second until it is killed, so kill it in a `finally`.

```js first-mac.mjs theme={null}
import { Sandbox } from "offstage-cloud"

const sandbox = await Sandbox.create({ timeoutMs: 10 * 60_000 })
try {
  const version = await sandbox.commands.run("sw_vers -productVersion")
  console.log("macOS", version.stdout.trim(), "exit", version.exitCode)

  await sandbox.files.write("hello.swift", 'print("hello from a mac")')
  const run = await sandbox.commands.run("swift hello.swift")
  console.log(run.stdout, run.exitCode) // a non-zero exit does not throw
} finally {
  await sandbox.kill()
}
```

```bash theme={null}
node first-mac.mjs
```

## Next

> [card] [Sandboxes](https://offstage.cloud/docs/sandboxes.md)
>
> Sessions, files, timeouts, screenshots and goals.

> [card] [Set up from your agent](https://offstage.cloud/docs/agents.md)
>
> Let Claude Code, Codex or Cursor drive the Mac for you.


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