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

aigpu

v0.3.1

Published

GPU animations for AI agents: a small, explicit WebGPU and WGSL runtime.

Readme

aigpu

AIGpu is an MIT-licensed TypeScript runtime for GPU animations for AI agents. It provides a small WebGPU API, typed WGSL modules, a deterministic mock, and an explicit bridge from orchestration state to pixels. It does not call a model, require an API key, or depend on a hosted control plane.

Install

pnpm add aigpu
pnpm add -D @webgpu/types

Agent animation

import { agentAnimation, clock, frameLoop, init, surface } from "aigpu";

const gpu = await init();
const output = surface(gpu, document.querySelector("canvas")!);
const animation = agentAnimation(gpu, {
  label: "researcher",
  initial: { status: "thinking", progress: 0.1 },
});
const time = clock(gpu);

frameLoop(gpu, (frame) => {
  animation.tick(time.time);
  frame.pass(output, animation.effect);
});

// Connect this to your own local model, queue, WebSocket, or event bus.
animation.set({ status: "working", progress: 0.72, activity: 0.9 });

The built-in states are idle, thinking, working, waiting, success, and error. progress and activity are normalized to [0, 1]; colors are RGBA tuples. animation.state is a defensive snapshot, reset() restores the initial state, and tick() accepts an external clock for deterministic renders.

Framework-agnostic mounting

Use mountAgentCanvas() or mountAgentCanvasSelector() for plain HTML/JavaScript. Optional lifecycle adapters are published separately as @aigpu/react, @aigpu/vue, and @aigpu/svelte; each delegates to the same ready/set/resize/destroy controller without adding a framework dependency to this package.

For multi-agent state, import createAgentStore, createAgentRegistry, recordAgentEvents, and replayAgentEvents from aigpu/tools. These utilities are UI-, GPU-, transport-, and provider-agnostic.

Core runtime

import { draw, frame, init, target } from "aigpu/node";

const gpu = await init();
const output = target(gpu, { size: [256, 256], format: "rgba8unorm" });
const triangle = draw(gpu, { shader: triangleShader });
frame(gpu, (current) => current.pass(output, triangle));
const pixels = await output.read();
gpu.dispose();

The same API runs in the browser, headless Node through open Dawn bindings, and aigpu/mock for deterministic tests.

WGSL and tooling

WGSL modules are plain text modules with typed imports and exports. Use @aigpu/wgsl/loader-vite or @aigpu/wgsl/loader-webpack with an open-source bundler, or use @aigpu/wgsl/runtime directly from Node. The bundled @aigpu/cli provides offline docs, shader checks, local example search/copy, diagnostics, and MCP stdio.

npx aigpu docs cat agentAnimation
npx aigpu examples search "webgpu"
npx aigpu examples pull agent-cockpit --out ./agent-cockpit
npx aigpu check ./agent.wgsl --require-validation
npx aigpu mcp

For the full reference, run npx aigpu docs find <query>. The catalog is read from the checkout's examples/ directory or AIGPU_EXAMPLES_DIR; no network request is made.

Development

pnpm install
pnpm build
pnpm typecheck
pnpm test:fast
pnpm check:skill-drift

See the repository CONTRIBUTING.md for the local workflow.

License and provenance

AIGpu is distributed under the MIT license. The repository preserves the original upstream copyright notice for the portions inherited from vgpu and identifies the fork changes in NOTICE.md.