Docs · SDKs

SDKs

One SDK for Macs and phones, with the same calls in JavaScript and Python: start one for each of your users, run commands and builds, show it to them, and hear when it ends.

JavaScript and TypeScript

Terminal
npm install @nomac/sdk

No dependencies. It runs wherever fetch and Web Crypto do: Node 20 and later, Bun, Deno and workers, with types. Its README on npm lists every call.

Python

Terminal
pip install nomac

The same calls in snake_case, sync (NoMac) and async (AsyncNoMac), typed, with one dependency, httpx. Python 3.10 and later. Its README on PyPI lists every call.

A Mac for your user

import { NoMac } from "@nomac/sdk";

const nomac = new NoMac(); // NOMAC_API_KEY
const mac = await nomac.macs.start({ label: user.id, reuse: true });
await mac.waitUntilReady();
const { stdout } = await mac.run("xcodebuild -version");

const { url } = await mac.viewLink({ control: true }); // for your user
const { token } = await mac.token();                   // for their agent

Commands with their whole output, files of any size, the screen and input, a desktop link with no sign-in, and a token for that Mac only. See macOS Platform.

A phone for your user

import { NoMac } from "@nomac/sdk";

const nomac = new NoMac(); // NOMAC_API_KEY
const phone = await nomac.phones.start({ label: user.id, reuse: true });
await phone.waitUntilReady();
const { url } = await phone.viewLink({ control: true }); // for your user

An iPhone or iPad Simulator in seconds: build and run an app, read and tap its screen by label, save its state. See Simulator Platform.

The phone in your page

Terminal
npm install @nomac/phone

embedPhone, and NomacPhone for React, show a phone's view link with its events. See Show the phone.

From @nomac/simulator

@nomac/simulator is deprecated: new NoMacSimulator() is new NoMac() from @nomac/sdk, with the same phones. Python's nomac 1.0 adds Macs beside its phones. In both, webhooks and deleting a user's data use the account-wide routes, and a webhook made without events takes every kind.

Anything else

The REST API takes the account's key, or a Mac's or phone's token, as Authorization: Bearer. Agents use NoMac over MCP: see Connect your agent.