@joiner-platform/cli 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/README.md +30 -2
  2. package/bundled-resources/poe-tile-templates/base/CLAUDE.md +72 -0
  3. package/bundled-resources/poe-tile-templates/base/README.md +7 -0
  4. package/bundled-resources/poe-tile-templates/base/_bunfig.toml +8 -0
  5. package/bundled-resources/poe-tile-templates/base/_gitignore +18 -0
  6. package/bundled-resources/poe-tile-templates/base/client.ts +12 -0
  7. package/bundled-resources/poe-tile-templates/base/package.json +36 -0
  8. package/bundled-resources/poe-tile-templates/base/playwright.config.ts +38 -0
  9. package/bundled-resources/poe-tile-templates/base/scripts/check-source.ts +148 -0
  10. package/bundled-resources/poe-tile-templates/base/scripts/dev.ts +19 -0
  11. package/bundled-resources/poe-tile-templates/base/scripts/doctor.sh +29 -0
  12. package/bundled-resources/poe-tile-templates/base/scripts/visual-check.ts +64 -0
  13. package/bundled-resources/poe-tile-templates/base/synced-store/backend-config.ts +9 -0
  14. package/bundled-resources/poe-tile-templates/base/synced-store/client-config.ts +8 -0
  15. package/bundled-resources/poe-tile-templates/base/synced-store/data/items.ts +16 -0
  16. package/bundled-resources/poe-tile-templates/base/synced-store/mutators/index.ts +10 -0
  17. package/bundled-resources/poe-tile-templates/base/synced-store/mutators/remove-todo.ts +5 -0
  18. package/bundled-resources/poe-tile-templates/base/synced-store/mutators/set-todo.ts +20 -0
  19. package/bundled-resources/poe-tile-templates/base/synced-store/mutators/types.ts +5 -0
  20. package/bundled-resources/poe-tile-templates/base/synced-store/mutators.test.ts +138 -0
  21. package/bundled-resources/poe-tile-templates/base/synced-store/schema.ts +40 -0
  22. package/bundled-resources/poe-tile-templates/base/tests/e2e.test.playwright.ts +92 -0
  23. package/bundled-resources/poe-tile-templates/base/tests/mobile-viewport.test.playwright.ts +111 -0
  24. package/bundled-resources/poe-tile-templates/base/tests/render-check.test.playwright.ts +128 -0
  25. package/bundled-resources/poe-tile-templates/base/tests/screenshot.test.playwright.ts +86 -0
  26. package/bundled-resources/poe-tile-templates/base/tests/setup-dom.ts +70 -0
  27. package/bundled-resources/poe-tile-templates/base/tile/src/backend.ts +3 -0
  28. package/bundled-resources/poe-tile-templates/base/tile/styles.css +47 -0
  29. package/bundled-resources/poe-tile-templates/base/tsconfig.json +13 -0
  30. package/bundled-resources/poe-tile-templates/coverage.config.json +6 -0
  31. package/bundled-resources/poe-tile-templates/index.ts +27 -0
  32. package/bundled-resources/poe-tile-templates/package.json +31 -0
  33. package/bundled-resources/poe-tile-templates/phaserjs/package.partial.json +6 -0
  34. package/bundled-resources/poe-tile-templates/phaserjs/tile/index.html +14 -0
  35. package/bundled-resources/poe-tile-templates/phaserjs/tile/src/entry.ts +35 -0
  36. package/bundled-resources/poe-tile-templates/phaserjs/ui/App.test.happydom.tsx +98 -0
  37. package/bundled-resources/poe-tile-templates/phaserjs/ui/App.ts +180 -0
  38. package/bundled-resources/poe-tile-templates/phaserjs/ui/phaser-scene.ts +174 -0
  39. package/bundled-resources/poe-tile-templates/phaserjs/vite.config.ts +28 -0
  40. package/bundled-resources/poe-tile-templates/preact/package.partial.json +9 -0
  41. package/bundled-resources/poe-tile-templates/preact/postcss.config.js +5 -0
  42. package/bundled-resources/poe-tile-templates/preact/tile/index.html +14 -0
  43. package/bundled-resources/poe-tile-templates/preact/tile/src/entry.tsx +36 -0
  44. package/bundled-resources/poe-tile-templates/preact/tile/styles.css +51 -0
  45. package/bundled-resources/poe-tile-templates/preact/tsconfig.json +15 -0
  46. package/bundled-resources/poe-tile-templates/preact/ui/App.test.happydom.tsx +69 -0
  47. package/bundled-resources/poe-tile-templates/preact/ui/App.tsx +116 -0
  48. package/bundled-resources/poe-tile-templates/preact/vite.config.ts +18 -0
  49. package/bundled-resources/poe-tile-templates/react/package.partial.json +12 -0
  50. package/bundled-resources/poe-tile-templates/react/postcss.config.js +5 -0
  51. package/bundled-resources/poe-tile-templates/react/tile/index.html +14 -0
  52. package/bundled-resources/poe-tile-templates/react/tile/src/entry.tsx +38 -0
  53. package/bundled-resources/poe-tile-templates/react/tile/styles.css +51 -0
  54. package/bundled-resources/poe-tile-templates/react/tsconfig.json +14 -0
  55. package/bundled-resources/poe-tile-templates/react/ui/App.test.happydom.tsx +71 -0
  56. package/bundled-resources/poe-tile-templates/react/ui/App.tsx +110 -0
  57. package/bundled-resources/poe-tile-templates/react/vite.config.ts +21 -0
  58. package/bundled-resources/poe-tile-templates/scripts/cleanup.ts +10 -0
  59. package/bundled-resources/poe-tile-templates/scripts/generate.ts +57 -0
  60. package/bundled-resources/poe-tile-templates/scripts/install-diagnostics.ts +52 -0
  61. package/bundled-resources/poe-tile-templates/scripts/paths.ts +7 -0
  62. package/bundled-resources/poe-tile-templates/scripts/sdk-dependency-key.ts +288 -0
  63. package/bundled-resources/poe-tile-templates/scripts/verify-all-sdks.ts +132 -0
  64. package/bundled-resources/poe-tile-templates/scripts/verify-local-sdk-command.ts +30 -0
  65. package/bundled-resources/poe-tile-templates/scripts/verify-local-sdk-tarball.ts +397 -0
  66. package/bundled-resources/poe-tile-templates/solidjs/_bunfig.toml +14 -0
  67. package/bundled-resources/poe-tile-templates/solidjs/package.partial.json +13 -0
  68. package/bundled-resources/poe-tile-templates/solidjs/postcss.config.js +5 -0
  69. package/bundled-resources/poe-tile-templates/solidjs/tests/solid-plugin.ts +49 -0
  70. package/bundled-resources/poe-tile-templates/solidjs/tile/index.html +14 -0
  71. package/bundled-resources/poe-tile-templates/solidjs/tile/src/entry.tsx +36 -0
  72. package/bundled-resources/poe-tile-templates/solidjs/tile/styles.css +51 -0
  73. package/bundled-resources/poe-tile-templates/solidjs/tsconfig.json +15 -0
  74. package/bundled-resources/poe-tile-templates/solidjs/ui/App.test.happydom.tsx +70 -0
  75. package/bundled-resources/poe-tile-templates/solidjs/ui/App.tsx +129 -0
  76. package/bundled-resources/poe-tile-templates/solidjs/vite.config.ts +18 -0
  77. package/bundled-resources/poe-tile-templates/tests/check-source.test.ts +131 -0
  78. package/bundled-resources/poe-tile-templates/tests/dev-script.test.slow.ts +166 -0
  79. package/bundled-resources/poe-tile-templates/tests/fixtures/customized-manager.ts +67 -0
  80. package/bundled-resources/poe-tile-templates/tests/fixtures/extended-mutators.ts.txt +106 -0
  81. package/bundled-resources/poe-tile-templates/tests/fixtures/multiplayer-verification.test.playwright.ts.txt +103 -0
  82. package/bundled-resources/poe-tile-templates/tests/fixtures/replace-starter-schema.ts +67 -0
  83. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/phaserjs.tsx.txt +85 -0
  84. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/preact.tsx.txt +69 -0
  85. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/react.tsx.txt +73 -0
  86. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/seating.ts.txt +54 -0
  87. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/solidjs.tsx.txt +70 -0
  88. package/bundled-resources/poe-tile-templates/tests/fixtures/starter-demo/vanilla-js.tsx.txt +85 -0
  89. package/bundled-resources/poe-tile-templates/tests/generated-templates.test.ts +278 -0
  90. package/bundled-resources/poe-tile-templates/tests/happy-dom-version.test.ts +27 -0
  91. package/bundled-resources/poe-tile-templates/tests/install-diagnostics.test.ts +99 -0
  92. package/bundled-resources/poe-tile-templates/tests/native-gesture-defaults.test.ts +23 -0
  93. package/bundled-resources/poe-tile-templates/tests/playwright-version.test.ts +84 -0
  94. package/bundled-resources/poe-tile-templates/tests/render-check-scaffold.test.ts +56 -0
  95. package/bundled-resources/poe-tile-templates/tests/sdk-dependency-key.test.ts +129 -0
  96. package/bundled-resources/poe-tile-templates/tests/visual-check.test.ts +90 -0
  97. package/bundled-resources/poe-tile-templates/vanilla-js/package.partial.json +3 -0
  98. package/bundled-resources/poe-tile-templates/vanilla-js/tile/index.html +14 -0
  99. package/bundled-resources/poe-tile-templates/vanilla-js/tile/src/entry.ts +35 -0
  100. package/bundled-resources/poe-tile-templates/vanilla-js/ui/App.test.happydom.tsx +96 -0
  101. package/bundled-resources/poe-tile-templates/vanilla-js/ui/App.ts +113 -0
  102. package/bundled-resources/poe-tile-templates/vanilla-js/vite.config.ts +17 -0
  103. package/cli.ts +134 -0
  104. package/index.ts +96 -0
  105. package/package.json +48 -5
  106. package/skills/audio-generation/.generated-by-poe-templated-docs +0 -0
  107. package/skills/audio-generation/SKILL.md +125 -0
  108. package/skills/finish-prototype/.generated-by-poe-templated-docs +0 -0
  109. package/skills/finish-prototype/SKILL.md +22 -0
  110. package/skills/help-me-build/.generated-by-poe-templated-docs +0 -0
  111. package/skills/help-me-build/SKILL.md +56 -0
  112. package/skills/image-generation/.generated-by-poe-templated-docs +0 -0
  113. package/skills/image-generation/SKILL.md +128 -0
  114. package/skills/one-shot/.generated-by-poe-templated-docs +0 -0
  115. package/skills/one-shot/SKILL.md +22 -0
  116. package/skills/platform-prototype/.generated-by-poe-templated-docs +0 -0
  117. package/skills/platform-prototype/SKILL.md +60 -0
  118. package/skills/platform-subagent/.generated-by-poe-templated-docs +0 -0
  119. package/skills/platform-subagent/SKILL.md +16 -0
  120. package/skills/poe-tiles-cli/.generated-by-poe-templated-docs +0 -0
  121. package/skills/poe-tiles-cli/SKILL.md +609 -0
  122. package/skills/poe-tiles-cli/references/device-motion.md +40 -0
  123. package/skills/poe-tiles-cli/references/player-updates.md +41 -0
  124. package/skills/prototype/.generated-by-poe-templated-docs +0 -0
  125. package/skills/prototype/SKILL.md +148 -0
  126. package/skills/publish/.generated-by-poe-templated-docs +0 -0
  127. package/skills/publish/SKILL.md +73 -0
  128. package/skills/synced-store/.generated-by-poe-templated-docs +0 -0
  129. package/skills/synced-store/SKILL.md +583 -0
  130. package/skills/synced-store/references/actions.md +85 -0
  131. package/skills/synced-store/references/api-patterns.md +245 -0
  132. package/skills/synced-store/references/architecture-scaling-and-performance.md +280 -0
  133. package/skills/synced-store/references/client-api-reference.md +263 -0
  134. package/skills/synced-store/references/data-visibility.md +95 -0
  135. package/skills/synced-store/references/external-stores.md +162 -0
  136. package/skills/synced-store/references/file-uploads.md +216 -0
  137. package/skills/synced-store/references/getting-user-info-of-members.md +228 -0
  138. package/skills/synced-store/references/limitations.md +72 -0
  139. package/skills/synced-store/references/live-data-limit-hook.md +131 -0
  140. package/skills/synced-store/references/mutator-rules.md +169 -0
  141. package/skills/synced-store/references/platform.md +49 -0
  142. package/skills/synced-store/references/schema-and-bindings.md +85 -0
  143. package/skills/synced-store/references/schema-libraries.md +57 -0
  144. package/skills/synced-store/references/schema-migrations.md +119 -0
  145. package/skills/synced-store/references/searchable-tables.md +27 -0
  146. package/skills/synced-store/references/server-forking.md +115 -0
  147. package/skills/synced-store/references/singleton-tables.md +61 -0
  148. package/skills/synced-store/references/sort-keys.md +253 -0
  149. package/skills/synced-store/references/ui-patterns.md +95 -0
  150. package/skills/tile-creator/.generated-by-poe-templated-docs +0 -0
  151. package/skills/tile-creator/SKILL.md +196 -0
  152. package/skills/tile-creator/references/assets.md +124 -0
  153. package/skills/tile-creator/references/backend-api.md +308 -0
  154. package/skills/tile-creator/references/cli-limitations.md +64 -0
  155. package/skills/tile-creator/references/cli.md +604 -0
  156. package/skills/tile-creator/references/client-api.md +2407 -0
  157. package/skills/tile-creator/references/composing-apps.md +166 -0
  158. package/skills/tile-creator/references/e2e-tests.md +55 -0
  159. package/skills/tile-creator/references/game-ux-best-practices.md +57 -0
  160. package/skills/tile-creator/references/migrating-pre-rename-tiles.md +79 -0
  161. package/skills/tile-creator/references/multiplayer-api-recipe.md +205 -0
  162. package/skills/tile-creator/references/native-results.md +100 -0
  163. package/skills/tile-creator/references/platform-integration.md +201 -0
  164. package/skills/tile-creator/references/power-report.md +199 -0
  165. package/skills/tile-creator/references/publish-rollout.md +166 -0
  166. package/skills/tile-creator/references/publishing.md +33 -0
  167. package/skills/tile-creator/references/push-notification-guidelines.md +58 -0
  168. package/skills/tile-creator/references/render-check.md +266 -0
  169. package/skills/tile-creator/references/running-the-client-api-on-a-server-owned-by-the-user.md +95 -0
  170. package/skills/tile-creator/references/safe-area-insets.md +79 -0
  171. package/skills/tile-creator/references/sandbox-limitations.md +32 -0
  172. package/skills/tile-creator/references/scaffolded-tile-folder-structure.md +48 -0
  173. package/skills/tile-creator/references/scaffolding-a-new-app.md +202 -0
  174. package/skills/tile-creator/references/simulations.md +125 -0
  175. package/skills/tile-creator/references/synced-store-client-reference.md +92 -0
  176. package/skills/tile-creator/references/troubleshooting.md +22 -0
  177. package/skills/tile-creator/references/turn-based-mutator.md +43 -0
  178. package/skills/tile-creator/references/user-erasure.md +14 -0
  179. package/skills/tile-creator/references/vite-plugin.md +166 -0
  180. package/skills/tile-creator/references/workspace-retention.md +72 -0
  181. package/src/admin-conversions-client.ts +28 -0
  182. package/src/admin-reviews-client.ts +36 -0
  183. package/src/api.generated.ts +1527 -0
  184. package/src/auth-token.ts +198 -0
  185. package/src/bounded-read.ts +35 -0
  186. package/src/bun-version.ts +33 -0
  187. package/src/checkout-base.ts +207 -0
  188. package/src/cli-bun-version.ts +16 -0
  189. package/src/cli-env.ts +28 -0
  190. package/src/cli-name.ts +23 -0
  191. package/src/client.ts +2474 -0
  192. package/src/collect-files.ts +226 -0
  193. package/src/commands/accounts.ts +55 -0
  194. package/src/commands/admin-abandon-conversion.ts +60 -0
  195. package/src/commands/admin-reviews.ts +66 -0
  196. package/src/commands/admin.ts +219 -0
  197. package/src/commands/auth.ts +89 -0
  198. package/src/commands/checkout-prototype.ts +67 -0
  199. package/src/commands/creator-source-capability.ts +11 -0
  200. package/src/commands/doctor-bun.ts +145 -0
  201. package/src/commands/doctor-command.ts +64 -0
  202. package/src/commands/doctor-package-json.ts +47 -0
  203. package/src/commands/doctor-sdk-pin.ts +156 -0
  204. package/src/commands/doctor-store-keys-lexer.ts +213 -0
  205. package/src/commands/doctor-store-keys-scan.ts +262 -0
  206. package/src/commands/doctor-store-keys.ts +196 -0
  207. package/src/commands/doctor.ts +371 -0
  208. package/src/commands/init/blank-scaffold-templates.ts +397 -0
  209. package/src/commands/init/index.ts +170 -0
  210. package/src/commands/init/internal-toolchain.ts +49 -0
  211. package/src/commands/init/manager-test-template.ts +107 -0
  212. package/src/commands/init/multiplayer-test-template.ts +217 -0
  213. package/src/commands/init/name-input.tsx +167 -0
  214. package/src/commands/init/no-store-scaffold-templates.ts +281 -0
  215. package/src/commands/init/no-store-scaffold.ts +134 -0
  216. package/src/commands/init/package-json-scripts.ts +72 -0
  217. package/src/commands/init/scaffold.ts +960 -0
  218. package/src/commands/init/sdk-tarball-url.generated.ts +4 -0
  219. package/src/commands/init/sdk-tarball-url.ts +31 -0
  220. package/src/commands/init/template-picker.tsx +147 -0
  221. package/src/commands/inspect-child-entry.ts +107 -0
  222. package/src/commands/inspect-contract.ts +87 -0
  223. package/src/commands/inspect-freshness.ts +217 -0
  224. package/src/commands/inspect-lock.ts +201 -0
  225. package/src/commands/inspect-options.ts +360 -0
  226. package/src/commands/inspect-orchestrate.ts +375 -0
  227. package/src/commands/inspect-process.ts +172 -0
  228. package/src/commands/inspect-ready.ts +65 -0
  229. package/src/commands/inspect-report.ts +235 -0
  230. package/src/commands/inspect-run-state.ts +296 -0
  231. package/src/commands/inspect-run.ts +157 -0
  232. package/src/commands/inspect-watchdog.ts +74 -0
  233. package/src/commands/install-joiner.ts +208 -0
  234. package/src/commands/login.ts +308 -0
  235. package/src/commands/models.ts +40 -0
  236. package/src/commands/parse-options.ts +36 -0
  237. package/src/commands/remix-package-json.ts +64 -0
  238. package/src/commands/remix.ts +379 -0
  239. package/src/commands/sdk-url.ts +141 -0
  240. package/src/commands/simulations.ts +133 -0
  241. package/src/commands/skills.ts +108 -0
  242. package/src/commands/store-files.ts +92 -0
  243. package/src/commands/stores.ts +703 -0
  244. package/src/commands/tiles-channel-commands.ts +115 -0
  245. package/src/commands/tiles-checkout.ts +351 -0
  246. package/src/commands/tiles-gallery-command.ts +95 -0
  247. package/src/commands/tiles-get-helpers.ts +27 -0
  248. package/src/commands/tiles-inspect.ts +276 -0
  249. package/src/commands/tiles-power-command.ts +308 -0
  250. package/src/commands/tiles-power-format.ts +396 -0
  251. package/src/commands/tiles-power-versions.ts +299 -0
  252. package/src/commands/tiles-publish-helpers.ts +145 -0
  253. package/src/commands/tiles-upload-command.ts +277 -0
  254. package/src/commands/tiles-version-commands.ts +201 -0
  255. package/src/commands/tiles-visibility-command.ts +103 -0
  256. package/src/commands/tiles.ts +257 -0
  257. package/src/commands/upgrade.ts +307 -0
  258. package/src/commit-in-progress.ts +42 -0
  259. package/src/creator-source-context.ts +97 -0
  260. package/src/creator-source-publish.ts +52 -0
  261. package/src/deferred-assets.ts +125 -0
  262. package/src/distribution.ts +28 -0
  263. package/src/errors.ts +61 -0
  264. package/src/install-command.ts +43 -0
  265. package/src/output.ts +62 -0
  266. package/src/poe-tile-config-files.ts +100 -0
  267. package/src/poe-tile-config-players.ts +168 -0
  268. package/src/poe-tile-config-remix.ts +166 -0
  269. package/src/poe-tile-config.ts +831 -0
  270. package/src/power-report-client.ts +55 -0
  271. package/src/prototype-startup.ts +21 -0
  272. package/src/publish-change-summary.ts +55 -0
  273. package/src/publish-overrides-validation.ts +49 -0
  274. package/src/publish-pack.ts +167 -0
  275. package/src/publish-phases.ts +57 -0
  276. package/src/publish-retry.ts +51 -0
  277. package/src/publish-tile-from-config.ts +434 -0
  278. package/src/recorder-stream.ts +169 -0
  279. package/src/remix-provenance.ts +156 -0
  280. package/src/resolve-client-credential.ts +71 -0
  281. package/src/resolve-media-uploads.ts +147 -0
  282. package/src/sdk-dependency.ts +54 -0
  283. package/src/sdk-skills.ts +85 -0
  284. package/src/should-skip-client-setup.ts +20 -0
  285. package/src/simulation-snapshot.ts +123 -0
  286. package/src/simulation-types.ts +74 -0
  287. package/src/simulations-client.ts +112 -0
  288. package/src/source-bundle.ts +466 -0
  289. package/src/staged-publish-cleanup.ts +44 -0
  290. package/src/staged-publish-deferred.ts +160 -0
  291. package/src/staged-publish.ts +401 -0
  292. package/src/store-file-upload.ts +268 -0
  293. package/src/store-request.ts +168 -0
  294. package/src/tar-canonical.ts +41 -0
  295. package/src/tar-extensions.ts +159 -0
  296. package/src/tar-extract.ts +193 -0
  297. package/src/tar-parse.ts +224 -0
  298. package/src/tar.ts +231 -0
  299. package/src/template-check-scripts.ts +18 -0
  300. package/src/tile-gallery-client.ts +82 -0
  301. package/src/types.ts +258 -0
  302. package/src/upload-concurrency.ts +54 -0
  303. package/src/whole-tile.ts +52 -0
@@ -0,0 +1,609 @@
1
+ ---
2
+ name: poe-tiles-cli
3
+ description: Joiner CLI command reference. Use when explaining how to install, upgrade, authenticate, scaffold, publish, inspect, manage, or script with the `joiner` CLI (also `poe-tiles`), including command examples, arguments, options, environment variables, JSON output, app commands, store commands, skills installation, model, account, and upgrade commands.
4
+ ---
5
+
6
+ # Joiner CLI Reference
7
+
8
+ Use this skill as the concise command reference for `joiner`. Prefer exact command examples over prose. If a command needs authentication, assume the user has run `joiner login`; it does not require a Poe API key. API keys via `--api-key`, `POE_API_KEY`, or `~/.poe-tiles/poe-tiles-api-key` are legacy alternatives.
9
+
10
+ **SDK and CLI names.** The SDK package is `joiner-sdk` and the CLI command is `joiner`. Tiles and installs from before the rename use `poe-tiles-sdk` and `poe-tiles`. The old names still work, so an existing tile needs no change. In a tile whose `package.json` has the `poe-tiles-sdk` key, write `poe-tiles-sdk/...` where these docs show `joiner-sdk/...`, and never add the second key. If the shell has no `joiner` command, run `poe-tiles install-joiner`, or use `poe-tiles` in its place. If `remix` of a published tile warns about an unresolved workspace dependency, run `poe-tiles upgrade`, delete the folder that remix made (or pass `--dir` with a new name), then remix again.
11
+
12
+ <a id="poe-tiles-cli-reference"></a>
13
+
14
+ ## Install and Upgrade
15
+
16
+ ```bash
17
+ joiner --version
18
+ joiner upgrade
19
+ joiner upgrade --print
20
+ ```
21
+
22
+ Options:
23
+ - `joiner upgrade --print`: print the equivalent install command without running it.
24
+
25
+ `upgrade` also adds the `joiner` launcher next to `poe-tiles`. After the first upgrade from a CLI that has no launcher, run `poe-tiles install-joiner` once. If a different `joiner` file is already on the `PATH`, the CLI leaves it and prints a warning.
26
+
27
+ ## SDK URL
28
+
29
+ ```bash
30
+ joiner sdk-url
31
+ joiner sdk-url --snippet
32
+ ```
33
+
34
+ - `sdk-url`: print the current SDK tarball URL. Scripts can read this bare URL.
35
+ - `--snippet`: print the `package.json` dependency line, for example `"joiner-sdk": "<url>"`. It uses the SDK key that the project in the current folder has, or `joiner-sdk` when there is no project.
36
+
37
+ ## Global Options
38
+
39
+ ```bash
40
+ joiner --help
41
+ joiner --version
42
+ joiner --json tiles list
43
+ joiner --server http://localhost:8787 tiles list
44
+ joiner --server http://localhost:8787 login
45
+ joiner --api-key "$POE_API_KEY" tiles list
46
+ ```
47
+
48
+ Options:
49
+ - `--json`: output machine-readable JSON.
50
+ - `--server <url>`: override the server URL. `POE_SERVER_URL` is the environment-variable equivalent.
51
+ - `--api-key <key>`: legacy Poe API key override for API-backed commands.
52
+ - `-V, --version`: output the CLI version.
53
+ - `-h, --help`: display help.
54
+
55
+ Environment:
56
+ - `POE_TILES_SESSION_TOKEN`: Joiner session token. Usually created by `joiner login` in `~/.poe-tiles/poe-tiles-session-token`.
57
+ - `~/.poe-tiles/poe-tiles-session-token`: home-directory file containing exactly one Joiner session token.
58
+ - `POE_API_KEY`: legacy Poe API key. Explicit API keys still work via `--api-key`, this env var, or the local API key file.
59
+ - `~/.poe-tiles/poe-tiles-api-key`: legacy home-directory file containing exactly one raw Poe API key.
60
+ - `POE_SERVER_URL`: optional server URL override.
61
+ - `POE_TILES_PUBLISH_TOKEN`: the credential of a Creator session, set by the session itself. It works only on the tile that session publishes. The publish, `tiles get`, `tiles power`, visibility, rename, gallery, channel and version commands work on that tile. For any other tile, including your other tiles, the commands that change a tile or read its channels and versions answer `Tile not found`. Before the session's first publish there is no such tile yet. The credential cannot act as another account, so `--use-poe-account` is refused.
62
+
63
+ Local-only commands that do not need authentication to start: `tiles init`, `skills install`, `upgrade`.
64
+
65
+ ## Config files
66
+
67
+ Existing projects can keep `.poe-app.json` with either historical `poe-app/v2.json` schema URL, on `poe-app-platform-docs.pages.dev` or `poe-tiles-docs.pages.dev`. The CLI reads these files without renaming them or rewriting their contents. If both config filenames exist, all fields other than `$schema` must agree; JSON formatting and property order do not matter. Equivalent files use `.poe-tile.json`. Divergent or malformed files stop the command without changing either file, so reconcile them before continuing. Current field validation still applies, including the explicit `--publish-as-poe` requirement.
68
+
69
+ For copied source with only `.poe-app.json`, Remix preparation validates the original config, keeps its filename and unrelated fields, and records known remix attribution using the current schema, just as it does for `.poe-tile.json`. Ordinary config reads and stored source archives remain unchanged. When both config filenames exist, preparation leaves both untouched and reports that metadata preparation was skipped rather than stamping only one file and leaving a conflicting pair.
70
+
71
+ ## Auth Commands
72
+
73
+ ```bash
74
+ joiner login
75
+ joiner auth whoami
76
+ joiner auth usage
77
+ joiner auth points-history
78
+ joiner auth logout
79
+ joiner --json auth whoami
80
+ ```
81
+
82
+ Commands:
83
+ - `login`: open or print a browser approval URL and save a local CLI session.
84
+ - `auth whoami`: show the current authenticated user.
85
+ - `auth usage`: show point balance.
86
+ - `auth points-history`: show usage history.
87
+ - `auth logout`: end the current session.
88
+
89
+ Options:
90
+ - `joiner login --remote`: print a browser approval URL/code for opening in any browser, useful on SSH or remote machines.
91
+ - `joiner login --no-open`: compatibility alias for printing the browser approval URL without opening a browser.
92
+ - `joiner login --open`: force opening the browser approval URL in this machine's browser.
93
+ - `joiner login --device-label <label>`: label the device shown in the approval UI.
94
+ - Global `--json` is useful for scripting.
95
+
96
+ When an agent runs `login` for a user, the user must see the approval link in chat:
97
+ - Start `joiner login` as a background command. It keeps polling until the user approves, so a foreground tool call returns no output until login has already finished.
98
+ - As soon as it prints the approval URL and the `Enter code:` line, post the URL to the user as a clickable Markdown link (`[Approve Joiner sign-in](<url>)`) and the code as text.
99
+ - Post the link even when the CLI says it is opening the browser; a browser launched from an agent's shell may not appear.
100
+ - Wait for `Logged in successfully.`, then confirm with `joiner auth whoami`.
101
+
102
+ ## Remix Command
103
+
104
+ ### `remix`
105
+
106
+ ```bash
107
+ joiner remix app_123
108
+ joiner remix myuser my-app
109
+ joiner remix myuser/my-app --dir ./my-local-copy
110
+ ```
111
+
112
+ Arguments:
113
+ - `<typeIdOrCreatorName>`: app ID, `userHandle/appHandle`, or creator name when paired with `[handle]`.
114
+ - `[handle]`: app handle when the first argument is a creator name.
115
+
116
+ After unpacking, `remix` makes the copy usable on its own:
117
+ - Rewrites the `joiner-sdk` dependency in `package.json` from a workspace reference to the published SDK tarball URL, so `bun install` resolves the SDK.
118
+ - For first-party bundles (package name `@poe-tile/*` with a workspace `joiner-sdk` dependency), pins any declared `@playwright/test`, `playwright`, and `playwright-core` dependencies to the monorepo's tested versions and adds matching exact `overrides` for all three. External apps keep their declared Playwright versions; bundles without Playwright dependencies get no Playwright overrides.
119
+ - Installs the SDK skills (tile-creator, synced-store) into `.claude/skills/`.
120
+
121
+ The Playwright pins preserve the tested versions after the source leaves the
122
+ monorepo. Fresh caret resolution can otherwise pick a newer release before all
123
+ three npm packages are available. Keep the pins after that publication completes:
124
+ they prevent recurrence and make upgrades deliberate, including patch and security
125
+ updates. To upgrade an existing remix, choose a release available for all three
126
+ packages, set its declared Playwright dependencies and all three overrides to
127
+ that same exact version, then run `bun install` to update the existing lockfile.
128
+ Commit the manifest and lockfile together.
129
+ Upgrading the CLI alone does not update existing remixes' Playwright versions.
130
+
131
+ If the source carries other internal workspace dependencies (apps published from a monorepo sometimes do), `remix` leaves them intact and warns — they have no published package and `bun install` will fail until you remove or replace them.
132
+
133
+ Options:
134
+ - `--dir <path>`: output directory for the unpacked source bundle. Defaults to the app handle. The directory must not already exist.
135
+ - `--no-skills`: skip installing the SDK skills into `.claude/skills/`.
136
+
137
+ ## Apps Commands
138
+
139
+ ### `tiles init`
140
+
141
+ ```bash
142
+ joiner tiles init
143
+ joiner tiles init my-app --template solidjs
144
+ joiner tiles init my-game --template phaserjs --output-dir ./poe-tiles
145
+ joiner tiles init my-app --template react --no-skills
146
+ joiner tiles init my-app --template vanilla-js --no-blank
147
+ joiner tiles init my-proto --template react --no-store
148
+ ```
149
+
150
+ Arguments:
151
+ - `[app-name]`: app name, lowercase alphanumeric plus hyphens.
152
+
153
+ Options:
154
+ - `-t, --template <template>`: one of `react`, `vanilla-js`, `solidjs`, `preact`, `phaserjs`.
155
+ - `--workspace-sdk`: resolve `joiner-sdk` through `workspace:*` instead of the published tarball.
156
+ - `--internal-mono-repo`: configure an internal ai-app monorepo scaffold. Implies `--workspace-sdk`.
157
+ - `--output-dir <path>`: parent directory for the new app. Defaults to the current directory.
158
+ - `--no-skills`: skip copying SDK skills into `.claude/skills/`.
159
+ - `--no-blank`: keep the todo-list example instead of blanking generated app code.
160
+ - `--no-store` (experimental): scaffold without synced-store. No `synced-store/`, `client.ts`, backend entry, mutator test, or e2e tests; state is in memory only and the generated `.poe-tile.json` has no `sourceBundle`. For throwaway prototypes.
161
+
162
+ ### `tiles list`
163
+
164
+ ```bash
165
+ joiner tiles list
166
+ joiner --json tiles list
167
+ joiner --json tiles list | jq '.[].handle'
168
+ ```
169
+
170
+ Options:
171
+ - No command-specific options. Use global `--json` for scripting.
172
+
173
+ ### `tiles get`
174
+
175
+ ```bash
176
+ joiner tiles get myuser/my-app
177
+ joiner tiles get app_123
178
+ joiner --json tiles get myuser/my-app | jq '.bundleUrl'
179
+ ```
180
+
181
+ Arguments:
182
+ - `<tileHandleOrId>`: app ID or `userHandle/appHandle`.
183
+
184
+ Options:
185
+ - No command-specific options.
186
+
187
+ ### `tiles download-source`
188
+
189
+ ```bash
190
+ joiner tiles download-source myuser/my-app
191
+ joiner tiles download-source app_123 --out ./source-bundle.tar.gz
192
+ ```
193
+
194
+ Arguments:
195
+ - `<tileHandleOrId>`: app ID or `userHandle/appHandle`.
196
+
197
+ Options:
198
+ - `--out <path>`: output path for the downloaded source bundle. Default: `source-bundle.tar.gz`.
199
+
200
+ ### `tiles checkout`
201
+
202
+ ```bash
203
+ joiner tiles checkout myuser/my-game
204
+ joiner tiles checkout app_123 --dir ./my-game --agent codex
205
+ ```
206
+
207
+ Imports one of the caller's own tiles into a new folder for an external coding agent: unpacks the uploaded source, rewrites `joiner-sdk` as `remix` does, replaces the bundled SDK skills with this CLI's copies, runs `bun install`, and prints `cd <dir> && claude` / `cd <dir> && codex`. It records no `remixOf`; publishing from the folder updates the same tile. It records the checked-out version in `.poe-checkout.log`; a later `tiles deploy` or `tiles upload` from the folder asks before replacing versions published since (for example from Creator), refuses without a terminal, and takes `--overwrite-newer` to replace them anyway. It refuses a tile the caller does not own (use `remix`) and a tile without uploaded source. A Creator prototype checks out from the files it last published: `checkout` runs no `bun install` for it, writes `AGENTS.md` and `CLAUDE.md` with prototype instructions, and reports `"prototype": true` in `--json` output. A `tiles deploy` from that folder keeps the prototype's files as the tile's source, so Creator can continue from that version.
208
+
209
+ Arguments:
210
+ - `<tileHandleOrId>`: tile ID or `userHandle/tileHandle`.
211
+
212
+ Options:
213
+ - `--dir <path>`: output directory. Defaults to the tile handle. Must not exist.
214
+ - `--no-install`: skip `bun install`.
215
+ - `--agent <claude|codex>`: start that agent in the folder when ready. Not allowed with `--json`.
216
+
217
+ ### `tiles rename`
218
+
219
+ ```bash
220
+ joiner tiles rename myuser/old-handle new-handle
221
+ joiner tiles rename app_123 new-handle
222
+ ```
223
+
224
+ Arguments:
225
+ - `<tileHandleOrId>`: app ID or `userHandle/appHandle`.
226
+ - `<newHandle>`: new lowercase alphanumeric-plus-hyphens handle, unique per creator.
227
+
228
+ Options:
229
+ - `--use-poe-account`: rename an app owned by the `@poe` system account. Requires an allowlisted API key.
230
+
231
+ ### `tiles power`
232
+
233
+ Show the 7-day battery and heat report for tiles you own: a verdict (`ok`,
234
+ `watch`, `hot`, `insufficient_data`, or `not_computed`), its reason codes and
235
+ context codes listed apart, and the measurements behind it, with each battery
236
+ outcome compared with the typical tile. By default a tile is measured over its
237
+ newest published versions that together reach 30 phone sessions, walked back
238
+ from the live version; the `Measured` row names them, and a `hot` or `watch`
239
+ verdict says what it is based on. Owner only. The tile-creator skill's
240
+ [power report reference](../tile-creator/references/power-report.md) explains
241
+ every code and how to act on it.
242
+
243
+ ```bash
244
+ joiner tiles power myuser/my-app # one tile you own
245
+ joiner tiles power # every tile you own
246
+ joiner --json tiles power myuser/my-app # the full report, every measurement
247
+ joiner tiles power myuser/my-app --version 12 # one published version on its own
248
+ joiner tiles power myuser/my-app --all-versions # the newest versions, one row each
249
+ ```
250
+
251
+ Arguments:
252
+ - `[tileHandleOrId]`: app ID or `userHandle/appHandle`. Omit it to report every
253
+ tile you own, or, in a Creator session (`POE_TILES_PUBLISH_TOKEN` set), the
254
+ tile that session publishes.
255
+
256
+ Options:
257
+ - `--version <n>`: read one published version's own report instead of the
258
+ measured set, with no qualifier and no `Current build` row. In a Creator
259
+ session it needs no tile argument. A version that does not exist is
260
+ `Version not found`.
261
+ - `--all-versions`: read one tile's newest published versions, each with its
262
+ own report: the default report in full, then one row per version, newest
263
+ first, with its verdict, reasons, sessions and Android and iPhone readings.
264
+ It needs the tile named, except in
265
+ a Creator session. With `--json`, the default report's tile is `tile` and
266
+ the rows are `versions`, each with `version_number`, `published_at`,
267
+ `display_name`, `channels` and that version's `report`; `more_versions` says
268
+ whether the tile has older ones, and `rebuilt_during_read` that the hourly
269
+ report was rebuilt part-way, so the rows mix two reports and the command is
270
+ worth running again. It cannot be combined with `--version`.
271
+ - `--limit <n>`: with `--all-versions`, how many versions to read (default 20,
272
+ at most 50). Each version is one read of a report that allows your account
273
+ 60 reads a minute, shared with the dashboard and your other sessions; when
274
+ that limit is met the command fails and prints no rows, so wait a minute
275
+ and run it again.
276
+
277
+ Notes:
278
+ - In a Creator session the command reads only the session's own tile, and only
279
+ after a preview has been published; naming any other tile is refused as not
280
+ one of your tiles.
281
+ - The report is rebuilt hourly. It answers "not available yet" until the first
282
+ hourly report exists.
283
+
284
+ ### `tiles channels`
285
+
286
+ Show a tile's release channels — which version is **live** (what players run)
287
+ and which versions custom channels serve, plus each channel's schema version. Owner
288
+ only. Note: schema versions are not populated by the publish path yet, so the
289
+ schema column currently shows as unknown/null for every channel.
290
+
291
+ ```bash
292
+ joiner tiles channels myuser/my-app
293
+ joiner --json tiles channels app_123
294
+ ```
295
+
296
+ Arguments:
297
+ - `<tileHandleOrId>`: app ID or `userHandle/appHandle`.
298
+
299
+ ### `tiles set-channel` / `tiles delete-channel`
300
+
301
+ Point a custom channel at a specific published version, or delete it.
302
+ Owner only. Use these to keep named test channels separate from live.
303
+
304
+ ```bash
305
+ joiner tiles set-channel myuser/my-app beta 3 --no-auto-advance # pin beta to v3
306
+ joiner tiles set-channel myuser/my-app beta 5 # create/point a custom "beta" channel (manual)
307
+ joiner tiles set-channel myuser/my-app beta 6 --auto-advance # make it follow the newest upload
308
+ joiner tiles delete-channel myuser/my-app beta # remove a custom channel
309
+ ```
310
+
311
+ Arguments:
312
+ - `<tileHandleOrId>`: app ID or `userHandle/appHandle`.
313
+ - `<channel>`: channel name — lowercase letters, digits, and hyphens.
314
+ - `<versionNumber>` (set-channel): the published version to point at.
315
+
316
+ Notes:
317
+ - `live` is the only reserved channel name: it cannot be set or deleted with
318
+ these commands. Live moves through `tiles promote`, `tiles deploy`, or
319
+ its follow-latest preference.
320
+ - `staging` is an ordinary custom channel name. Its old automatically maintained
321
+ channel was retired; creators can create, repoint, and delete their own.
322
+ - `--auto-advance` makes the channel jump to the newest version on every upload
323
+ and `--no-auto-advance` pins it manually. Omitting both flags preserves the
324
+ channel's current setting. A brand-new custom channel starts manual.
325
+
326
+ ### `tiles auto-advance` / `tiles promote`
327
+
328
+ Live follows the latest upload by default. Pin live before uploading a version
329
+ that should remain a test, then promote the tested version without re-uploading:
330
+
331
+ ```bash
332
+ joiner tiles auto-advance myuser/my-app off # pin live before a test-only upload
333
+ joiner tiles upload # record a version; pinned live stays unchanged
334
+ joiner tiles promote myuser/my-app 3 # release existing v3 and leave live pinned
335
+ joiner tiles auto-advance myuser/my-app on # resume following future uploads
336
+ ```
337
+
338
+ These owner-only commands take an app ID or `userHandle/appHandle` followed by
339
+ `on|off` or a published version number, respectively. In a managed Creator
340
+ workspace, follow the host's publishing and channel rules.
341
+
342
+ ### `tiles upload` / `tiles deploy`
343
+
344
+ **An upload records a new version, and live follows new uploads by default.**
345
+ For a test-only upload to an existing tile, turn off live auto-advance first.
346
+ With live pinned, a plain upload leaves live unchanged; `tiles deploy` is the
347
+ same upload plus an explicit promote, making that new build live in one step.
348
+ Use `tiles channels` to inspect the current state and `tiles promote` to release
349
+ an existing version without re-uploading. Read
350
+ [publish rollout](../tile-creator/references/publish-rollout.md) for the full
351
+ upload-then-promote workflow and version previews. (`tiles publish` is the
352
+ upload command's old name and still works as an alias; its deprecated
353
+ `--promote` flag is what `tiles deploy` replaces.)
354
+
355
+ ```bash
356
+ joiner tiles upload # also advances live while it follows latest (default)
357
+ joiner tiles deploy # upload AND make this build live even while live is pinned
358
+ joiner tiles upload --handle my-app --dir ./dist
359
+ joiner tiles upload
360
+ joiner tiles upload --change-summary "Added touch controls and improved scoring."
361
+ # Inside a platform Edit session: preview normally, then finalize the original tile.
362
+ joiner tiles upload --finalize-edit
363
+ joiner tiles upload --finalize-edit --edit-handle renamed-tile
364
+ joiner tiles upload --handle my-app --dir ./dist --display-name "My App" --short-description "A fast party game."
365
+ joiner tiles upload --handle my-app --dir ./dist --source-bundle . --source-bundle-visibility owner_only
366
+ joiner tiles upload --handle my-app --profile-picture ./assets/icon.png --long-description ./README.md
367
+ joiner tiles upload --handle my-app --profile-picture="" --short-description="" --long-description=""
368
+ ```
369
+
370
+ Options:
371
+ - `--handle <handle>`: app handle. Required unless `.poe-tile.json` provides one.
372
+ - `--dir <path>`: directory containing app files and `index.html`. Defaults to `.poe-tile.json` `runtimeBundle.dir`, or `dist`.
373
+ - `--publish-as-poe`: upload under the `@poe` system account. Requires an allowlisted API key.
374
+ - `--no-publish-as-poe`: upload under the calling user (the default).
375
+ - `--source-bundle <path>`: source-code directory to upload alongside the runtime bundle. Requires `--source-bundle-visibility`.
376
+ - `--source-bundle-visibility <vis>`: `owner_only` or `public`.
377
+ - `--source-bundle-ignore <path>`: ignore file with extra source-bundle exclusion patterns.
378
+ - `--profile-picture <pathOrUrl>`: app icon. Local PNG/JPG/WEBP <=512 KB, or an `https://` URL. Empty string clears.
379
+ - `--short-description <text>`: one-line tagline <=140 chars. Empty string clears.
380
+ - `--long-description <path>`: markdown file <=16 KB. Empty string clears.
381
+ - `--display-name <name>`: human-friendly name <=80 chars. Empty string clears.
382
+ - `--change-summary <text>`: per-upload user-facing summary <=500 chars, included in Creator chat receipts.
383
+ - `--finalize-edit`: inside a platform Edit session, upload the current project to the original tile instead of its unlisted preview. The server rejects this outside the matching Edit session.
384
+ - `--edit-handle <handle>`: with `--finalize-edit`, explicitly rename the original tile; otherwise its current handle is preserved.
385
+
386
+ `tiles deploy` accepts the same options. It uploads and then promotes in-band —
387
+ the server promotes under the same request identity that uploaded, so it
388
+ composes with `--publish-as-poe` and the other publish-as identities. To release
389
+ an already published version, use `tiles promote` instead. See the
390
+ publish-rollout reference for schema-downgrade limitations.
391
+
392
+ Use the current schema v10 to set the config-only `instancing` field
393
+ (there is no CLI flag for it):
394
+
395
+ ```json
396
+ {
397
+ "$schema": "https://joiner-docs.pages.dev/schemas/poe-tile/v10.json",
398
+ "handle": "word-duel",
399
+ "instancing": "per-context"
400
+ }
401
+ ```
402
+
403
+ `per-launch` is the default. Omitting `instancing` on a later upload preserves the existing value; set `"per-launch"` explicitly to reset it.
404
+
405
+ Categories are assigned automatically by the platform. Do not submit a
406
+ `categories` field. If a legacy `.poe-tile.json` contains it, delete the top-level
407
+ field (including a `null` or empty value) and retry; keep other metadata intact.
408
+
409
+ For questions about when players receive a released build, read [player update behavior](references/player-updates.md). It distinguishes version-pinned previews from live updates and explains device caching and reloads.
410
+
411
+ ## Store Commands
412
+
413
+ Store commands use the authenticated user-router WebSocket. Each command accepts `--timeout-ms <ms>` where listed; default is `15000`.
414
+
415
+ ### `stores access`
416
+
417
+ ```bash
418
+ joiner stores access todo-store room-1
419
+ joiner stores access todo-store room-1 --timeout-ms 30000
420
+ ```
421
+
422
+ Arguments:
423
+ - `<typeId>`: store type ID.
424
+ - `<instanceId>`: store instance ID.
425
+
426
+ Options:
427
+ - `--timeout-ms <ms>`: WebSocket open and response timeout in milliseconds.
428
+
429
+ ### `stores pull`
430
+
431
+ ```bash
432
+ joiner stores pull todo-store room-1 --after-version 0
433
+ joiner stores pull todo-store room-1 --after-version 42 --target-local-bytes 2000000
434
+ joiner --json stores pull todo-store room-1 --after-version 0 | jq '.patches'
435
+ ```
436
+
437
+ Arguments:
438
+ - `<typeId>`: store type ID.
439
+ - `<instanceId>`: store instance ID.
440
+
441
+ Options:
442
+ - `--after-version <version>`: only return patches after this store version. Default: `0`.
443
+ - `--target-local-bytes <bytes>`: target local data budget for the pull. Default: `1000000`.
444
+ - `--timeout-ms <ms>`: WebSocket open and response timeout in milliseconds.
445
+
446
+ ### `stores schema`
447
+
448
+ ```bash
449
+ joiner stores schema todo-store room-1
450
+ joiner --json stores schema todo-store room-1 | jq '.commands.mutators'
451
+ ```
452
+
453
+ Arguments:
454
+ - `<typeId>`: store type ID.
455
+ - `<instanceId>`: store instance ID.
456
+
457
+ Options:
458
+ - `--timeout-ms <ms>`: WebSocket open and response timeout in milliseconds.
459
+
460
+ ### `stores get`
461
+
462
+ ```bash
463
+ joiner stores get todo-store room-1 todos todo-1
464
+ joiner --json stores get todo-store room-1 todos todo-1 | jq '.value'
465
+ ```
466
+
467
+ Arguments:
468
+ - `<typeId>`: store type ID.
469
+ - `<instanceId>`: store instance ID.
470
+ - `<tableName>`: table name visible to the authenticated user.
471
+ - `<itemKey>`: item key.
472
+
473
+ Options:
474
+ - No command-specific options. Global `--json` is useful for scripting.
475
+
476
+ ### `stores scan`
477
+
478
+ ```bash
479
+ joiner stores scan todo-store room-1 todos --limit 50
480
+ joiner stores scan todo-store room-1 todos --sort-key-prefix active --limit 20
481
+ joiner stores scan todo-store room-1 todos --cursor '{"itemKey":"todo-1","sortKey":"active"}' --limit 20
482
+ joiner stores scan todo-store room-1 todos --cursor '$last' --reverse --limit 20
483
+ joiner --json stores scan todo-store room-1 todos --limit 50 | jq '.items'
484
+ ```
485
+
486
+ Arguments:
487
+ - `<typeId>`: store type ID.
488
+ - `<instanceId>`: store instance ID.
489
+ - `<tableName>`: table name visible to the authenticated user.
490
+
491
+ Options:
492
+ - `--sort-key-prefix <prefix>`: only include sort keys with this prefix.
493
+ - `--item-key-prefix <prefix>`: only include item keys with this prefix.
494
+ - `--cursor <cursor>`: entry-key JSON cursor, `$first`, or `$last`.
495
+ - `--limit <count>`: maximum number of items to return.
496
+ - `--reverse`: scan in descending order.
497
+
498
+ ### `stores action`
499
+
500
+ ```bash
501
+ joiner stores action todo-store room-1 countTodos
502
+ joiner stores action todo-store room-1 summarize --input '{"status":"open"}'
503
+ joiner stores action todo-store room-1 importPreview --input-file ./input.json
504
+ joiner --json stores action todo-store room-1 countTodos | jq '.result'
505
+ ```
506
+
507
+ Arguments:
508
+ - `<typeId>`: store type ID.
509
+ - `<instanceId>`: store instance ID.
510
+ - `<actionName>`: action name.
511
+
512
+ Options:
513
+ - `--input <json>`: inline JSON input.
514
+ - `--input-file <path>`: read action input JSON from a file.
515
+
516
+ Omit both input options to pass `{}`. Pass at most one of `--input` or `--input-file`.
517
+
518
+ ### `stores mutate`
519
+
520
+ ```bash
521
+ joiner stores mutate todo-store room-1 setTodo --input '{"id":"todo-1","text":"Buy milk"}'
522
+ joiner stores mutate todo-store room-1 clearDone --input null
523
+ joiner stores mutate todo-store room-1 importTodos --input-file ./input.json
524
+ joiner --json stores mutate todo-store room-1 setTodo --input '{"id":"todo-1","text":"Buy milk"}' | jq '.version'
525
+ ```
526
+
527
+ Arguments:
528
+ - `<typeId>`: store type ID.
529
+ - `<instanceId>`: store instance ID.
530
+ - `<mutationName>`: mutator name.
531
+
532
+ Options:
533
+ - `--input <json>`: inline JSON input.
534
+ - `--input-file <path>`: read mutator input JSON from a file.
535
+ - `--timeout-ms <ms>`: WebSocket open and response timeout in milliseconds.
536
+
537
+ Pass exactly one of `--input` or `--input-file`.
538
+
539
+ ### `store files upload`
540
+
541
+ ```bash
542
+ joiner store files upload touch-grass room-1 ./photo.jpg --content-type image/jpeg
543
+ joiner --json store files upload touch-grass room-1 ./photo.jpg | jq '.fileId'
544
+ ```
545
+
546
+ Arguments:
547
+ - `<typeId>`: store type ID.
548
+ - `<instanceId>`: store instance ID.
549
+ - `<file>`: local path to a non-empty file of at most 10 MiB.
550
+
551
+ Options:
552
+ - `--name <name>`: display name; defaults to the local file's basename.
553
+ - `--content-type <type>`: receiver hint; the platform inspects the bytes authoritatively.
554
+
555
+ The authenticated user must be an active instance member, and the app must opt
556
+ in with `_requestUploadUrl`. Claim the returned `fileId` in a
557
+ `fileRefs`-declared field using `store mutate`; unclaimed uploads expire.
558
+
559
+ ## Model Commands
560
+
561
+ ```bash
562
+ joiner models list
563
+ joiner --json models list | jq '.[].id'
564
+ ```
565
+
566
+ Options:
567
+ - No command-specific options.
568
+
569
+ ## Account Commands
570
+
571
+ ```bash
572
+ joiner accounts list
573
+ joiner accounts unlink github
574
+ joiner --json accounts list
575
+ ```
576
+
577
+ Commands:
578
+ - `accounts list`: list linked OAuth accounts.
579
+ - `accounts unlink <providerId>`: unlink one connected account.
580
+
581
+ Arguments:
582
+ - `<providerId>`: provider ID to unlink.
583
+
584
+ Options:
585
+ - No command-specific options.
586
+
587
+ ## Skills Commands
588
+
589
+ ```bash
590
+ joiner skills install
591
+ joiner skills install --dir .agents/skills
592
+ joiner skills install --dir path/to/skills
593
+ ```
594
+
595
+ Options:
596
+ - `--dir <path>`: custom target directory. Each skill is written as `<dir>/<skill-name>/`. Without this option, installs both `.claude/skills` and `.agents/skills` and creates `AGENTS.md` if missing, preserving existing project instructions.
597
+
598
+ Install merges with existing skill directories: matching files are overwritten, and user-added files outside the bundle are preserved.
599
+
600
+ ## Scripting Patterns
601
+
602
+ ```bash
603
+ joiner --json tiles list | jq '.[].handle'
604
+ joiner --json auth points-history | jq '[.[] | .cost_points] | add'
605
+ joiner --json stores schema todo-store room-1 | jq '.commands'
606
+ joiner --server http://localhost:8787 --json tiles list
607
+ ```
608
+
609
+ When a user asks for a command's options, prefer `joiner <command> --help` as the final source of truth if the installed CLI may differ from this skill.
@@ -0,0 +1,40 @@
1
+ # Device motion: tilt and shake as input
2
+
3
+ Use this reference before designing input for a tile that mentions tilt, steer, lean, balance, shake, motion, gyro, or accelerometer. It applies to a prototype and to an integrated tile alike; the SDK-specific part (the motion claim, persisting the choice) is in the client API reference's "Device motion" section and applies only once the tile is integrated.
4
+
5
+ Tiles read the web sensor events themselves: `deviceorientation` for tilt and `devicemotion` for shake or impulse. The host delegates the sensor permissions to every tile frame, so the events reach the tile in the Joiner apps and on mobile web; there is no platform API for the readings.
6
+
7
+ ## Three non-negotiables
8
+
9
+ 1. **Touch is the default and tilt is opt-in behind a tap.** Every motion tile ships two complete control schemes: touch (on-screen buttons, drag, or swipe) plus keyboard on desktop, and tilt. The game is finishable with either.
10
+ 2. **Never motion-only.** Laptops have no sensors, some players are denied or decline, and some prefer buttons. A tile whose core loop needs tilt is untestable in the creator's own preview and unplayable for those players.
11
+ 3. **Integrated tiles pair the claim with the subscription.** Call `Poe.motion.claim()` in the same code path that subscribes to motion events and release it where the tile unsubscribes (see the client API reference). A prototype cannot call it; skip it there.
12
+
13
+ ## The recipe
14
+
15
+ Run this from the tap that turns tilt on (the same tap that starts a round also lifts the iOS 30 fps iframe clamp). Never branch on platform.
16
+
17
+ 1. Guard the constructor first, then the method:
18
+ `typeof DeviceMotionEvent !== "undefined" && typeof DeviceMotionEvent.requestPermission === "function"`.
19
+ Where the method exists, call it inside `try/catch`: it rejects without a user gesture. Where it does not exist, subscribe directly.
20
+ 2. Subscribe to both events. Judge `devicemotion` by silence: no sample within about a second of subscribing means no usable sensor. Never judge `deviceorientation` by silence: it fires on change, not on a clock, and Chromium suppresses events while the angles are steady. Holding still is not "no sensor".
21
+ 3. Judge the readings the control needs in the first samples. Tilt needs finite `beta` and `gamma`; impulse needs finite `x`, `y`, and `z` on `accelerationIncludingGravity`. The object can be non-null while an individual axis is `null`, which the spec allows for absent sensors.
22
+ 4. "No usable sensor" is any of: the constructor is missing, the request resolves `denied` or rejects, the first-sample timeout fires, or the readings are not finite. In every case switch to touch controls.
23
+ 5. Say so once. When the player deliberately tapped "use tilt" and the outcome is `denied` or "no sensor", show one message at that moment ("Tilt isn't available here, using touch") before falling back. Silent degradation after an explicit action is a failure. A device that never offered motion needs no message, and the Touch scheme is already in place.
24
+
25
+ Use `deviceorientation` `beta`/`gamma` for tilt steering and `devicemotion.accelerationIncludingGravity` for shake or impulse. Rate is about 60 Hz; smooth with a low-pass filter. Do not `preventDefault` touch events on the play surface.
26
+
27
+ ## Controls model
28
+
29
+ - A visible controls toggle in the tile ("Controls: Touch / Tilt"), default Touch. Choosing Tilt is the tap that runs the recipe; success switches the scheme, failure shows the one-time message and stays on Touch.
30
+ - The toggle stays reachable in play so a player can go back to Touch or retry Tilt later. iOS Safari remembers a denial for the tab (there is no per-site Motion setting to reset); the player gets asked again after closing the tab and reopening the page. Inside the Joiner app a retry simply works once the app grants the permission for its own pages.
31
+ - Calibration on entering Tilt: capture the current orientation as neutral ("hold the phone how you want to play, tap to start"), apply a dead zone and a low-pass filter, remap axes by `screen.orientation.type` in landscape, and recalibrate on orientation change.
32
+ - Persist the choice: in memory for a prototype; in a `privateOfUser` table once the tile is integrated, scoped to the instance and the player (reopening the same instance on any device restores it; a new instance starts on Touch). Browser storage is blocked in the sandbox.
33
+
34
+ ## Where motion events arrive
35
+
36
+ Desktop preview and the multiplayer simulation have no sensors. The Android app, Android Chrome, and iOS Safari (behind Safari's per-site prompt) deliver events; the Joiner iOS app does once its release with the permission grant ships, and until then shows WebKit's own permission prompt once per app launch (a decline is "no usable sensor" to the recipe). A tile opened inside another tile receives motion on Android (app and Chrome) only; on iOS and desktop the nested frame has no sensor constructors, which the recipe handles as "no usable sensor".
37
+
38
+ ## Prototypes
39
+
40
+ A prototype is a single `index.html` with no SDK, so everything above applies unchanged except the claim: during prototyping, tilt works, the toggle's choice lives in memory, and shake-to-report stays armed (only the creator plays a prototype). The integration step adds the `privateOfUser` row and the `Poe.motion.claim()` call alongside the store.