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

@clawvard/sdk

v0.12.0

Published

Clawvard unified service SDK — call every Clawvard service with one typed client.

Readme

@clawvard/sdk

Typed TypeScript client for Clawvard's non-LLM service layer — composed workflows, video / image / data jobs, third-party API integrations. Same sk-xxx key works for the OpenAI SDK against token.clawvard.school and for this SDK against clawvard.school.

pnpm add @clawvard/sdk
# or: npm i @clawvard/sdk / yarn add @clawvard/sdk

Quick start

import { Clawvard } from "@clawvard/sdk";

const cv = new Clawvard({ apiKey: "sk-xxx" });

// Local services (instant, charged per call)
const { hex } = await cv.text.hash({ text: "hello", algorithm: "sha256" });
const { dataUri } = await cv.url.qrCode({ text: "https://clawvard.school" });

// Long-running jobs (auto-poll, refundable on failure)
const result = await cv.video.removeSilence({ inputUrl: "https://…" })
  .onProgress((pct, note) => console.log(`${(pct * 100).toFixed(0)}% — ${note}`))
  .wait();

// Untyped escape hatch — call any registered service by id
const out = await cv.workflow.run<MyOutput>("my.service", input).wait();

For LLM calls (chat / embeddings / Whisper / DALL·E), point the OpenAI SDK at Token Relay with the same sk-xxx:

import { OpenAI } from "openai";
const ai = new OpenAI({
  apiKey:  "sk-xxx",
  baseURL: "https://token.clawvard.school/v1",
});
await ai.chat.completions.create({ model: "claude-opus-4-7", messages });

What's in the box

| Class | Purpose | |---|---| | Clawvard | Main client — composes generated namespaces with platform helpers | | Job<T> | Handle for long-running jobs — .wait(), .onProgress(cb), .cancel(), .id() | | HttpClient | Lower-level: .invoke(), .invokeJob(), raw .raw() — exposed via cv.client | | Generated namespaces | One per service group (cv.util.*, cv.text.*, cv.url.*, cv.video.*, …) | | cv.workflow.run(id, input) | Untyped invoker — works for any registered service without bumping the SDK | | cv.catalog() | Public catalog with pricing per service | | cv.usage() / cv.usageFor(g, m) | Caller's usage stats per service |

Per-call options

// Idempotency: same key → server returns the original outcome (no double-charge)
await cv.client.invoke("video", "render", input, {
  idempotencyKey: crypto.randomUUID(),
});

// Webhooks (job services only): platform POSTs the terminal state
//   to your URL with HMAC signature header `X-Clawvard-Signature`
await cv.client.invokeJob("video", "removeSilence", input, {
  idempotencyKey: "...",
  webhookUrl: "https://you.com/webhook",
});

Configuration

const cv = new Clawvard({
  apiKey: "sk-xxx",                     // Required for remote calls
  baseUrl: "https://clawvard.school",  // Default; override for staging
  pollIntervalMs: 2000,                 // Job polling cadence
  retry: { maxRetries: 3, baseDelayMs: 250 },
  fetch: customFetch,                   // For testing / edge runtimes
  plugins: [],                          // School / capability plugins
});

Auto-retry policy

  • GET: always retry on 5xx + network errors
  • POST/PUT/DELETE: only retry on 5xx if Idempotency-Key is set; always retry on network errors (request never reached the server)
  • 4xx: never retry (caller's bug)

Errors

import { ClawvardError, MissingApiKeyError } from "@clawvard/sdk";

try {
  await cv.video.render(input);
} catch (err) {
  if (err instanceof MissingApiKeyError) { /* config issue */ }
  // Server errors carry .status + .hint:
  // (err as Error & { status?: number; hint?: string }).status
}

Plugins

Capability packages can attach namespaces:

import { Clawvard } from "@clawvard/sdk";
import { mediaPlugin } from "@clawvard/sdk-media";

const cv = new Clawvard({
  apiKey: "sk-xxx",
  plugins: [mediaPlugin()],
});
await cv.video.extractFrames({ url, every: "1s" });

Resources

License

MIT