Skip to Content
SDKOverview

SDK Overview

TL;DR

Cmdop SDK 2.0 provides async, typed Python and Node clients for bootstrap discovery, the authoritative machine snapshot, one-machine agent streaming, and durable machine messages.

Install

LanguagePackageInstall
Python 3.10+cmdoppip install cmdop
Node 18+@cmdop/sdknpm install @cmdop/sdk

Both packages bundle the Cmdop core for supported macOS, Linux, and Windows hosts. The client starts it on demand and communicates with it over stdio.

Supported hosts

Each package ships every supported host binary, so one install covers them all:

PlatformArchitectures
macOS (darwin)arm64, x64
Linuxarm64, x64
Windows (win32)x64

There is no separate Cmdop core download or install step, and the package does not fetch a runtime on first use.

Dependencies

Each package has exactly one runtime dependency: protobuf (>= 7.35.1) for Python, @bufbuild/protobuf (^2.12.0) for Node. Neither client pulls in an HTTP library or any other transitive framework.

Local-first setup

Use Client() with no arguments for the active local Cmdop setup. The core discovers the configured relay and matching credentials.

from cmdop import Client async with Client() as client: bootstrap = await client.system.bootstrap() snapshot = await client.machines.list() for machine in snapshot.machines: print(machine.machine_id, machine.display_name)

Use CMDOP_BASE_URL with CMDOP_TOKEN when you intentionally target a remote relay. See Configuration.

Shipped surface

CapabilityPython call
Bootstrap discoveryawait client.system.bootstrap()
Authoritative machine snapshotawait client.machines.list()
One-machine agent streamclient.machines.ask(machine_id, prompt, ...)
Durable machine historyawait client.machines.messages(machine_id, ...)

Python and Node expose the same capabilities. Python uses snake_case fields; Node uses camelCase fields and options.

Last updated on