Quickstart

Quickstart

Sign in

ix login

Needs the ix CLI. The SDK uses this login. For CI and servers, see API keys.

The SDK

bun add @indexable/sdk

A machine

first.ts
import { Machine } from "@indexable/sdk"

await using machine = await Machine.create({
  image: "ix/debian:12",
  name: "first",
  lifetime: "ephemeral",
})

const result = await machine.exec(["hostname"], { check: true })
console.log(result.stdout)
bun first.ts

Machine.create returns once the machine answers. There is nothing to poll.

esc
  • Loading