MCPcopy Index your code
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%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cmdop — the official SDK for CMDOP

cmdop SDK — Python + Node

Programmatic access to your CMDOP fleet from Python and Node — manage machines, fleets, tunnels, and schedules, stream a machine's AI agent live, and drive the skills marketplace, all behind one typed client.

Install Import
Python pip install cmdop cmdop
Node npm i @cmdop/sdk @cmdop/sdk

Both clients ship in lockstep at the same version and expose the same surface — snake_case in Python, camelCase in Node.

📚 Full documentation: docs.cmdop.com — guides, the complete API reference, and streaming details. Product pages: SDK · Bots · Connect.

How it connects

How the CMDOP SDK connects your app to your machines

Your app uses the SDK to reach your machines — any hardware, anywhere — through a CMDOP server you choose (the public cloud, or one you self-host in your own network). The server links your fleet over gRPC and hosts Jarvis, a built-in AI that can drive those machines on its own.

Why it's easy to adopt

  • One install, zero dependencies. pip install cmdop / npm i @cmdop/sdk is everything — no native build step, no extra runtime, nothing fetched on first run.
  • Works anywhere, offline-ready. A single self-contained package runs the same on macOS, Linux, and Windows, including air-gapped hosts.
  • Typed end to end. Every resource and response is fully typed, with one clean async streaming API for live agent output.

Quick start

# pip install cmdop
from cmdop import Client

async with Client(token="...") as c:                 # or Client.from_env()
    page = await c.machines.list(presence="online")
    text = await c.machines.ask(machine_id, "uptime").collect()
// npm i @cmdop/sdk
import { Client } from "@cmdop/sdk";

const c = new Client({ token: "..." });              // or Client.fromEnv()
const page = await c.machines.list({ presence: "online" });
const text = await c.machines.ask(machineId, "uptime").collect();
await c.close();

What you can do

Namespace What
machines list / inspect machines, stream their AI agent (ask), read & manage conversations
fleets create and manage fleets, members, and machine membership
tunnels open / close / inspect tunnels
schedules create, trigger, and review scheduled jobs
keys issue and revoke access keys
skills browse, install, publish, and review skills from the marketplace

The headline feature is machines.ask() — stream a machine's AI agent as a clean async iterator of typed events. A connection PIN can be passed upfront (ask(…, pin="…"), the headless default) or answered reactively mid-stream, and dangerous plans surface as inline confirmation prompts.

Two planes, one client. machines / fleets / tunnels / schedules / keys use your relay token (CMDOP_TOKEN); the skills marketplace uses your platform API key (CMDOP_API_KEY). Set whichever you need — the client routes each call to the right plane.

Per-package docs

Full method reference, streaming details, environment variables, and error handling live in each package's README:

Links

License

MIT — see LICENSE.

Extension points exported contracts — how you extend this code

CursorList (Interface)
A cursor-paginated list (`MachineList`, `ScheduleRunList`).
node/src/resources/base.ts
OffsetList (Interface)
An offset-paginated list (`FleetList`/`MemberList`/`TunnelList`/...).
node/src/resources/base.ts
StreamSource (Interface)
(no doc) [1 implementers]
node/src/streaming.ts
ClientOptions (Interface)
(no doc)
node/src/client.ts
UnaryPending (Interface)
(no doc)
node/src/transport.ts

Core symbols most depended-on inside this repo

_unary
called by 49
python/src/cmdop/resources/base.py
resolve
called by 17
python/src/cmdop/config.py
get
called by 17
python/src/cmdop/resources/skills.py
_fleet
called by 17
python/src/cmdop/resources/base.py
close
called by 14
node/src/client.ts
aclose
called by 13
python/src/cmdop/client.py
resolveConfig
called by 13
node/src/config.ts
_methods
called by 8
python/scripts/print_surface.py

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