---
name: warehouse-getting-started
description: Publish or update a game in the Internet Slop Warehouse through MCP. Use for a first HTML or Three.js game, or a remix.
---

# Publish a game to the Warehouse

## Publish HTML

A playable HTML file is the complete default workflow. Open it in a browser, check that the main interaction works and asset URLs load, then call the Warehouse MCP `publish` tool. If the tool isn't connected, use the command in the Warehouse Loading Dock. Follow the app's connect flow for a publish grant.

Send the full HTML string in `file.json.html`. A minimal request looks like this.

```json
{
  "record": {
    "id": "signal-sweep",
    "type": "game",
    "payload": {
      "title": "Signal Sweep",
      "description": "Recover five signals. Move with WASD.",
      "tags": ["arcade"]
    }
  },
  "file": {
    "json": {
      "html": "<!doctype html><html>…</html>"
    }
  }
}
```

Use a short lowercase ID with hyphens. To update a game in the same publisher's repo, reuse its ID. Use a new ID for a separate game. The tool returns the published record CID. Open the game when the catalog picks it up, and report the result. A publish tool success and a browser playtest are separate checks.

In a local Warehouse checkout, the existing wallet-based shortcut is `NETWORK=baseSepolia node publish.js path/to/game.html`. Keep using that if it's already the user's workflow.

## Add detail when the game needs it

- **Give credit.** For a remix add `record.payload.parent`. For included parts add `record.payload.uses`. Refs are `{ "publisher": "0x…", "repo": "internet-slop-warehouse", "id": "part-id" }`. Set the top-level `pin` to the fields you used, such as `["parent", "uses"]`, to pin their current versions. If the game was built against an older version, include that ref's exact CID and omit that field from `pin` so it stays pinned to the tested release.
- **Choose a cover image.** The Warehouse shows a screenshot of each game on its card, taken automatically. To pick your own, publish a 16:9 PNG, JPEG or WebP (about 1280×720) as an `asset` record, then set the game's `payload.thumbnail` to that asset's file CID (its `payload.src`). Your image replaces the automatic screenshot.
- **Store progress.** The Warehouse player supports `localStorage.getItem`, `setItem`, and `removeItem` for game saves. Saves stay in the current browser and survive updates to the same game ID. Fetch external assets from storage that allows cross-origin requests from the sandbox.
- **Link another game.** For a player-facing launch, add `payload.gameLinks` with an entry containing `name`, `label`, `publisher`, `repo`, `id`, `mode` (`pin` or `follow`), and `baseline: { cid, src }`. Use MCP `get` to find the target's public record CID and entrypoint file CID. Keep `gameLinks` out of `pin`. The link appears in Parts & Credits. Use `parent` as well if the game is a remix.
- **Name your TV controls.** Players can cast a game to a TV and use their phone as an Xbox-style controller. The phone sends ordinary key, mouse and standard-gamepad input, so keyboard games work as they are. By default the left stick holds WASD and the arrow keys, and clicking it toggles Shift (sprint). The right stick turns the camera with mouse movement, pointer lock is granted automatically, and clicking it sends C. The D-pad sends the arrow keys. A/B/X/Y send Space/E/Q/F, LB/RB send R/Tab, LT/RT send right-click/click, View sends Escape, and Menu sends Enter and clicks the middle of the screen. Any game that reads gamepads gets the standard button numbers too. To change or label controls, put this in the game's HTML: `<script type="application/warehouse-controller+json">{"stick":"wasd","look":false,"a":{"key":"Space","label":"Jump"},"rt":{"key":"Mouse0","label":"Fire"},"lb":null}</script>`. Controls are `a`, `b`, `x`, `y`, `lb`, `rb`, `lt`, `rt`, `ls`, `rs` (stick clicks), `view` and `menu`. Each takes a key, `{ "key", "label" }`, or `null` to grey it out. `stick` is `wasd`, `arrows`, `both` or `none`, and `dpad` is `arrows` or `none`. Keys are `KeyA`–`KeyZ`, `Digit0`–`Digit9`, the arrow keys, `Space`, `Enter`, `Escape`, `Tab`, `Backspace`, `ShiftLeft`, `ControlLeft`, `Mouse0` or `Mouse2`.
