SDKs & Libraries

Native SDKs for every major language. Install in seconds, deploy your first workload in minutes. Full type safety, async support, and carbon-aware scheduling built in.

Language SDKs

Installation

npm install @harchos/sdk
Package: @harchos/sdk|Version: 0.1.0|Stable
quickstart.ts
import { HarchOS } from '@harchos/sdk';

// Initialize client with sovereign defaults
const client = await HarchOS.create({
  apiKey: 'hrch_live_sk_abc123',
  region: 'morocco',
  sovereignty: 'strict',
  carbonAware: true,
});

// Deploy a compute workload
const workload = await client.compute.createWorkload({
  name: 'training-run-001',
  gpu: 'H100',
  count: 8,
  hub: 'dakhla',
  schedule: 'carbon-optimal',
});

// Stream real-time metrics via WebSocket
for await (const event of workload.streamMetrics()) {
  console.log(`GPU Util: ${event.gpuUtil}% | Power: ${event.powerW}W`);
}

Key Features

Full TypeScript types with zero any
Works in Node.js 18+ and modern browsers
WebSocket streaming with async iterators
Tree-shakeable ESM build
Built-in retry and circuit breaker
React hooks package: @harchos/react

HarchOS CLI

The HarchOS command-line interface for deployment, management, and monitoring. Available for macOS, Linux, and Windows.

macOS

brew install harchcorp/tap/harchos

Linux

curl -fsSL https://get.harchos.io | sh

Windows

winget install HarchCorp.HarchOS

Command Reference

harchos auth loginAuthenticate with your HarchOS account
harchos workloads listList all compute workloads
harchos workloads deploy --gpu H100 --count 8Deploy a new compute workload
harchos workloads scale <id> --count 16Scale a running workload
harchos models deploy <model> --hub dakhlaDeploy a model to an inference endpoint
harchos hubs statusCheck status of all compute hubs
harchos energy reportView energy consumption and carbon metrics
harchos logs tail <workload-id>Stream logs from a workload

SDK Comparison

FeaturePythonTypeScriptGoRust
REST API Support
gRPC Streaming
WebSocket Events
Async/Await
Type SafetyPartial
Retry Logic
Carbon-Aware Scheduling
Sovereignty Engine
Framework IntegrationPyTorch/JAXReact/Next.js
Package Managerpipnpmgo modcargo