Skip to Content
DocsAPI

Programmatic access

Cmdop is driven from code through two supported surfaces: a typed async SDK for Python and Node, and the CLI. Use the SDK to build Cmdop into an application, the CLI for scripts and CI, and MCP when the caller is an AI assistant. There is no separate REST API to integrate against.

TL;DR

Cmdop’s supported programmatic surfaces are the Python and Node SDK and the CLI. Use the SDK to build Cmdop into a program; use the CLI for scripts, CI, and one-shot operations. There is no separate REST API to integrate against.

Pick a surface

Both talk to a relay. Which relay, and with which credential, is the first thing to settle — see Authentication.

Which one do I want?

You want to…Use
Build Cmdop into an applicationThe SDK
Stream an agent’s output as it worksmachines.ask() — see Streaming
Get the current state of every machinemachines.list() — see Machines
Run something in CI or a shell scriptThe CLI
Operate a relay you runcmdop server — see Self-hosted relay
Let an AI assistant work across your machinesMCP, not an SDK

Reach for MCP rather than the SDK when the caller is an assistant. You register Cmdop once and the assistant gets a fleet interface without you writing a client — see MCP integration.

What the SDK ships as

Both packages bundle the Cmdop core for supported macOS, Linux, and Windows hosts and start it on demand. There is no separate runtime to download and no service to stand up first. Each package has exactly one runtime dependency.

pip install cmdop npm install @cmdop/sdk

See Getting started.

Where to go next

  • Authentication — which credential each surface uses.
  • Machines — read and operate machines from code.
  • Sessions — the durable conversation, and how to resume it.
  • Files — moving files to and from a machine.
  • Commands — running something on a machine.
  • Schedules — making work happen later.
  • Webhooks — reacting to events.

Common questions

Does Cmdop have a REST API?

No separate REST API is the supported integration surface today. Use the typed Python or Node SDK for applications, the CLI for scripts and CI, and MCP when the caller is an AI assistant.

Should I use the SDK or MCP?

Use the SDK when your program owns the integration and needs typed calls, streaming, and durable session history. Use MCP when Claude Code, Codex, or another assistant should operate machines through Cmdop’s fleet tools.

Does the SDK require a separate runtime?

No. The SDK packages bundle the Cmdop core for supported hosts and start it on demand. There is no separate daemon package or service to provision first.

Last updated on