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

gameplatform-cli

v1.9.1

Published

CLI to publish and monetize browser games on GamePlatform — deploy, set pricing, connect Stripe payouts, and check earnings from the terminal (AI-assistant friendly).

Readme

gameplatform-cli

Publish and monetize browser games on GamePlatform from your terminal.

Camera/WebXR/device-sensor titles can opt into a per-game top-level origin:

gameplatform deploy game.zip --title "XR Game" --draft --launch-mode top_level --agree-terms
gameplatform launch-mode <game-id> top_level --agree-terms

The default remains iframe. Use top_level only when the browser capability genuinely requires it; CSP, per-game origin isolation, and scoped SDK sessions still apply. Designed to be driven by an AI assistant (Claude Code / Codex / Cursor): hand it the onboarding runbook and it can do almost everything. The only human step is Stripe identity/bank verification (KYC).

Install

npm install -g gameplatform-cli
gameplatform --help

Requires Node 18+.

Quick start

# 1. Log in (one time)
gameplatform login                 # email/password
gameplatform login --browser       # or Google

# 2. Set up payouts — Stripe Connect
gameplatform connect               # prints a URL; a HUMAN completes KYC in a browser
gameplatform connect               # run again to confirm it says COMPLETE

# 3. Publish (optionally set pricing in the same step)
gameplatform deploy game.zip --title "My Game" --pricing paid --price 500 --agree-terms

# 3.5 Update: stage first, verify, then publish
gameplatform update <game-id> game.zip --ver 1.1.0 --stage
#   → play it, then publish the exact build you verified:
gameplatform promote <game-id> --expect 1.1.0 --confirmed

# 4. Pricing later / changes
gameplatform pricing <game-id> --model paid --coins 300    # buyout in coins instead of JPY
gameplatform pricing <game-id> --model stamina --max 3 --regen 480 --refill 100 --buyout 500
gameplatform pricing <game-id> --model free

# 5. Sales & payouts
gameplatform earnings

You keep 80% of sales (20% platform fee). Payouts run automatically on the 1st of each month to your bank (sales from the last 7 days are held for refund protection). You never share your bank details with the platform — Stripe holds them.

Commands

| Command | Description | |---|---| | login [--browser] | Authenticate | | connect | Create/check Stripe Connect; prints the KYC URL | | deploy <zip> --title ... [--pricing ...] --agree-terms | Submit a game | | pricing <game-id> --model free\|paid\|stamina ... | Set monetization. paid takes --price <jpy> (Stripe) or --coins <n> (coins) — exclusive | | items <game-id> [--file items.json \| --list] | Sync in-game ¥ items (permanent unlocks) | | update <game-id> <zip> --ver ... | Submit an update | | promote <game-id> --expect <ver> --confirmed | Publish a staged version. --expect は必須(v1.6.0〜)。確認した検証版の番号を渡す。ズレていればサーバが409で止める | | earnings | Sales & payout status | | sales [game-id] | List every real payment (buyout / item / stamina) — authoritative payment record | | games / status | List games / submission status | | thumbnail / screenshot / video | Upload media | | delete <game-id> | Delete a game | | logout | Clear credentials |

Full docs: https://game-platform-3eg.pages.dev/developers

Notes

  • ZIPs must use forward-slash paths (zip -r, not Windows "Compress-Archive"). The root must contain index.html.
  • --agree-terms affirms the creator agreement; it is required to submit.

容量ガイド(サイズと最適化)

なぜ軽さが要るか

Webゲームはインストール不要で遊べるのが強みですが、その裏返しで ロード時間が第一印象 になります。プレイヤーは「待たされる」と感じた瞬間に離脱します。20Mbps(一般的なモバイル回線)での初回ロードの目安:

| ZIPサイズ | ロード目安 | |---|---| | 10MB | 約4秒 | | 30MB | 約12秒 | | 50MB | 約20秒 | | 90MB | 約36秒 |

※ この表は「起動時に読む量」で見てください。総量ではありません。

30秒待てるプレイヤーはほとんどいません。数字は目安ですが、「軽い=遊んでもらえる」という関係は動きません。

上限と推奨

ゲーム全体のサイズ上限は事実上ありません(v1.7.0〜)。 CLIがZIPを展開して1ファイルずつ送るので、Workersのボディ上限に当たらなくなりました。

| | 上限 | |---|---| | ゲーム全体 | 2GiB | | 1ファイル | 64MiB | | ファイル数 | 5,000 |

★大事なのは上限ではなくプレイヤーの待ち時間です。

  • 推奨: 起動時に読むぶんを30MB以下
  • 理想: 15MB以下

deploy / update は毎回、アップロード前にサイズと「内訳トップ5」を表示します。 上限で中断はしませんが、重い場合は警告と削減レシピを出します。

削減レシピ(実証済み)

  1. 画像は表示サイズに合わせる。 生成AIの2MB級PNGをゲーム内512pxで使うのは無駄です。512pxへ縮小すれば約150KB(約94%減)。sharpワンライナー例:
    npx sharp-cli resize 512 512 --fit inside -i src.png -o out.webp
  2. 3Dモデル(GLB)は gltf-transform でテクスチャをWebP化+リサイズ(例: 1024px):
    npx @gltf-transform/cli webp model.glb model.webp.glb
    npx @gltf-transform/cli resize --width 1024 --height 1024 model.webp.glb out.glb
    ⚠ draco / meshopt などのジオメトリ圧縮は、ゲーム側にデコーダを同梱する必要があるため安易に使わないこと(同梱漏れでモデルが出ません)。
  3. 音声は128kbpsで十分。 無圧縮WAVや320kbpsは避ける。
  4. ZIPに余計なものを入れない。 .git / node_modules / ソース素材(.psd 等)/ 開発ドキュメントは配信に不要です。
  5. CLIの「内訳トップ5」で大物を特定。 どのフォルダが重いか一目で分かるので、そこから削る。

総量が大きいゲームを作る場合

総量は2GiBまで置けますが、それを起動時に全部読ませてはいけません。 初回ロードは 必須アセットだけ(メニュー+最初のステージ ≈10〜20MB)に絞り、 残りはゲーム内で遅延ロード(プレイしながら追加ダウンロード)してください。

プレイヤーは要求したファイルだけを個別に取得します(ZIPを丸ごとDLしません)。 R2はCDN配下なので2回目以降はキャッシュが効きます。

⚠ 真の天井は端末のメモリです。ダウンロードは分割できても、 同時にWebGLへ載せる量は端末が決めます(特にiOS Safari)。 総量より「同時常駐メモリの設計」を先に考えてください。

容量アーキテクチャの正本は docs/CAPACITY_ROADMAP.md。

License

MIT