Skip to main content

Python SDK for CMDOP agent interaction

Project description

CMDOP

CMDOP

Your OS. Online.

Full access to your machines from anywhere. Not files — the whole system.

Your Code ──── Cloud Relay ──── Agent (on server)
                   │
       Outbound only, works through any NAT/firewall

Install

pip install cmdop

The package still imports as cmdop. The installed CLI entry point is cmdop-sdk (ssh, fleet, exec, tui) so it does not collide with the main CMDOP desktop/Go binary on PATH.

Quick Start

from cmdop import AsyncCMDOPClient

async with AsyncCMDOPClient.remote(api_key="cmdop_xxx") as client:
    # Terminal
    await client.terminal.set_machine("my-server")
    output, code = await client.terminal.execute("uname -a")

    # Files
    content = await client.files.read("/etc/hostname")
    await client.files.write("/tmp/config.json", b'{"key": "value"}')

    # AI Agent with typed output
    from pydantic import BaseModel

    class Health(BaseModel):
        cpu: float
        memory: float
        issues: list[str]

    await client.agent.set_machine("my-server")
    result = await client.agent.run("Check server health", output_model=Health)
    health: Health = result.data  # Typed!

    # Skills — run predefined AI workflows
    await client.skills.set_machine("my-server")
    skills = await client.skills.list()
    result = await client.skills.run("code-review", "Review the auth module")

Connection

from cmdop import CMDOPClient, AsyncCMDOPClient

# Remote (via cloud relay) - works through any NAT
client = CMDOPClient.remote(api_key="cmdop_xxx")

# Local (direct IPC to running agent)
client = CMDOPClient.local()

# Async
async with AsyncCMDOPClient.remote(api_key="cmdop_xxx") as client:
    ...

Documentation

Topic Description
Terminal Execute commands, stream output, SSH sessions
Auth Agent password authentication, session tokens
Files Read, write, list files on remote machines
Agent AI tasks with structured typed output
Skills Predefined AI workflows with tool access
Download Download files from URLs via remote server
SDKBaseModel Auto-cleaning Pydantic model for scraped data

Architecture

┌─────────────┐    gRPC/HTTP2    ┌─────────────┐    gRPC    ┌─────────┐
│   Python    │◀────────────────▶│   Cloud     │◀──────────▶│  Agent  │
│     SDK     │   Bidirectional  │   Relay     │  Outbound  │  (Go)   │
└─────────────┘                  └─────────────┘            └─────────┘
  • Agent makes outbound connection (no port forwarding)
  • SDK connects via gRPC (works through any firewall)
  • All services multiplexed over single connection

Comparison

Feature CMDOP Tailscale ngrok SSH
Terminal streaming gRPC VPN + SSH No Yes
File operations Built-in SFTP No SCP
AI agent Built-in No No No
Reusable AI skills Built-in No No No
NAT traversal Outbound WireGuard Outbound Port forward
Client install None VPN client None SSH client
Structured output Pydantic No No No

Requirements

  • Python 3.10+
  • CMDOP agent running locally or API key for remote access

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmdop-2026.4.7.2.tar.gz (206.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmdop-2026.4.7.2-py3-none-any.whl (345.0 kB view details)

Uploaded Python 3

File details

Details for the file cmdop-2026.4.7.2.tar.gz.

File metadata

  • Download URL: cmdop-2026.4.7.2.tar.gz
  • Upload date:
  • Size: 206.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cmdop-2026.4.7.2.tar.gz
Algorithm Hash digest
SHA256 61a3664b8803c7ba1ead22f97bbbcae3947eea16c51494b2e4eb072923433c77
MD5 2d372ca525816916bbb26b158f4410ba
BLAKE2b-256 785e896cbf03a55276cb86895ab7a235db60d66ebba4474d963abac7316a6049

See more details on using hashes here.

File details

Details for the file cmdop-2026.4.7.2-py3-none-any.whl.

File metadata

  • Download URL: cmdop-2026.4.7.2-py3-none-any.whl
  • Upload date:
  • Size: 345.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cmdop-2026.4.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0e686dd0d365fb3117744837a4a7f259bdeb42543f99b4c8cbc2104135bff87
MD5 8b753d72b3156f9a33e78b591f29a79f
BLAKE2b-256 1a13fb5cfa378442f00ddda71eb390ec4e5b3330cd9a162a33cb8c33240f5a46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page