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

@doufunao123/assetforge-sdk

v0.11.1

Published

TypeScript SDK for AssetForge

Readme

@doufunao123/assetforge-sdk

npm install @doufunao123/assetforge-sdk
import { AssetForge } from "@doufunao123/assetforge-sdk";

const forge = new AssetForge({
  apiKey: "agk_...",
  baseUrl: "https://asset.origingame.dev",
});

Generate

const image = await forge.image("cinematic sci-fi skyline", {
  size: "1536x1024",
  transparent: true,
});

const video = await forge.video({
  prompt: "slow camera pan",
  input: image.url!,
});

const music = await forge.music("uplifting synth theme", { duration: 30 });
const audio = await forge.audio("explosion sfx", { type: "sfx" });
const tts = await forge.tts("Hello world", { voice: "Cherry" });
const model = await forge.model3d("treasure chest");
const character = await forge.character("medieval knight in plate armor", {
  format: "fbx",
  polycount: 30000,
  pbr: true,
  hd_texture: true,
  pose_mode: "t-pose",
});
const prop = await forge.prop("ornate treasure chest", {
  format: "glb",
  pbr: true,
  hd_texture: true,
});
const sprite = await forge.sprite("knight walk cycle", {
  animation_type: "walk",
  duration: 2,
});
const world = await forge.world("misty medieval village");
const text = await forge.text("Write a short fantasy intro");
const raw = await forge.generate({
  asset_type: "image",
  prompt: "minimal icon set",
  size: "1024x1024",
  transparent: true,
});

Jobs

const jobs = await forge.job.list({ status: "completed", limit: 20 });
const job = await forge.job.status("job-id");
await forge.job.cancel("job-id");

Async Submit + Wait

const ack = await forge.image("cinematic sci-fi skyline", {
  async: true,
  idempotencyKey: "skyline-001",
});

const completed = await forge.job.wait(ack.job_id, {
  timeoutMs: 120_000,
  intervalMs: 1_000,
});

console.log(completed.output_url);

async: true sends Prefer: respond-async; idempotencyKey is forwarded as the Idempotency-Key header. job.wait() uses authenticated fetch-based SSE first and falls back to polling when SSE is unavailable.

Stream

const subscription = forge.stream.job("job-id", (event) => {
  console.log(event.kind, event.status, event.progress?.progress);
});

// Later:
subscription.close();
import { subscribeAllJobs } from "@doufunao123/assetforge-sdk";

const allJobs = subscribeAllJobs(
  (event) => console.log(event.job_id, event.status),
  { apiKey: "agk_..." }
);

Upload + Assets

const uploaded = await forge.upload(file);
const files = await forge.assets.list();
await forge.assets.delete(uploaded.filename);

Library

const items = await forge.library.search({
  query: "sword",
  mode: "hybrid",
  style: "pixel",
});

const ingest = await forge.library.ingest({
  source: "manual",
  asset_type: "image",
  file_url: "https://example.com/fire-sword.png",
  name: "Fire Sword",
  user_tags: ["weapon", "fire"],
});

const ingested = await forge.library.ingestWait(ingest.ingest_job_id);

await forge.library.packsInstall({
  source: "builtin",
  id: "hello-world",
});

const packs = await forge.library.packs();

await forge.library.add({
  name: "Fire Sword",
  asset_type: "image",
  file_url: "https://example.com/fire-sword.png",
});

Providers

const providers = await forge.providers.list();
const health = await forge.providers.health();
const gemini = await forge.providers.health("gemini_image");

Process

const processed = await forge.process({
  input: image.url!,
  operations: [
    { op: "smart_crop", mode: "tightest" },
    { op: "resize", width: 512, height: 512 },
  ],
});

const rigged = await forge.process3d({
  task_id: "meshy-task-id",
  operation: "rig",
});

Voice

await forge.voice.clone({
  audio_base64: "...",
  audio_mime: "audio/mpeg",
  preview_text: "Welcome back.",
  name: "hero",
});

const voiceAck = await forge.voice.clone(
  {
    audio_base64: "...",
    audio_mime: "audio/mpeg",
    preview_text: "Welcome back.",
    name: "hero",
  },
  { async: true }
);

await forge.voice.design({
  voice_prompt: "warm documentary narrator",
  preview_text: "Welcome to AssetForge.",
  name: "narrator",
});

const voices = await forge.voice.list({ type: "vc" });

Errors

import { AssetForgeError } from "@doufunao123/assetforge-sdk";

try {
  await forge.image("...");
} catch (error) {
  const e = error as AssetForgeError;
  console.error(e.code, e.message);
}