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

@unityclaw/sdk

v1.2.1

Published

Node.js SDK for UnityClaw API - AI-powered image/video generation, media analysis, and more

Readme

@unityclaw/sdk

Node.js SDK for UnityClaw API - AI-powered image/video generation, media analysis, document processing, and more.

Installation

npm install @unityclaw/sdk

Quick Start

import { UnityClawClient } from '@unityclaw/sdk';

// Reads UNITYCLAW_API_KEY from environment variable
const client = new UnityClawClient();

// Or with explicit config
const client = new UnityClawClient({
  apiKey: 'your-api-key',
  baseUrl: 'https://unityclaw.com',
  taskDir: './tasks',
  timeout: 900000 // 15 minutes
});

// Generate image
const imageResult = await client.image.jimeng({
  prompt: 'A beautiful sunset over mountains',
  size: '2048x2048'
});

// Generate video (Kling)
const videoResult = await client.video.kling({
  prompt: 'A cat playing piano',
  model: 'kling-v2-6',
  aspect_ratio: '16:9',
  duration: '5'
});

// Translate document (local file will be auto-uploaded to get tmp_url)
const docResult = await client.document.translate({
  attachment: [{ path: './files/doc.pdf' }],
  source_language: { value: 'en', label: 'English' },
  target_language: { value: 'zh', label: 'Chinese' }
});

// Analyze media
const mediaResult = await client.media.analyze({
  url: [{ link: 'https://youtube.com/watch?v=...' }]
});

Configuration

Environment Variables

  • UNITYCLAW_API_KEY - Your UnityClaw API key
  • UNITYCLAW_BASE_URL - API base URL (optional, defaults to https://unityclaw.com)

CLI Configuration

Use the CLI to persist configuration:

# Install globally
npm install -g @unityclaw/sdk

# Set API key (stored in ~/.unityclaw/config.json)
unityclaw-sdk config set apiKey your-api-key

# Set custom base URL
unityclaw-sdk config set baseUrl https://custom.example.com

# View current configuration
unityclaw-sdk config

# Get a specific value
unityclaw-sdk config get apiKey

Configuration Priority

  1. Constructor parameters (highest priority)
  2. Environment variables
  3. Config file (~/.unityclaw/config.json)
  4. Default values (lowest priority)

Task Folders

Each SDK execution creates a task folder with:

  • logs/request.json - Request details
  • logs/response.json - API response
  • logs/execution.log - Execution log
  • attachments/ - Downloaded attachments (to avoid link expiration)

Default Task Directory

Tasks are stored in ~/Documents/tasks/ by default. You can override this:

const client = new UnityClawClient({
  taskDir: '/path/to/custom/tasks'
});

API Reference

Image Generation

// JiMeng
await client.image.jimeng({
  prompt: 'A sunset over mountains',
  size: '2048x2048'
});

// JiMeng (Doubao)
await client.image.jimeng({
  prompt: 'A futuristic city',
  model: 'v6.0'
});

Video Generation

// Kling
await client.video.kling({
  prompt: 'A dancing robot',
  model: 'kling-v1-5'
});

Document Processing

// Translate document
await client.document.translate({
  attachment: [{ tmp_url: 'https://...', name: 'doc.pdf' }],
  source_language: { value: 'en', label: 'English' },
  target_language: { value: 'zh', label: 'Chinese' }
});

// Convert document
await client.document.convert({
  attachment: [{ path: './files/doc.pdf' }],
  input_format: 'pdf',
  output_format: 'docx'
});

Media Analysis

const result = await client.media.analyze({
  url: [{ link: 'https://youtube.com/watch?v=...' }]
});

console.log(result.response.data?.summary);
console.log(result.response.data?.subtitle);

License

MIT