@flayerlabs/gamemode-cli
v0.2.0
Published
Create and validate Flaunch Game Modes
Readme
@flayerlabs/gamemode-cli
Create a playable Flaunch Game Mode and check that its rules use deterministic inputs.
Requirements
You need Node.js 20 or later and pnpm.
Create a game
Run:
pnpm dlx @flayerlabs/gamemode-cli new my-game
cd my-game
pnpm install
pnpm devThe command creates a working number game. It includes:
- server-authoritative rules in
src/game/rules.ts - a browser game that uses the offline room
- rule tests and a deterministic rules check
- an
AGENTS.mdfile with the rules an agent must follow - a
$build-game-moderepository skill for supported agents
The offline room runs the real rules without a gate, chain or wallet. The scaffold does not create a live gate or trusted wallet integration.
Check an existing rules file
Install the CLI in the game project, then run the check:
pnpm add --save-dev @flayerlabs/gamemode-cli
pnpm exec gamemode check src/game/rules.tsThe check rejects known uses of clocks, random values, network access and system access. It also
rejects top-level let and var declarations. Run the project's tests and type check as well.
Build a secure game
Use the repository guidance to continue:
