@catapultgames/cli
v0.1.0-alpha.6
Published
Create, playtest, and deploy Catapult turn-based multiplayer web games.
Readme
@catapultgames/cli
Alpha command-line tool for creating, validating, playtesting, and deploying turn-based web games.
Getting the CLI
Published as @catapultgames/cli - same npm scope as the SDK, separate package (the CLI
has real dependencies, like playwright-core, that a game's own runtime install has no
business pulling in - see docs/RELEASING.md).
npx @catapultgames/cli create my-game
cd my-gameOr install it globally so platform is always on your PATH:
npm install -g @catapultgames/cli
platform create my-gameThe generated project depends only on the public @catapultgames/sdk package, not
on the CLI or anything monorepo-internal (verified by bun run smoke:creator-flow, which
builds and plays a project outside the repo entirely, against a real npm install).
Working from a repo checkout instead (contributing to the CLI itself, or before a
given change is published): bun apps/cli/src/index.ts create my-game runs the same code
from source - bin/platform.mjs prefers src/ when present for exactly this reason.
Commands
platform versionprints the SDK version generated projects pin and the protocol version - two distinct numbers, seedocs/RELEASING.md.platform create <name>copies the blank scaffold.platform validate --project <path>checksgame.tomland required files.platform playtest --profile four_player --project <path>starts the local room host and Playwright sessions.platform deploy --dry-run --project <path>writes.platform-build.platform deploy --project <path> --api <url> --token <token>uploads to the hosted alpha API.
The CLI imports shared protocol and deploy types from @platform/contracts. Its own
bin/platform.mjs runs under plain Node (>= 22.18) or bun: under bun in this repo it
prefers src/, and otherwise uses the compiled dist/ (an npm install, where files
ships dist but not src) - see the comment in bin/platform.mjs before changing that
resolution order.
