@onceworlds/cli 0.9.3 → 0.9.4

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 (3) hide show
  1. package/README.md +8 -3
  2. package/dist/cli.js +700 -201
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -105,7 +105,7 @@ from the running game and commit them under `store/`. `onceworlds doctor` says w
105
105
  - `onceworlds init [dir]` sets a game folder up, with the files the dashboard's import commits. It writes
106
106
  `onceworlds.json` (the link and name come from `package.json`'s name or the folder's; `dir` is your build's
107
107
  output folder when `package.json` has a build script, else `.` or the folder with your `index.html`),
108
- `.github/workflows/onceworlds.yml`, a `.gitignore` (`node_modules/` and the pictures `shot` saves; to one you have it adds only
108
+ `.github/workflows/onceworlds.yml`, a `.gitignore` (`node_modules/` and the pictures `shot` and `shot --story` save; to one you have it adds only
109
109
  those lines, once), and the guide for AI coding tools as `AGENTS.md` with a `CLAUDE.md` that
110
110
  imports it (next to a `AGENTS.md` of your own it writes `ONCEWORLDS.md` and adds a pointer to yours). It never
111
111
  overwrites a file you have: `--force` replaces only what init writes, never your own `AGENTS.md`, `CLAUDE.md` or `.gitignore`.
@@ -113,6 +113,11 @@ from the running game and commit them under `store/`. `onceworlds doctor` says w
113
113
  Then commit, push, and import the repo at https://onceworlds.com/create?new=github.
114
114
  - `onceworlds deploy [dir]` uploads only the files that changed and publishes the game
115
115
  (the workflow runs it). It lists every file it skipped because Onceworlds can't serve it. A game's tests never go up: `*.test.js`, `vitest.config.*` and the `test/` folder at the top of the game.
116
+ - `onceworlds serve [dir]` plays the game in your own browser on this computer, offline and with no login: it serves the folder
117
+ (onceworlds.json's `dir`) with the import map the platform adds for the engine (the installed package's files, else the hosted
118
+ copy of the engine this CLI ships with). With no platform around it the engine's stand-in is the platform: you alone in a room
119
+ of your own, the lobby's Start button (engine 1.3.2 on; older ones start a match with `?autoplay`), saves in memory, and
120
+ `--bots 3` (the default) bots beside you in a game whose roster gives bots a body. `--port` picks the port (default 8788).
116
121
  - `onceworlds dev [dir]` deploys to a local Onceworlds platform (for platform development)
117
122
  and redeploys on every save. `--players 3` also prints links for players 2 and 3 (`?player=N`): on a
118
123
  local platform each is another player, so one person can fill a lobby.
@@ -145,8 +150,8 @@ from the running game and commit them under `store/`. `onceworlds doctor` says w
145
150
  `store/story/` and lays them out on one contact sheet, `store/story.png`, with the questions to ask of it.
146
151
 
147
152
  Running `onceworlds mcp` gives an AI tool the same as tools: `api_lookup`, `recipe`, `read_guide`, `search_assets` (the engine's
148
- asset library), `check`, `screenshot` (the picture comes back to the model), `new_game`, `deploy_preview`, `playtest` and
149
- `game_status`.
153
+ asset library), `check`, `screenshot` (the picture comes back to the model), `serve` (an address for the user to play it at),
154
+ `new_game`, `deploy_preview`, `playtest` and `game_status`.
150
155
 
151
156
  Games talk to the platform through the injected `window.onceworlds` SDK. The
152
157
  starter template's `AGENTS.md` documents it for AI coding tools.