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

@lvrged/video-factory

v0.2.0

Published

GPU infrastructure control for Pi: provision, deploy, run, monitor, and destroy GPU workloads on RunPod, Vast.ai, SaladCloud, Modal, Lambda, and Prime — with H3/Wan/Hunyuan video generation as the first-class workload. First-run onboarding, spend policy,

Downloads

364

Readme

video-factory

GPU infrastructure control for Pi. Install one package and your agent can provision, deploy, run, monitor, and destroy GPU workloads on whatever cloud infrastructure you have access to — with video generation (MiniMax H3, Wan 2.2, HunyuanVideo, Seedance) as the first-class workload.

pi install npm:@lvrged/video-factory

Then, inside Pi:

I need HunyuanVideo running on a GPU. Find the cheapest suitable provider, deploy it, expose an endpoint, test it, and make it available to me as a tool.

The agent figures out the rest — from docs/pricing/ for provider comparison, from the skills for the how-to, and from the ledger for cost control.

What you get

  • gpu_* tools — the normalized agent interface: gpu_setup, gpu_status, gpu_ensure, gpu_provision, gpu_register, gpu_run, gpu_job_finish, gpu_jobs, gpu_spend, gpu_destroy, gpu_model_add, gpu_workflow_add, gpu_policy.
  • /gpu commands — the human dashboard: setup, status, deploy, jobs, spend, stop, policy.
  • Skills — the knowledge: gpu-setup, gpu-ops, comfyui, model-deployment, video-models, provider-adapters.
  • Docs — pricing snapshots for RunPod, Vast.ai, Modal, Lambda, Prime (docs/pricing/) and per-provider playbooks (docs/providers/).
  • A persistent registry + job ledger in <project>/.pi/gpu/ — the agent restarts tomorrow and still knows H3 is deployed, what it costs, and which workflow version made which video.

Quickstart

  1. First run = onboarding. The extension greets you with /gpu onboard — the H3 production economics (Turbo 4-8 step workflow, provider lanes, cost per finished minute) and the first-deployment flow. Or just say: "set me up to make H3 videos cheaply" — the agent runs the gpu-onboarding skill.
  2. /gpu setup (or ask the agent to run gpu_setup) — detects provider CLIs, installs missing ones with your permission, checks auth.
  3. Ask for a model: "deploy h3 on the cheapest provider" — the agent runs gpu_ensure, searches live prices, provisions, installs ComfyUI + weights (with the optimized Turbo/Sage/INT8 workflow), health-checks with a test generation, and registers the deployment.
  4. Generate: "run h3-image-to-video on slide-042.png with 'slow push-in', 5 seconds"gpu_run opens a ledger entry; artifacts sync off the pod before shutdown.
  5. "How much did the last 100 videos cost?"gpu_spend answers from the ledger. "Regenerate everything from workflow v3"gpu_jobs finds them.

Provider coverage

| Provider | Interface | Kind | Notes | | --- | --- | --- | --- | | RunPod | runpodctl + API | managed instances | community (cheap) / secure pools, templates | | Vast.ai | vastai | marketplace | cheapest lane; search live before every deploy | | SaladCloud | REST API | containers on distributed GPUs | batch pricing — the economic outlier; bring your own image | | Modal | modal | serverless | zero idle cost, cold starts | | Lambda | REST API | premium on-demand | no egress fees; clusters need commitment | | Prime | prime | decentralized marketplace | dynamic pricing, spot, parallel bids |

New providers don't need a new release: if its CLI is agent-friendly, the provider-adapters skill teaches the agent how to operate it.

Using the same skills with Claude Code (no Pi)

The repo ships a parallel skill set in claude-skills/ for people who don't run Pi — same knowledge, adapted to bash-only operation (no gpu_* tools), sharing the same .pi/gpu JSON registry so Pi and Claude users can operate identical infrastructure:

cp -r claude-skills/* /path/to/your/project/.claude/skills/

Claude Code picks them up automatically (gpu-setup, gpu-onboarding, gpu-ops, comfyui, model-deployment, video-models, provider-adapters). The onboarding skill walks a new Claude user through the same H3 economics card.

Architecture

See docs/ARCHITECTURE.md (the core abstraction is the deployment, not the provider) and docs/REGISTRY.md (state file schemas).

                Pi Agent
                    │
          video-factory extension
                    │
           provider capability tables
        ┌──────────┼──────────┬──────────┐
        │          │          │          │
     RunPod     Vast.ai    Modal     Lambda/Prime
        │          │          │          │
     CLI/API    CLI/API     CLI        API

The spend policy (read this)

Extensions run arbitrary code — this one executes provider CLIs and spends real money. The trust boundary is .pi/gpu/policy.json:

{ "ceiling_per_job_usd": 5, "ceiling_daily_usd": 40, "ceiling_monthly_usd": 400, "confirm_above_usd": 1, "idle_shutdown_after_min": 30 }

Provisioning above confirm_above_usd always asks you in the UI, and ceilings cap what the agent may do without checking in. Adjust with gpu_policy or /gpu policy. Review this package's source before installing — it's yours.

Development

npm install          # dev deps (typescript, pi types)
npx tsc --noEmit     # typecheck
pi -e .              # load the extension from this dir in a scratch session

License

MIT