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):
npx -y @freegamestore/cli@latest checkThat’ll:
- Verify
web/distis built (and build it if not). - Run every check in the full list.
- Print pass/fail for each, with actionable hints on failures.
- 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
npx -y @freegamestore/cli@latest check --skip-buildFor when you’ve already built and just want to re-run rules.
Filter to one check
npx -y @freegamestore/cli@latest check --only bundle-sizeFor 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:
npx -y @freegamestore/cli@latest init my-gameThat 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
npx -y @freegamestore/cli@latest --help| Command | What it does |
|---|---|
init <game-id> | Scaffold a new game from a template. |
check | Run compliance against the current game directory. |
publish | Auto-provision repo + Cloudflare Pages + DNS for this game, or open a submission Issue. |
login / logout / whoami | Manage the CLI’s session with the platform. |
doctor | Local health check (signed in, API reachable, tools installed). |
list | List games you’ve published. |
logs | Tail the Cloudflare Pages logs for one of your games. |
screencheck | Visual / 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.