Skip to content
Browse documentation

Publish your game

Build your game, upload its browser files, and share the live link with players.

View Markdown
On this page

1. Prepare the game listing

Use spawnkit.config.ts or spawnkit.config.json at the project root for the title, description, genre, dimension, and media paths. New kits detect either format. Update your chosen file before building; the build creates spawnkit.config.json in dist/.

Place a cover at a path such as public/media/cover.webp and set coverPath to media/cover.webp. Paths in the listing are relative to the build root, with no leading slash and no public/ prefix.

ItemRequirement
Title1–64 characters.
Description10–500 characters. Explain what the player does.
CoverPNG, JPEG, WebP, or SVG; up to 1 MiB.
Optional trailerMP4 or WebM; up to 2 MiB and 60 seconds. Start on gameplay.
Optional game factsObjective, controls, supported devices, and creator name.

Keep one configuration source; duplicate formats cause a build error. You can also review and edit the listing in the dashboard upload flow.

2. Create a production build

From your game project, run the checks and build command. Use pnpm test too if the project includes that script.

Terminal · inside your game folder
pnpm lint
pnpm build
pnpm preview

Open the preview URL and play the game. Check controls, artwork, audio, and resizing. When you are ready, stop preview with Ctrl+C.

Create a ZIP of the contents of dist/. index.html must sit at the top level of the ZIP, alongside the game's assets. Do not zip the outer dist folder or your whole source project. Use the PowerShell or Bash packaging examples.

Expected ZIP layout
my-game.zip
├── index.html
├── assets/
├── media/
└── spawnkit.config.json

3. Upload and deploy

Open Upload game and sign in if prompted. This creates a new hosted project. To replace a release of an existing project, see Publishing an update.

  1. In Game files, choose your ZIP. If it includes a listing, the form imports its details and media.
  2. In Details, check the title, description, genre, and 2D or 3D selection.
  3. In Media, review your cover and optional gameplay clip.
  4. Choose Deploy game and follow the build output.
  5. Once deployment succeeds, open the returned game URL and test the hosted game.

The expanded browser build must stay below 20 MiB and contain fewer than 1,996 files. The ZIP selection limit is 64 MiB, but that does not increase the expanded deployment limit.

Fix a failed upload

ProblemNext step
Missing index.htmlZip the contents of dist/, not the containing folder.
Archive too largeReduce large textures, audio, or unused files, rebuild, and create a fresh ZIP.
Cover or trailer rejectedCheck its file type and size. Replace it in the Media step.
Build failedRead the build output for the first actionable error. Fix it, rebuild locally, and retry.
Game deploys with a media warningOpen the game to verify it works. Correct the rejected listing media before relying on its preview.

Deploy source with @spawnkit/cli

The CLI uploads source, rather than a browser-build ZIP. Keep package.json, game.config.json, and pnpm-lock.yaml in the project. Hosted builds install public npm dependencies with lifecycle scripts disabled; the build itself runs without external network access.

Terminal · authorize, review, and deploy
pnpm dlx @spawnkit/cli login --site https://spawnkit.cloud
pnpm dlx @spawnkit/cli auth status --json
pnpm dlx @spawnkit/cli link --project YOUR_PROJECT_ID
pnpm dlx @spawnkit/cli deploy --env production --dry-run --json
pnpm dlx @spawnkit/cli deploy --env production --yes --json

Replace YOUR_PROJECT_ID with the project you intend to update. Review the dry run before running the final command. Source and built artifacts are limited to 2,000 files and 20 MiB.

Resume an interrupted deployment

With the CLI, Ctrl+C stops watching the output without cancelling the remote deployment. Use the returned deployment and project IDs to inspect it or reconnect to logs.

Terminal · inspect and resume
pnpm dlx @spawnkit/cli status DEPLOYMENT_ID --project YOUR_PROJECT_ID --json
pnpm dlx @spawnkit/cli logs DEPLOYMENT_ID --project YOUR_PROJECT_ID --follow --json

Inspect status before submitting another build. When retrying the same operation, keep its --request-id. Failed, cancelled, and superseded deployments exit nonzero. Rollback restores retained artifacts; it does not undo database migrations.

For automation, --json writes the final result to stdout and build progress to stderr. Failures return a JSON error on stderr and exit nonzero. Use the returned IDs and statuses rather than parsing progress messages.

Need a hand? Get support

Explore the guides

Build your first game

Download a standalone game kit, run it locally, and make your first change.

Create and build a game with @spawnkit/cli

Start in a parent folder, generate your game, then run every development command inside the new game folder.

Upload an existing browser game

Upload a self-contained browser build. Your original source, engine, and build tools can stay as they are.

Publish your game

The dashboard accepts a ZIP of your built game. You will need an account to deploy it.

Use the SpawnKit dashboard

The dashboard manages your hosted games. Your editor or AI agent remains where you change and build your game source.

Make a browser game with Codex

Use Codex with a standalone TypeScript game kit. Start with a working scene and improve it one playable change at a time.

Make a browser game with Claude Code

Use Claude Code with a standalone TypeScript game kit. Start with a working scene and improve it one playable change at a time.

Make a browser game with Cursor

Use Cursor with a standalone TypeScript game kit. Start with a working scene and improve it one playable change at a time.

Extend your game

Find the right files, make a focused change, and check it in a playable build.

A complete publishing example

Follow a small example from editable source to a ZIP with index.html at its root. Use your own game title, description, and artwork.

Add tools to an existing game

Keep a recoverable baseline, inspect the proposed changes, and verify one addition at a time.

Test and debug your game

Combine automated checks with a short playthrough of the production build. A successful build alone does not verify gameplay.

Project structure and configuration

Your downloaded kit is a standalone TypeScript project. Its files belong to you and do not depend on the SpawnKit repository.

SpawnKit CLI reference

A command-by-command reference to the implemented CLI. Local generation works without an account; hosted operations require access to a project.

Accounts and access

Building locally is account-free. Publishing requires an account with access to the target project.

Agents and API resources

Public discovery endpoints are account-free. Use the dashboard or @spawnkit/cli for publishing.

16 guides available