@onceworlds/cli 0.8.0 → 0.9.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.
- package/README.md +15 -0
- package/dist/cli.js +3600 -140
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,5 +118,20 @@ from the running game and commit them under `store/`. `onceworlds doctor` says w
|
|
|
118
118
|
game the list is the engine's own (`controlsFromActions` on the `actions` that `game.config.js` exports); otherwise it is read
|
|
119
119
|
from the source text (`Input.axis2d`, `Input.button`) and may differ. It only suggests: nothing in it stops a deploy (`--strict` exits with an error on likely bugs, for CI).
|
|
120
120
|
|
|
121
|
+
- `onceworlds api <name or words>` looks the engine up in a few lines instead of the whole reference: a signature, what it
|
|
122
|
+
does, a component's fields or an options object's keys, and an example (`api Shape2D`, `api feel.shake`, `api "camera follow"`;
|
|
123
|
+
`--full` for every field with its doc). `onceworlds recipe [name]` prints short, tested code for a kind of game or a feature
|
|
124
|
+
(tycoon, survival, racing, platformer, shooter, party, rpg, idle, sandbox, chase-ai, inventory, shop, dialogue, day-night), and
|
|
125
|
+
`onceworlds guide [topic]` the engine guide's topics or any heading of the guide or the reference. They read the index of the
|
|
126
|
+
engine installed in the game's `node_modules` (its own version), else the platform's.
|
|
127
|
+
- `onceworlds shot [dir]` saves a picture of the game to look at: the first player's screen a few seconds into a simulated match
|
|
128
|
+
with bots (`--at 20`), or a poster (`--poster cover`), at `--size 1280x720` by default. A 2D game is drawn with no browser, from
|
|
129
|
+
the frame the engine draws, in the engine's font; a 3D game (or `--browser`) is drawn by Chrome, Chromium or Edge from a local
|
|
130
|
+
copy of the game. `--out` picks the file (default `store/shot.png`).
|
|
131
|
+
|
|
132
|
+
Running `onceworlds mcp` gives an AI tool the same as tools: `api_lookup`, `recipe`, `read_guide`, `search_assets` (the engine's
|
|
133
|
+
asset library), `check`, `screenshot` (the picture comes back to the model), `new_game`, `deploy_preview`, `playtest` and
|
|
134
|
+
`game_status`.
|
|
135
|
+
|
|
121
136
|
Games talk to the platform through the injected `window.onceworlds` SDK. The
|
|
122
137
|
starter template's `AGENTS.md` documents it for AI coding tools.
|