CLI runs on Node 20+: npx storebound (bunx keeps working)

- cli/lib/rt.ts: the runtime layer on node: modules (spawn / spawnSync with Bun's defaults, exit codes and
  "Executable not found", which with PATHEXT, sleep, serve, Glob, hasher, gunzip, stdin, SQLite, packageRoot,
  config imports with a type-stripping fallback for Node 20); every Bun.* use in cli/ goes through it
- tools/gen-embedded.ts -> cli/lib/embedded.ts: templates/, cli/shots/*.html and Play's Data safety form embedded
  (replaces Bun text imports; the bundle and the compiled sidecar carry them), checked fresh by bun run ci
- package.json: bin dist/storebound.mjs (Node ESM bundle, tools/build-node.ts, prepack), engines node >=20
- bun run ci: node bundle + node smoke (real node: --version, help, check same as Bun, scan, release plan --help,
  init, MCP handshake + tool call); Forgejo CI sets up Node 20; tests/node-compat.test.ts guards cli/
- install writes npx MCP commands when run with Node; bin/storebound falls back to Node
- docs: npx storebound init (Node 20+) or bunx storebound init
This commit is contained in:
CRTkafa 2026-10-13 04:03:09 +08:00
parent 614c32bcba
commit 36a8bf9625
73 changed files with 1195 additions and 251 deletions

View file

@ -30,8 +30,9 @@ your AAB / build numbers and listing files.
password. Store writes are dry runs until you say otherwise, and the public steps (submit, release) stay with you.
Use an App Store Connect key with the App Manager role and a Play service account limited to your app.
**Why Bun?** One fast runtime with TypeScript, `fetch`, a test runner and a static server built in: no build step and
zero runtime dependencies. It needs Bun installed (it does not run on plain Node).
**Why Bun, and does it need Bun?** storebound is developed and tested on Bun (TypeScript, `fetch`, a test runner built in),
with zero runtime dependencies. You do not need Bun to use it: the npm package runs on Node 20+ (`npx storebound`),
and `bunx storebound` runs the same CLI on Bun 1.1+.
**Does it upload my video to YouTube?** No. Play only takes a YouTube URL, and uploading to YouTube needs your Google
account; `shots video` makes the file, you upload it and paste the URL into `play.video`.

View file

@ -2,12 +2,15 @@
## 5-minute quick start
You need [Bun](https://bun.sh) 1.1+ (and `ffmpeg` for icons, screenshots and video).
You need [Node](https://nodejs.org) 20+ or [Bun](https://bun.sh) 1.1+ (and `ffmpeg` for icons, screenshots and video).
With Node, run the commands as `npx storebound ...`; with Bun, as `bunx storebound ...` (used below). Both run the
same CLI.
```sh
cd my-app
bun add -d storebound playwright # or: bun add -d git+https://git.crt.fyi/CRT/storebound.git playwright
bunx storebound init # --profile app (default) | subscription-app | game: config, store/*.md, declarations, privacy policy, .storebound/ (gitignored)
npx storebound init # Node 20+ (npm i -D storebound playwright to pin it in the project)
bunx storebound init # or Bun (bun add -d storebound playwright, or bun add -d git+https://git.crt.fyi/CRT/storebound.git playwright)
# --profile app (default) | subscription-app | game: config, store/*.md, declarations, privacy policy, .storebound/ (gitignored)
# fill in storebound.config.ts and the store/ files
bunx storebound check # offline: config, copy limits, Data safety answers, products, files
```