🎉 Cmdop v1.0 is here! Download now →
Skip to Content
DocsSDKOverview

SDK

Official Cmdop SDK for building integrations and custom applications.

Packages

PackageDescription
@cmdop/sdkCore SDK for Node.js
@cmdop/reactReact hooks and components

Features

  • Type-safe - Full TypeScript support
  • Real-time - WebSocket subscriptions
  • Cross-platform - Node.js and browser support

Quick Start

Installation

npm install @cmdop/sdk

Basic Usage

import { Cmdop } from '@cmdop/sdk'; const client = new Cmdop({ apiKey: 'your-api-key', }); // List machines const machines = await client.machines.list(); // Execute command const result = await client.commands.exec( machineId, 'ls -la' );

React Usage

import { CmdopProvider, useMachines } from '@cmdop/react'; function App() { return ( <CmdopProvider apiKey="your-api-key"> <MachineList /> </CmdopProvider> ); } function MachineList() { const { machines, loading } = useMachines(); if (loading) return <div>Loading...</div>; return ( <ul> {machines.map(m => ( <li key={m.id}>{m.name}</li> ))} </ul> ); }

Next Steps


SDK Overview | Cmdop