five-on-it / apps/tools/src/cli
apps/tools/src/cli
The level pipeline's command line (node apps/tools/src/cli.ts <command>, wrapped by the root level:* scripts):
export-level [scene] [--watch]: read every scene folder of the editor project (or one) and export it topackages/world/levels/<name>.json, remove what a gone scene left behind and rewrite the registrypackages/world/levels/index.ts;--watchkeeps doing it while the editor saves.port-level <level | file.json> [--scene <name>]: build an editor scene from a bundled level or a level file (the scene is named after the level unless told otherwise).recipe-level <file.recipe.json> --scene <name>: build an editor scene from a recipe (kit pieces and blocks placed, roads, spawns; the kits read fromapps/level-editor/assets/kits/), the way the Blender generators describe a level.dress-level <level | file.json> [--out <file.recipe.json>]: the recipe that places thecitykit's pieces where a block level has its blocks, to be built withrecipe-level.region-level <spec.json> [--out <dir>]: a level from aregionspec, without Blender: its own kit, its recipe and its places written into the kits folder (or--out), its map printed; thenrecipe-levelandexport-levelas for any recipe.city-level <spec.json> [--out <dir>] [--check]: a level from acityspec: the solver's plan built by Blender (city.py) into the kits folder (or--out), its map printed; thenrecipe-levelandexport-level.--checkruns the solver alone: the spec's problems, or its map.new-level <name>: an editor scene with nothing but a ground and a spawn point. Scenes are namedtest-<words>(a test level) ormain-<words>(a level that ships).build-blocks [--out <file>]: the block library alone, as a.babylonasset to drag into any scene.check-levels: the gate (names, exports current, levels playable, no orphan, registry current, skill copies alike, the kit library current).kits-export: the kit library, every piece of the shared kits (its footprint, tags, anchors…), written topackages/catalogue/src/kits.generated.jsonfor the catalogue; run it after regenerating a kit.osm-tags [--check]: the OpenStreetMap tag snapshot the buildings are made from, asked of taginfo and written topackages/catalogue/src/osm/osm-tags.json(--checkreads the one there is, without the network).play [level]: export, run the game on the level, re-export while the editor saves.audio-placeholders [--force]: the radio's sample stations' placeholder items (spoken idents and episodes over synthesized music, encoded to MP3 by Blender), each one only when it is not there yet (--force: all of them, over what is there).
Opening the editor itself is npm run level:editor (build/editor.mjs).