# vgpu

> vgpu is a small, composable WebGPU library for browser canvases, headless Node.js, and serverless runtimes, with documentation and tooling designed for coding agents.

Use the focused Markdown pages below first. Fetch the full export only when a task requires broad repository context.

## When to use vgpu

Use vgpu when a coding agent needs to:

- Render to a canvas in the browser or headless through Dawn in Node.js
- Import and compose .wgsl shader modules like TypeScript
- Discover and reuse verified vgpu examples through the CLI or read-only examples API
- Give coding agents direct MCP tools for vgpu documentation and verified examples

Agent workflow:

- Prefer `npx vgpu examples` for discovering and copying examples.
- Use the examples API without authentication; verify the published SHA-256 values before using artifacts.
- Prefer the public MCP server with automatic or modern protocol negotiation for agent-driven documentation and example discovery.
- Use `npx vgpu mcp --project-from-cwd` for an active project workspace or `npx vgpu mcp --output-dir /absolute/path` for a fixed project when a local agent needs downloads.
- When download is enabled, pass a relative `destination` beneath the configured output directory.

## Start here

- [Agent quickstart](https://vgpu.sh/docs/get-started/agents.md): Discover the versioned docs and tools available through the vgpu CLI.
- [Web quickstart](https://vgpu.sh/docs/get-started/web.md): Render to a browser canvas and configure WGSL imports.
- [Node.js quickstart](https://vgpu.sh/docs/get-started/node.md): Render headlessly through Dawn for scripts, servers, and tests.

## Reference

- [CLI reference](https://vgpu.sh/docs/cli.md): Commands for docs, examples, validation, diagnostics, and snapshots.
- [Library API reference](https://vgpu.sh/docs/reference.md): Package map and generated API topic pages.
- [Interactive examples](https://vgpu.sh/examples): Live WebGPU examples with read-only source views.
- [vgpu Examples API](https://vgpu.sh/docs/examples-api.md): Tokenless, read-only discovery for immutable example artifacts.

## Machine interfaces

- [Agent readiness manifest](https://vgpu.sh/agents.md): Product identity, CLI, package, and API discovery metadata.
- [OpenAPI 3.1 description](https://vgpu.sh/openapi.json): Typed examples API operations and response schemas.
- [API catalog](https://vgpu.sh/.well-known/api-catalog): RFC 9727 discovery for the examples API.
- [Markdown sitemap](https://vgpu.sh/sitemap.md): Complete page index.

## Optional

- [Complete documentation export](https://vgpu.sh/llms-full.txt): All documentation concatenated as Markdown for bulk ingestion.
- [XML sitemap](https://vgpu.sh/sitemap.xml): Canonical indexable URLs.
- [Source repository](https://github.com/vercel-labs/vgpu): Source, issues, releases, and contribution history.
- [vgpu on npm](https://www.npmjs.com/package/vgpu): Published package and CLI.
