SDKsOverview

SDKs

CiderStack Fleet provides official SDKs for JavaScript/TypeScript and Python to manage macOS virtual machines programmatically.

Both SDKs wrap the Fleet JSON-RPC API with idiomatic interfaces, giving you full control over VMs, snapshots, templates, shared folders, images, and fleet-wide operations from your own scripts and applications.

At a glance

JavaScript / TypeScriptPython
Package@ciderstack/fleet-sdkciderstack
Version0.1.00.1.0
RuntimeNode.js 18+, Bun, DenoPython 3.8+
Async modelasync/await (Promises)Synchronous
HTTP clientNative fetchrequests
LicenseApache-2.0MIT
Methods4444

Both SDKs have 1-to-1 feature parity with each other and with the CLI (cider) for all VM, snapshot, template, shared folder, and fleet operations.


Installation

JavaScript / TypeScript

npm install @ciderstack/fleet-sdk

Or with other package managers:

yarn add @ciderstack/fleet-sdk
bun add @ciderstack/fleet-sdk

Requires Node.js 18+ (uses native fetch, crypto.randomUUID, crypto.subtle).

Python

pip install ciderstack

If you need pairing support (not required for API token auth):

pip install ciderstack[pairing]

Requires Python 3.8+ and requests >= 2.28.0.


Quick start

JavaScript

import { FleetClient } from "@ciderstack/fleet-sdk";
 
const client = new FleetClient({
  host: "192.168.1.100",
  apiToken: "csk_your_token_here",
});
 
// List VMs
const vms = await client.listVMs();
for (const vm of vms) {
  console.log(`${vm.name}: ${vm.state}`);
}
 
// Start a VM
await client.startVM(vms[0].id);
 
// Execute a command
const result = await client.execCommand(vms[0].id, "uname -a", {
  sshUser: "admin",
  sshPassword: "password",
});
console.log(result.stdout);

Python

from ciderstack import FleetClient
 
client = FleetClient("192.168.1.100", api_token="csk_your_token_here")
 
# List VMs
vms = client.list_vms()
for vm in vms:
    print(f"{vm.name}: {vm.state}")
 
# Start a VM
client.start_vm(vms[0].id)
 
# Execute a command
result = client.exec_command(
    vms[0].id, "uname -a",
    ssh_user="admin", ssh_password="password",
)
print(result.stdout)

Key differences between SDKs

AspectJavaScriptPython
Async modelasync/await (Promises)Synchronous calls
Timeout unitsMillisecondsSeconds
VM state enumVMState.RunningVMState.RUNNING
Naming conventioncamelCasesnake_case
Fleet overview returnTyped FleetOverview objectRaw dict
Shared folders returnTyped SharedFolder[]List[dict]
Pairing returnPairingCredentials objectdict
Pairing cryptoBuilt-in Web Crypto APIcryptography package
Null valuesnullNone

See also