@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/nodeHow 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?
| Service | Description |
|---|---|
terminal | Execute commands, stream output, manage sessions |
files | Read, write, list, copy, move, delete files |
agent | Run AI tasks with Zod schema output |
extract | Structured data extraction with AI |
browser | Headless browser automation |
download | Download files from URLs with progress |
What should I read next?
Last updated on