SDK Overview
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.
A hired worker normally runs inside the chat you assign it to, on the machine you joined. The SDK is for the times you want that same machine driven from your own application instead — list machines, ask one to run a task, and read back its durable message history, all from your own code rather than the console. See What is CMDOP? for the product model this sits on top of.
Install
| Language | Package | Install |
|---|---|---|
| Python 3.10+ | cmdop | pip install cmdop |
| Node 18+ | @cmdop/sdk | npm 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:
| Platform | Architectures |
|---|---|
macOS (darwin) | arm64, x64 |
| Linux | arm64, 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
| Capability | Python call |
|---|---|
| Bootstrap discovery | await client.system.bootstrap() |
| Authoritative machine snapshot | await client.machines.list() |
| One-machine agent stream | client.machines.ask(machine_id, prompt, ...) |
| Durable machine history | await client.machines.messages(machine_id, ...) |
Python and Node expose the same capabilities. Python uses snake_case fields; Node uses camelCase fields and options.