Skip to content

CLI: fgs check

The @freegamestore/cli package runs the same compliance suite locally that CI runs on every push. Use it before opening a PR — fixing compliance issues in your terminal is a lot faster than fixing them in CI logs.

Run it

From your game’s root (the directory with web/ in it):

Terminal window
npx -y @freegamestore/cli@latest check

That’ll:

  1. Verify web/dist is built (and build it if not).
  2. Run every check in the full list.
  3. Print pass/fail for each, with actionable hints on failures.
  4. Exit non-zero if any check failed.

No install step — the -y flag accepts the auto-install prompt, and pinning @latest ensures you always run the current rules.

Common invocations

Just check, don’t build

Terminal window
npx -y @freegamestore/cli@latest check --skip-build

For when you’ve already built and just want to re-run rules.

Filter to one check

Terminal window
npx -y @freegamestore/cli@latest check --only bundle-size

For iterating on a single failure.

From inside web/

The CLI walks up looking for the game root. You can run it from anywhere inside your repo.

Example output

✓ brand-fonts Manrope + Fraunces detected
✓ brand-tokens 5 tokens present
✓ no-tracking no known trackers
✓ license-mit LICENSE matches MIT
✗ bundle-size 348 KB > 300 KB budget
→ Drop unused deps, or declare a 3D engine to lift the cap to 600 KB.
✗ audio-mute-respect web/dist/index.js: new Audio() without useSound() gate
→ See https://freegamestore.online/docs/how-to/custom-audio/
2 of 18 checks failed.

Scaffolding

The same CLI also scaffolds new games:

Terminal window
npx -y @freegamestore/cli@latest init my-game

That produces a working template at ./my-game/ with the brand shell, the SDK pre-wired, a stub <Game />, and CI workflows. Pick a template with --template canvas | grid | 3d (default: canvas).

All commands

Terminal window
npx -y @freegamestore/cli@latest --help
CommandWhat it does
init <game-id>Scaffold a new game from a template.
checkRun compliance against the current game directory.
publishAuto-provision repo + Cloudflare Pages + DNS for this game, or open a submission Issue.
login / logout / whoamiManage the CLI’s session with the platform.
doctorLocal health check (signed in, API reachable, tools installed).
listList games you’ve published.
logsTail the Cloudflare Pages logs for one of your games.
screencheckVisual / layout regression check (screenshot diff).

When to update

The CLI is published from the platform monorepo. New rules get added; old rules get refined. Always run @latest — pinning to a specific version means you’d miss new compliance gates and find out in the storefront re-audit instead of in your terminal.