# SpatialPack

> Verification for the 3D you ship. Drop a .glb and SpatialPack tests whether
> it survives Apple AR Quick Look, Safari's HTML `<model>` element and
> Shopify AR — then explains exactly what breaks, repairs it, and hands the
> file back a fraction of the size with the rendered before/after that shows
> what that cost. Evidence: 64/64 AI-generated models made AR-ready after
> one autocorrect pass — 25 of them carried readiness warnings, none had blockers,
> and all 25 were cleared — and a median 81% gzipped-size reduction across a
> 103-asset public benchmark vs ~21% for gltf-transform, with every asset where
> a free tool wins published at /benchmark.

SpatialPack runs in four surfaces:

- **Web analyzer** — drag-and-drop `.glb` or `.gltf` at the homepage
  and get a per-texture, per-mesh, per-material report plus a
  one-click optimize.
- **CLI** (`@spatialpack/cli`) — `spatialpack analyze`,
  `spatialpack optimize`, `spatialpack visual-diff`,
  `spatialpack recipe-search`. Same code path as the web app.
  Install: `npx -y @spatialpack/cli analyze model.glb` to run it once, or
  `npm i -g @spatialpack/cli` for the persistent `spatialpack` binary.
  The render-backed commands (`visual-diff`, `bake-imposter`,
  `usdz-render`, `--visual-diff-out`) additionally need a Playwright
  Chromium: `npx -p @spatialpack/cli playwright install chromium`.
  Plain `npx playwright install chromium` resolves a different Playwright
  and silently does nothing.
- **CI gating** — run the same CLI in a GitHub Actions step to gate pull
  requests on size budgets + a visual-diff against the pre-merge baseline.
- **MCP server** (`@spatialpack/mcp`) — exposes 29 tools (analyze,
  optimize, commerce-readiness, autocorrect, batch-autocorrect, similar-assets,
  glb-zip, dedup-textures, recipe-search, safety-gate, USDZ + USDC export, etc.) over Model Context Protocol
  for Claude Code, Cursor, and other AI coding agents. Install:
  `claude mcp add spatialpack -- npx -y @spatialpack/mcp`, or point any MCP
  client at `{"command": "npx", "args": ["-y", "@spatialpack/mcp"]}`. Listed
  in the official MCP Registry as `dev.spatialpack/mcp`.

Pricing model, stated precisely: the CLI, the SDK and the MCP server run
**entirely on the user's machine and are free and unmetered — every tool, no
API key, no account, no quota**. API keys and monthly quotas apply only to the
hosted surfaces: the web app at https://www.spatialpack.dev and the hosted API at
api.spatialpack.dev (including the MCP Streamable-HTTP transport).

## Core pages

- [Homepage and drag-drop analyzer](https://www.spatialpack.dev): primary surface. Drop
  a glTF/GLB to see the live readiness verdict plus texture/mesh/material
  analysis.
- [Free readiness check](https://www.spatialpack.dev/scorecard): drop a .glb, get a
  ready / warnings / not-ready verdict for Apple AR Quick Look and the
  web, with the exact blockers and a one-click autocorrect. Checking needs no
  sign-up; downloading the repaired file needs a free account.
- [Pricing](https://www.spatialpack.dev/pricing): Catalog Rescue (done for you — the first
  3 models are free with no card, then $15 per model with a 10-model minimum
  and $12 per model at 25+; free 3 first — you only pay once you have seen the work), a free tier (unlimited checking with no account; a monthly allowance
  of optimized downloads once signed in; CLI and MCP server free and unmetered
  when run locally), and Pro ($39/mo — every preset, unlimited hosted
  optimize + downloads, cohort-recipe auto-tune, LOD bundles + saliency
  decimation). The hosted pipeline emits GLB; USDZ export is
  `spatialpack export-usdz` in the CLI, free on every tier. A
  commerce-ready GLB + USDZ per SKU is Catalog Rescue's done-for-you
  deliverable, not a Pro subscription feature.
- [Benchmark leaderboard](https://www.spatialpack.dev/benchmark): SpatialPack vs
  gltf-transform vs gltfpack over 103 Khronos glTF-Sample-Assets, one
  identical render harness — losses published, nothing excluded.
- [3DAssetBench](https://www.spatialpack.dev/3dassetbench): the public per-asset corpus
  SpatialPack tunes against — 103 published entries with per-asset
  before/after and visual-diff results.
- [Agencies](https://www.spatialpack.dev/agencies): use cases for 3D content studios.
- [Compare](https://www.spatialpack.dev/compare): paired side-by-side visual diff of two
  GLBs (e.g. before/after optimization). Also batch mode at
  `/compare/batch`.
- [Onboarding](https://www.spatialpack.dev/onboarding): CLI + CI setup guide.
- [MCP server](https://www.spatialpack.dev/mcp): install snippets for Claude Code, Cursor,
  Claude Desktop, Continue.dev. 29 tools (analyze, optimize,
  commerce-readiness, autocorrect, batch-autocorrect, USDZ export/validate,
  recipe-search, dedup, cohort recipes, LOD bundles, more).

## What SpatialPack is good at

- **Apple-AR / web readiness verification**: one verdict (ready /
  warnings / not-ready) for AR Quick Look, Safari's `<model>` element
  and Shopify AR, plus the named reasons — including the silent USDZ
  failures `usdchecker` does not report.
- **One-pass repair (autocorrect)**: fixes the AR-blocking issues it
  found (floater prune, USDZ-safe material bake, optimize) and
  re-scores the asset.
- **glTF / GLB analyze + optimize**: per-mesh, per-material, per-texture
  byte attribution and pass-by-pass before/after stats.
- **Texture pipeline**: KTX2 (BasisU), AVIF, WebP — chosen per texture
  by content hash and budget, not a global setting.
- **Geometry compression**: meshopt (default) and Draco, with
  un-weld guards on normals so compression doesn't shatter shading.
- **Visual-diff regression gate**: every optimize records pre/post
  Playwright screenshots and reports SSIM/PSNR; visual regressions
  are first-class failures, not warnings.
- **Recipe-search**: autotune the pass combination per asset, search
  the Pareto frontier of (bytes, visual fidelity, decode time).
- **USDZ + USDC export**: for Apple AR. No proprietary intermediate
  formats — input and output are glTF/GLB or USD.

## What SpatialPack does NOT do

- Generate 3D models. SpatialPack is post-production / pipeline
  tooling; it optimizes assets you already have.
- Replace your DCC tool (Blender, Maya, Houdini). It runs after
  export, before delivery.
- Host your assets. Optimization output is yours to download; we
  don't lock files behind a CDN.
- Convert to FBX / OBJ / proprietary engine formats. glTF/GLB and
  USD only.

## Optional

- [npm package: @spatialpack/cli](https://www.npmjs.com/package/@spatialpack/cli):
  CLI install for local + CI use — `npx -y @spatialpack/cli`.
- [npm package: @spatialpack/mcp](https://www.npmjs.com/package/@spatialpack/mcp):
  MCP server — `npx -y @spatialpack/mcp`.
- [npm package: @spatialpack/sdk](https://www.npmjs.com/package/@spatialpack/sdk):
  programmatic Node wrapper — `npm i @spatialpack/sdk`.
- [npm package: @spatialpack/core](https://www.npmjs.com/package/@spatialpack/core):
  the low-level engine — `npm i @spatialpack/core`.
