Install Node.js 24 or newer and pnpm 12. Run the CLI directly without a global install. Both tabs invoke the same @spawnkit/cli package; generated game projects use pnpm for their dependencies and scripts.
pnpm dlx @spawnkit/cli --help
pnpm dlx @spawnkit/cli --version
npx @spawnkit/cli --help
npx @spawnkit/cli --version
The examples throughout these guides use pnpm dlx @spawnkit/cli. Replace that prefix with npx @spawnkit/cli if you prefer npm to launch the CLI. This does not change the generated project's package manager. See Create a game with the CLI for the complete create, install, run, test, and build sequence.
pnpm add --global @spawnkit/cli
spawn --help
spawn --version
After a global installation, use spawn in place of pnpm dlx @spawnkit/cli. The package is distributed on npm and bundles its own runtime dependencies.
pnpm dlx @spawnkit/cli templates --json
pnpm dlx @spawnkit/cli addons --json
pnpm dlx @spawnkit/cli init my-game --add phaser,vitest --dry-run
pnpm dlx @spawnkit/cli init my-game --add phaser,vitest
cd my-game
pnpm install
pnpm dev
The destination must not exist, even as an empty folder; its parent must exist. Generation writes files but does not install dependencies. Run pnpm dlx @spawnkit/cli init without a directory in an interactive terminal for guided setup.
| Option | Behavior |
|---|
--add <names> | Comma-separated add-ons; repeatable. Use the catalog to check compatibility. |
|---|
--name <name> | Package name; defaults to the directory name. |
|---|
--dry-run | Show the plan without writing files. |
|---|
--json | Machine-readable output; interactive prompts are unavailable. |
|---|
pnpm dlx @spawnkit/cli add vitest --directory ./my-game --dry-run
pnpm dlx @spawnkit/cli add vitest --directory ./my-game
| Option | Behavior |
|---|
--directory <path> | Existing game folder; defaults to the current directory. |
|---|
--replace <names> | Explicitly replace incompatible add-ons; inspect the proposed changes first. |
|---|
--yes | Accept a resolved plan. It does not permit overwriting conflicting edits. |
|---|
--dry-run --json | Inspect file changes and unresolved choices without writing. |
|---|
Read Updating an existing game for ownership records, conflict recovery, and verification. Renderer switching is not supported by pnpm dlx @spawnkit/cli add.
pnpm dlx @spawnkit/cli login --site https://spawnkit.cloud
pnpm dlx @spawnkit/cli auth status
pnpm dlx @spawnkit/cli link --project YOUR_PROJECT_ID
| Command | Contract |
|---|
pnpm dlx @spawnkit/cli login --site <url> | Open browser authorization. --no-browser prints the link instead. SPAWN_SITE_URL can supply the site. |
|---|
pnpm dlx @spawnkit/cli auth status | Inspect local credentials only; it does not verify remote access. |
|---|
pnpm dlx @spawnkit/cli link [--project <id>] | Verify access and save the game folder association. Without an ID, interactive mode offers project selection. |
|---|
pnpm dlx @spawnkit/cli unlink | Remove the local association; hosted projects and releases remain. |
|---|
pnpm dlx @spawnkit/cli login --remote --email <email> --project <id> | Request one hour of access to one existing project. The owner approves a six-digit code in their browser; no localhost callback is needed. |
|---|
pnpm dlx @spawnkit/cli logout | Revoke a remote-agent grant, then remove local credentials. Local OAuth and browser sessions are separate. |
|---|
Link and unlink accept --directory <path> and --json. In the dashboard, open your project → Settings → General → Copy project ID. Replace YOUR_PROJECT_ID with that value and DEPLOYMENT_ID with the relevant deployment ID. See Accounts and access for sign-in recovery.
| Command | Purpose and command-specific flags |
|---|
pnpm dlx @spawnkit/cli deploy | Upload source and follow the build. --env sandbox|production, --dry-run, --yes, --no-wait, --request-id <id>. |
|---|
pnpm dlx @spawnkit/cli releases | List retained releases. --cursor <cursor> paginates results. |
|---|
pnpm dlx @spawnkit/cli status <deployment-id> | Read deployment state. Failed, cancelled, or superseded operations return exit code 1. |
|---|
pnpm dlx @spawnkit/cli logs <deployment-id> | Read build output. --cursor <cursor> resumes pagination; --follow or -f watches until completion. |
|---|
pnpm dlx @spawnkit/cli promote <release-id> | Promote a successful Sandbox release without rebuilding. Supports --dry-run, --yes, --request-id <id>. |
|---|
pnpm dlx @spawnkit/cli rollback <release-id> --env <environment> | Activate retained compatible artifacts. Environment is required. Supports --dry-run, --yes, --request-id <id>. |
|---|
All deployment commands accept --project <id>, --directory <path>, --json, and --help. The project is otherwise inferred from the nearest game folder. Deploy defaults to Sandbox when enabled, otherwise production; specify the environment explicitly when the target matters.
pnpm dlx @spawnkit/cli deploy --project YOUR_PROJECT_ID --env production --dry-run
pnpm dlx @spawnkit/cli deploy --project YOUR_PROJECT_ID --env production
Ctrl+C stops watching, not the remote deployment. Use pnpm dlx @spawnkit/cli logs DEPLOYMENT_ID --project YOUR_PROJECT_ID --follow to reconnect. Rollback does not undo database migrations.
pnpm dlx @spawnkit/cli deploy --project YOUR_PROJECT_ID --env production --dry-run --json
pnpm dlx @spawnkit/cli deploy --project YOUR_PROJECT_ID --env production --yes --json
Successful command results go to stdout. Live deployment logs go to stderr in JSON mode. Login emits newline-delimited authorization and completion records. Check the process exit code and returned status; do not assume that receiving a deployment ID means the build succeeded.
Mutations in noninteractive mode require --yes. For retryable deployment mutations, choose a stable --request-id for that operation and reuse it only when retrying the same operation. Keep deployment IDs separately from release IDs: status/logs use deployment IDs, while promote/rollback use release IDs.
pnpm dlx @spawnkit/cli --help
pnpm dlx @spawnkit/cli deploy --help
pnpm dlx @spawnkit/cli logs --help
pnpm dlx @spawnkit/cli rollback --help