npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@optimus-plt/sdk

v1.2.0

Published

Production-ready TypeScript SDK for Optimus platform

Readme

Optimus Platform SDK

enter image description here

Production-ready TypeScript SDK for the Optimus platform. Deploy applications, manage Kubernetes workloads, create workflows, run AI pipelines, and monitor deployments.

Installation


npm  install  @optimus-plt/sdk

Quick Start


import { Optimus } from  '@optimus-plt/sdk';

  

const  optimus = new  Optimus({

apiKey:  process.env.OPTIMUS_API_KEY

});

Features

  • Kubernetes Management - Deploy, scale, and manage containerized applications

  • Workflow Orchestration - Create and manage AI-native data pipelines

  • AI Integration - Run AI models and manage inference pipelines

  • Real-time Metrics - Monitor platform health and deployment performance

  • Integrations - Connect external services and APIs

  • TypeScript First - Full type safety and autocomplete support

  • Auto Retry - Built-in retry logic with exponential backoff

  • Rate Limiting - Automatic rate limit handling

Kubernetes Module

Deploy Application


const  deployment = await  optimus.kubernetes.deploy({

name:  'web-app',

image:  'node:20',

replicas:  3,

port:  3000,

env: {

NODE_ENV:  'production'

},

resources: {

cpu:  '500m',

memory:  '512Mi'

}

});

Scale Deployment


await  optimus.kubernetes.scale({

name:  'web-app',

replicas:  10

});

Get Deployment Status


const  status = await  optimus.kubernetes.status({

name:  'web-app'

});

  

console.log(status.replicas);

console.log(status.readyReplicas);

console.log(status.pods);

Delete Deployment


await  optimus.kubernetes.delete({

name:  'web-app'

});

List All Deployments


const  deployments = await  optimus.kubernetes.list();

Get Logs


const { logs } = await  optimus.kubernetes.logs({

name:  'web-app',

tail:  100

});

Workflow Module

Create Workflow


const  workflow = await  optimus.workflow.create({

name:  'data-pipeline',

steps: [

{ type:  'fetch', source:  'postgres' },

{ type:  'ai', model:  'optimus-ml' },

{ type:  'deploy' }

],

schedule:  '0 */6 * * *'

});

Get Workflow


const  workflow = await  optimus.workflow.get('workflow-id');

List Workflows


const  workflows = await  optimus.workflow.list();

Trigger Workflow


const { executionId } = await  optimus.workflow.trigger('workflow-id', {

custom:  'data'

});

Pause/Resume Workflow


await  optimus.workflow.pause('workflow-id');

await  optimus.workflow.resume('workflow-id');

Delete Workflow


await  optimus.workflow.delete('workflow-id');

AI Module

Run AI Model


const  result = await  optimus.ai.run({

model:  'optimus-ml',

input: {

text:  'analyze this data'

},

parameters: {

temperature:  0.7

}

});

  

console.log(result.output);

console.log(result.usage);

List Available Models


const  models = await  optimus.ai.models();

Get AI Result


const  result = await  optimus.ai.getResult('result-id');

Cancel AI Job


await  optimus.ai.cancel('result-id');

Metrics Module

Get Platform Metrics


const  metrics = await  optimus.metrics.get();

  

console.log(metrics.api.totalRequests);

console.log(metrics.deployments.healthy);

console.log(metrics.cluster.cpu.percentage);

console.log(metrics.performance.uptime);

Get Usage Metrics


const  usage = await  optimus.metrics.usage('24h');

  

console.log(usage.api.requests);

console.log(usage.compute.cpuHours);

console.log(usage.storage.gb);

Get Deployment Metrics


const  metrics = await  optimus.metrics.deployment('web-app');

  

console.log(metrics.cpu.current);

console.log(metrics.memory.average);

console.log(metrics.requests.total);

Integrations Module

Create Integration


const  integration = await  optimus.integrations.create({

name:  'slack-notifications',

type:  'slack',

config: {

webhookUrl:  'https://hooks.slack.com/...',

channel:  '#deployments'

}

});

List Integrations


const  integrations = await  optimus.integrations.list();

Update Integration


await  optimus.integrations.update('integration-id', {

config: {

channel:  '#alerts'

}

});

Test Integration


const { success, message } = await  optimus.integrations.test('integration-id');

Delete Integration


await  optimus.integrations.delete('integration-id');

Configuration

Custom Base URL


const  optimus = new  Optimus({

apiKey:  process.env.OPTIMUS_API_KEY,

baseUrl:  'https://custom.optimusplt.xyz'

});

Custom Timeout


const  optimus = new  Optimus({

apiKey:  process.env.OPTIMUS_API_KEY,

timeout:  60000  // 60 seconds

});

Custom Max Retries


const  optimus = new  Optimus({

apiKey:  process.env.OPTIMUS_API_KEY,

maxRetries:  5

});

Error Handling

The SDK provides typed error classes for better error handling:


import {

OptimusError,

AuthenticationError,

RateLimitError,

ValidationError,

NotFoundError,

NetworkError

} from  '@optimus-plt/sdk';

  

try {

await  optimus.kubernetes.deploy({...});

} catch (error) {

if (error  instanceof  AuthenticationError) {

console.error('Invalid API key');

} else  if (error  instanceof  RateLimitError) {

console.error('Rate limit exceeded, retry after:', error.retryAfter);

} else  if (error  instanceof  ValidationError) {

console.error('Invalid input:', error.message);

} else  if (error  instanceof  NotFoundError) {

console.error('Resource not found:', error.message);

} else  if (error  instanceof  NetworkError) {

console.error('Network error:', error.message);

}

}

TypeScript Support

Full TypeScript support with comprehensive type definitions:


import  type {

DeploymentStatus,

Workflow,

AIRunResult,

PlatformMetrics

} from  '@optimus-plt/sdk';

  

const  status: DeploymentStatus = await  optimus.kubernetes.status({

name:  'web-app'

});

Runtime Support

The SDK works across multiple JavaScript runtimes:

  • Node.js 16+

  • Bun

  • Deno

  • Edge Runtime (Cloudflare Workers, Vercel Edge)

License

MIT