npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flayerlabs/gamemode-cli

v0.9.1

Published

Create and validate Flaunch Game Modes

Downloads

953

Readme

@flayerlabs/gamemode-cli

Create a playable Flaunch Game Mode, check that its rules use deterministic inputs and bundle the rules for upload.

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 dev

The command creates a working number game. It includes:

  • server-authoritative rules in src/game/rules.ts
  • the round's config and length in src/game/config.ts
  • a browser game that uses the offline room
  • rule tests and a deterministic rules check
  • an AGENTS.md file with the rules an agent must follow
  • a $build-game-mode repository skill for supported agents

The offline room runs the real rules without a gate, chain or wallet. The scaffold does not create a gate: Flaunch runs one per chain, and you upload the built game.

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.ts

The 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.

Bundle the rules for upload

The generated build script is vite build && gamemode bundle. Run the bundle on its own with:

pnpm exec gamemode bundle

It writes two files to dist/, beside index.html:

  • gamemode.rules.js: the rules module from src/game/rules.ts as a classic script that assigns its GameModule to globalThis.gamemodeRules, at most 2 MiB
  • gamemode.json: the manifest, with tier: "rules", the ceiling from rewardBounds(config), and roundDurationMs and config from src/game/config.ts

It refuses rules that fail the check below, in the entry and in every local file it imports, and a config that is not a plain object. Zip the contents of dist/ and upload the ZIP at https://flaunch.gg/game-mode/dashboard.

Build a secure game

Use the repository guidance to continue:

See what changed

This package ships CHANGELOG.md and MIGRATING.md, shared by all four Game Mode packages. Read them on GitHub: changelog and migration guide.