create-tikron
v0.6.1
Published
Scaffold a standalone Tikron multiplayer game (Cloudflare Workers + Durable Objects).
Maintainers
Readme
create-tikron
Scaffold a standalone Tikron multiplayer game — server-authoritative game rooms on Cloudflare Workers + Durable Objects, deployed to your own Cloudflare account.
Usage
npx create-tikron my-game
cd my-game
npm install # or pnpm / yarn / bun
npm run dev # http://127.0.0.1:8787 (open 2 tabs)By default this generates a standalone project whose @tikron/* dependencies install
from npm — no monorepo, no clone. Then edit src/arena-room.ts (your game) and
npm run deploy to ship it to your Cloudflare account.
What you get
src/index.ts Worker entry: defineRoom(ArenaRoomImpl) + router + dormant platform hooks
src/arena-room.ts the game — a CasualRealtimeRoom (state + onMessage handlers)
src/arena-room.test.ts a green in-process room test (vitest + @tikron/server/testing)
client/main.ts browser client via @tikron/client (pointer input, remote smoothing)
public/index.html a canvas
scripts/dev.mjs watch-rebuild the client bundle + run `wrangler dev` (used by `npm run dev`)
wrangler.jsonc Cloudflare config (DO binding + assets)
vitest.config.ts test-runner config
tsconfig(.client).json
AGENTS.md condensed room-API brief for AI agents — read this first
package.json @tikron/* deps (pinned) + dev/deploy/build/test scripts (esbuild + wrangler)Options
| Flag | Meaning |
|---|---|
| --into <dir> | Parent directory for the new project (default: current dir). |
| --clone | Instead, shallow-clone the whole Tikron platform repo (SDK + demos) — for exploring internals or contributing. |
| --repo <git-url> | Repo URL for --clone (overrides repository.url in this package's package.json). |
| -h, --help | Show help. |
How the templates ship
The generated project files live in this package's templates/ directory
and are listed in files, so they travel inside the published npm tarball — the
scaffolder needs nothing but Node and works entirely offline (beyond your npm install).
package.json is generated in code (project name + pinned dependency versions); the rest
are copied verbatim, with the project name substituted into wrangler.jsonc.
The scaffolder itself has zero runtime dependencies (Node ≥ 22 built-ins only) and
builds to dist/index.js with a #!/usr/bin/env node shebang.
