MCPcopy Create free account
hub / github.com/commandoperator/cmdop-sdk

github.com/commandoperator/cmdop-sdk @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
443 symbols 1,265 edges 66 files 109 documented · 25% updated 36d ago★ 43

Browse by type

Functions 325 Types & classes 118
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 240
Class 94
Function 85
Interface 20
Enum 4

Languages

Python51%
TypeScript49%

Modules by API surface

node/src/errors.ts32 symbols
node/src/transport.ts26 symbols
node/src/resources/fleets.ts24 symbols
python/tests/test_transport.py23 symbols
node/src/resources/skills.ts22 symbols
python/src/cmdop/_transport.py21 symbols
python/src/cmdop/resources/fleets.py20 symbols
python/tests/test_skills.py19 symbols
python/src/cmdop/errors.py18 symbols
node/src/resources/machines.ts17 symbols
python/src/cmdop/streaming.py16 symbols
node/src/resources/schedules.ts16 symbols

For agents

$ claude mcp add cmdop-sdk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page