You need Node.js 24 or newer and pnpm 12. Local game creation needs no SpawnKit account. Run the published @spawnkit/cli package with pnpm or npm. You can also start from a downloadable starter kit.
node --version
pnpm --version
You work in your own game project. Keep all work inside your own game folder. See tool installation and version checks if either command is missing.
Open a terminal in the folder where you keep your projects. Choose a new directory name: the CLI refuses to overwrite an existing folder. These tabs launch the same CLI package.
pnpm dlx @spawnkit/cli init my-game --add phaser,vitest --dry-run
pnpm dlx @spawnkit/cli init my-game --add phaser,vitest
npx @spawnkit/cli init my-game --add phaser,vitest --dry-run
npx @spawnkit/cli init my-game --add phaser,vitest
The dry run shows the proposed files and selected components. The second command asks for confirmation; review and accept it to create the files. In a noninteractive agent session, use --yes only after reviewing the dry-run plan. Phaser supplies the renderer and Vitest supplies tests. For other choices, run pnpm dlx @spawnkit/cli addons --json; use pnpm dlx @spawnkit/cli init for interactive setup.
cd my-game
pnpm install
pnpm dev
Open the HTTPS address printed in the terminal. The starter scene should appear; use the arrow keys to collect gold. Follow the certificate setup if prompted. Run pnpm exec dev-domains doctor if the local address does not open. Leave the server running while editing. Open a second terminal in my-game for the checks below, or stop the server with Ctrl+C first.
Open this same my-game folder in your editor or AI agent. package.json, src/, and AGENTS.md are at its root. See the Codex, Claude Code, and Cursor guides.
pnpm lint
pnpm test
pnpm build
pnpm preview
The build checks TypeScript and writes browser files to dist/. Preview serves that build locally and keeps running until you stop it with Ctrl+C. Play through the scene and check the browser console before publishing. If you chose a kit without tests, use only the scripts present in its package.json.
A successful local build does not upload anything. Follow Publish your game to ZIP the contents of dist/ and upload them, or use the CLI deployment reference to deploy source.