Skip to Content
SDK@cmdop/nodeOverview

@cmdop/node

TL;DR

The @cmdop/node package is a TypeScript-first Node.js SDK for remote machine automation. Install via npm install @cmdop/node. It provides the same core services as the Python SDK — terminal execution, file operations, AI agents, browser automation, structured data extraction, and file downloads — all communicating over gRPC with full type safety.

npm install @cmdop/node

How do I get started quickly?

Remote Connection (Cloud Relay)

import { CMDOPClient } from '@cmdop/node'; // Create a remote client using your API key for cloud relay connection const client = await CMDOPClient.remote({ apiKey: process.env.CMDOP_API_KEY, }); // Select the target machine and execute a shell command await client.terminal.setMachine('prod-server'); const { output } = await client.terminal.execute('uname -a'); console.log(output); // Always close the client when done to release gRPC resources await client.close();

Local Connection

// Connect directly to a local CMDOP agent without cloud relay const client = await CMDOPClient.local({ host: 'localhost', port: 50051, });

Auto-discover

// Discovers local agent via mDNS — no host/port configuration needed const client = await CMDOPClient.discover();

What services are available?

ServiceDescription
terminalExecute commands, stream output, manage sessions
filesRead, write, list, copy, move, delete files
agentRun AI tasks with Zod schema output
extractStructured data extraction with AI
browserHeadless browser automation
downloadDownload files from URLs with progress
Last updated on