Skip to content

commandoperator/cmdop-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cmdop SDK 2.0

Official typed SDK for the current Cmdop machine roster, agent stream, and durable messages. Python cmdop and Node @cmdop/sdk expose the same async v2 surface.

CMDOP SDK connects typed application clients through a secured relay to a healthy machine fleet

The SDK is the typed bridge from an application to the Cmdop relay: your Python or Node client discovers the active server, addresses the machine roster, and consumes the same streaming agent and durable-message contract without owning transport or process plumbing.

Language Install Guide
Python pip install cmdop python/README.md
Node npm install @cmdop/sdk node/README.md

Both packages include the cmdop-core process for supported macOS, Linux, and Windows hosts. The language client and core communicate using a private, length-delimited protobuf protocol over stdio.

Local quick start

Client() is the canonical configuration. It uses the active local Cmdop server and credentials, so application code does not need to collect setup fields that Cmdop already owns.

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)
import { Client } from "@cmdop/sdk";

const client = new Client();
try {
  const bootstrap = await client.system.bootstrap();
  const snapshot = await client.machines.list();
  for (const machine of snapshot.machines) {
    console.log(machine.machineId, machine.displayName);
  }
} finally {
  await client.close();
}

To select an explicit remote relay, provide CMDOP_BASE_URL and CMDOP_TOKEN, or their matching constructor fields. A remote URL without a token fails closed.

Public surface

Capability Python and Node
Bootstrap discovery client.system.bootstrap()
Authoritative machine snapshot client.machines.list()
One-machine agent stream client.machines.ask(...)
Durable machine history client.machines.messages(...)

Ask accepts typed session, attachment, engine, working-directory, project-root, model, and connection-PIN options. Supply PIN before streaming begins. The single-consumer stream yields event, error, and terminal done frames; collect() returns final text or raises AgentStreamError.

Development checks

buf lint core/proto
cd python && uv run pytest -q
cd ../node && pnpm install && pnpm exec vitest run

The capability matrix at core/parity/capabilities.v2.json is the public API authority. Generated proto outputs are never edited by hand.

Documentation: docs.cmdop.com · License: MIT

About

Programmatic access to your CMDOP fleet from Python and Node

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages