Skip to content

CLI reference ​

molen is the one entry point to every engine operation. This page is generated from the same OPS_CATALOG contract that molen describe prints and the MCP server serves, so it can never drift from the shipped commands.

Running the CLI

Inside a project that installs @bendyline/molen-tooling (every molen new project does), run npx molen <cmd>; the usage lines below drop the npx. To create that project, name the scoped package — the unscoped molen on npm is unrelated.

sh
npx @bendyline/molen-tooling new my-experience   # scaffold a runnable project
npx molen validate scene.json                    # cheap — do it constantly
npx molen sim run scene.json --ticks 30 --assert checks.json --hash
npx molen shot scene.json --ticks 30 --camera 0,6,16 --look 0,0,0 --out shot.png

47 commands, in the order you tend to meet them. Each entry shows the usage line (where the CLI flag spellings live) and a table of the operation's input fields — the same fields the MCP tool and the @bendyline/molen-tooling function take.

Validate and discover ​

Cheap, fast checks you run constantly. validate gives pinpointed, fixable errors; the rest let an agent learn the surface without reading source.

molen validate ​

Validate a JSON asset against its schema (kind auto-detected from the envelope).

sh
molen validate <path> [--kind <kind>] [--project <project.json>] [--verify-files]
ParameterTypeRequiredDescription
pathstringnoPath to a JSON document (or pass inline over MCP).
inlineobjectnoValidate this inline document instead of reading a path (MCP).
kindstringnoForce a schema kind; otherwise detected from "format".
projectPathstringnoProject manifest for scene type references (default: discovered from the scene path).
verifyFilesbooleannoFor terrain-package manifests, stream-check file containment, size, and SHA-256.
Also available over MCP as validate_asset.

molen schema list ​

List all registered asset schema kinds.

sh
molen schema list

No parameters. Also available over MCP as list_schemas.

molen schema get ​

Get a schema kind: JSON Schema + examples + docs reference.

sh
molen schema get <kind>
ParameterTypeRequiredDescription
kindstringyesSchema kind, e.g. scene, command, assert.
Also available over MCP as get_schema.

molen components ​

List the known component vocabulary (name, description, owning layer).

sh
molen components [--project <project.json>] [--scene <scene.json>]
ParameterTypeRequiredDescription
projectPathstringnoExplicit project.json (default: walk up from cwd).
scenePathstringnoA scene manifest whose custom components extend the vocabulary.
Also available over MCP as list_components.

molen component ​

Get one component schema + examples.

sh
molen component <name> [--project <project.json>] [--scene <scene.json>]
ParameterTypeRequiredDescription
namestringyesComponent name, e.g. transform, collider.
projectPathstringnoExplicit project.json (default: walk up from cwd).
scenePathstringnoA scene manifest whose custom components extend the vocabulary.
Also available over MCP as get_component.

molen describe ​

Machine-readable contracts for every molen operation (CLI + MCP).

sh
molen describe [op]
ParameterTypeRequiredDescription
namestringnoOp/tool name or CLI fragment; omit for the full catalog.
Also available over MCP as describe_op.

molen docs search ​

Lexical search over the shipped engine docs (docs-src bundle).

sh
molen docs search <query> [-k N] [--design]
ParameterTypeRequiredDescription
querystringyesSearch terms.
kint>0noMax results (default 5).
includeDesignbooleannoAlso search the docs/ design plan (tagged).
Also available over MCP as search_docs.

Simulate and verify ​

The headless inner loop. Every run is deterministic, so a state hash is a meaningful regression signal and a replay mismatch localizes the diverging tick.

molen sim run ​

Run a scene headlessly for N ticks; returns tick, state hash, events, assertions.

sh
molen sim run <scene> --ticks <N> [--commands <f>] [--assert <f>] [--setup <m>] [--project <project.json>] [--hash]
ParameterTypeRequiredDescription
scenePathstringyesPath to a scene manifest JSON.
ticksint>0yesNumber of ticks to simulate.
commandsPathstringnoJSON array (or {commands:[...]}) of command envelopes.
assertPathstringnoA molen/assert@1 document to evaluate after the run.
setupModulestringnoESM module exporting setup(world, manifest).
projectPathstringnoExplicit project.json (default: walk up from cwd).
Also available over MCP as run_simulation.

molen sim watch ​

Rerun the simulation + assertions on every input-file change, reporting what moved.

sh
molen sim watch <scene> --ticks <N> [--commands f] [--assert f] [--setup m] [--project <project.json>]
ParameterTypeRequiredDescription
scenePathstringyesScene manifest path.
ticksint>0yesTicks per run.
commandsPathstringnoJSON array (or {commands:[...]}) of command envelopes.
assertPathstringnoA molen/assert@1 document evaluated after every run.
setupModulestringnoESM module exporting setup(world, manifest).
projectPathstringnoExplicit project.json (default: walk up from cwd).
CLI only — not exposed over MCP.

molen replay ​

Replay a fixture and compare the state hash; localizes divergence on mismatch.

sh
molen replay <fixture> [--setup <m>] [--project <project.json>] [--record]
ParameterTypeRequiredDescription
pathstringyesPath to a *.replay.json fixture.
setupModulestringnoESM module exporting setup(world, manifest).
projectPathstringnoExplicit project.json (default: walk up from cwd).
recordbooleannoRegenerate expected hashes from the current build.
Also available over MCP as run_replay.

molen diff ​

Component-level diff between two keyframe JSON files.

sh
molen diff <a.keyframe.json> <b.keyframe.json>
ParameterTypeRequiredDescription
astringyesBefore keyframe path.
bstringyesAfter keyframe path.
Also available over MCP as diff_snapshots.

molen types test ​

Smoke-test every registry type standalone: resolved shape validates, spawns, and survives N simulated ticks.

sh
molen types test [ids…] [--ticks N]
ParameterTypeRequiredDescription
ticksint>0noTicks to simulate each type (default 30).
onlystring[]noRestrict to these type ids.
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as test_types.

Render and play ​

Turn a scene into pixels without a browser — or drive a real built app with scripted input and collect screenshots and diagnostics.

molen shot ​

Render one deterministic headless PNG of a scene; returns render stats.

sh
molen shot <scene> --out <png> [--ticks N] [--setup <m>] [--project <project.json>] [--camera x,y,z] [--look x,y,z] [--size WxH] [--clear-color <css>] [--terrain d.json --heightmap h.png] [--variant ktx2]
ParameterTypeRequiredDescription
scenePathstringyesPath to a scene manifest JSON.
outPathstringyesOutput PNG path.
ticksint>=0noTick to simulate to before snapshotting (default 0).
setupModulestringnoESM module exporting setup(world, manifest).
camera{position,lookAt}noCamera position and optional look-at target.
size[w,h]noImage size (default 1280x720).
clearColorstringnoBackground colour (CSS/hex) instead of the scene default.
projectPathstringnoExplicit project.json (default: walk up from cwd).
assetVariantstringnoRender packed asset variants (e.g. "ktx2" from asset pack) where present.
terrain{descriptorPath,heightmapPath}noRender a terrain descriptor + heightmap.
Also available over MCP as screenshot_scene.

molen frames ​

Render a tick range to a PNG sequence, optionally following a camera track.

sh
molen frames <scene> --out-dir <d> --from <N> --to <M> [--step S] [--track f] [--setup m] [--project <project.json>] [--camera x,y,z] [--look x,y,z] [--size WxH]
ParameterTypeRequiredDescription
scenePathstringyesScene manifest path.
outDirstringyesOutput directory.
fromint>=0yesFirst tick.
toint>=0yesLast tick.
stepint>0noTick stride between frames (default 1).
setupModulestringnoESM module exporting setup(world, manifest).
trackPathstringnoCamera track JSON followed across the range.
camera{position,lookAt}noFixed camera when no track is given.
size[w,h]noImage size (default 1280x720).
projectPathstringnoExplicit project.json (default: walk up from cwd).
Also available over MCP as export_frames.

molen drive ​

PLAY a scene deterministically: commands in at chosen ticks, screenshot frames out — a repeatable scenario the agent can look at.

sh
molen drive <scene|name> --actions <actions.json> --out-dir <d> [--setup m] [--until N] [--assert f] [--project <project.json>]
ParameterTypeRequiredDescription
scenePathstringyesScene file path or project scene name.
actions[{at, command?, screenshot?, camera?}]yesTick-ordered actions: submit a command and/or capture a named frame.
untilint>=0noStep to this tick after the last action.
assertPathstringnomolen/assert@1 doc evaluated at the end.
setupModulestringnoESM module exporting setup(world, manifest).
size[w,h]noFrame size (default 1280x720).
outDirstringnoOutput directory for the frames (MCP returns them as images).
projectPathstringnoExplicit project.json (default: walk up from cwd).
Also available over MCP as drive_scene.

molen play ​

PLAY a built browser experience: timed inputs in, screenshots/probes/diagnostics out.

sh
molen play <built-app-dir> --scenario <experience-play.json> --out-dir <d> [--headed]
ParameterTypeRequiredDescription
appDirstringyesBuilt browser app directory containing index.html.
scenariomolen/experience-play@1yesDeclarative waits, keyboard input, drags, UI actions, probes, and screenshots.
outDirstringnoOutput directory for frames and experience-run.json (MCP uses a temp dir).
Also available over MCP as play_experience.

molen asset shot ​

Render an imported asset from N turntable angles (framed from its sidecar bounds).

sh
molen asset shot <asset-id|sidecar> --out-dir <d> [--angles N] [--clip name --time s] [--variant ktx2]
ParameterTypeRequiredDescription
refstringyesProject asset id or sidecar path.
anglesint>0noTurntable angle count (default 4).
size[w,h]noFrame size (default 1280x720).
projectPathstringnoExplicit project.json (default: walk up from cwd).
clipstringnoPose this animation clip.
clipTimenumber>=0noClip time in seconds (default 0).
assetVariantstringnoRender this packed variant (e.g. "ktx2") instead of the canonical GLB.
Also available over MCP as screenshot_asset.

Projects and types ​

Scaffold an experience (the starter, or a copy of a shipped sample) and manage the namespaced entity type registry.

molen new ​

Scaffold a new experience (scene + scripts + commands + checks + AGENTS.md) ready for the loop, or a standalone copy of a shipped sample with --template.

sh
molen new <name> [--template <id>] [--dir <path>] [--force]
ParameterTypeRequiredDescription
namestringyesExperience name (also the output folder name).
templatestringnoCopy this sample instead of the built-in starter (list_templates / molen templates lists the ids).
dirstringnoParent directory (default: cwd).
forcebooleannoReplace existing scaffold-owned files (default false).
Also available over MCP as new_experience.

molen templates ​

List the sample templates new_experience can copy (id + one-line description); each scaffolds as a standalone npm project.

sh
molen templates [--json]

No parameters. Also available over MCP as list_templates.

molen project info ​

Show the surrounding project.json: scenes, types, assets, reservations.

sh
molen project info [--project <path>]
ParameterTypeRequiredDescription
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as get_project.

molen types list ​

List the entity types registered in the project type registry.

sh
molen types list [--project <path>]
ParameterTypeRequiredDescription
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as list_types.

molen types check ​

Validate the type registry: duplicates, cycles, namespace ownership, asset refs, codegen staleness.

sh
molen types check [--project <path>]
ParameterTypeRequiredDescription
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as check_types.

molen types reserve ​

Reserve a type/asset id namespace for an owner (multi-agent vocabulary partitioning).

sh
molen types reserve <namespace> --owner <owner> [--note <s>]
ParameterTypeRequiredDescription
namespacestringyesDotted namespace, e.g. "train".
ownerstringyesOwner identity, e.g. "agent:layout".
notestringnoFree-form note recorded with the reservation.
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as reserve_type.

molen types gen ​

Generate (or verify) the typed component/type-id module plus the ambient types beside each scripts directory.

sh
molen types gen [--check] [--out <path>]
ParameterTypeRequiredDescription
checkbooleannoCompare only; fail when a committed artifact is stale.
outstringnoOutput path override (default: project codegen.out).
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as generate_types.

Assets ​

Import glTF/GLB, inspect what was imported, and stage runtime bundles for the browser.

molen asset import ​

Import a glTF/GLB: normalize, extract bounds + collision (hulls/trimesh), write the asset sidecar, register in project.json.

sh
molen asset import <file.glb> [--id <asset-id>] [--trimesh] [--no-optimize] [--out-dir <d>] [--asset-dir <d>] [--project <project.json>] [--force]
ParameterTypeRequiredDescription
pathstringyesSource .glb/.gltf file.
idstringnoAsset id (default: slugged filename; dotted ids join a namespace).
trimeshbooleannoAlso extract a whole-asset collision trimesh (collision.bin).
optimizebooleannoNormalize pass dedup/prune/weld/quantize (default true).
outDirstringnoAssets root override; retains root/id layout. Mutually exclusive with assetDir.
assetDirstringnoExact bundle directory, relative to cwd. Mutually exclusive with outDir. Omit both to preserve an existing project asset directory.
projectPathstringnoproject.json to register into. Required when the source file sits in a different project than the cwd.
cwdstringnoDirectory to discover the project from (default: process.cwd()).
forcebooleannoReplace an existing asset directory (default false).
Also available over MCP as import_asset.

molen asset inspect ​

Read + validate an asset sidecar (by path or project asset id); --verify re-hashes files.

sh
molen asset inspect <sidecar.json | asset-id> [--verify]
ParameterTypeRequiredDescription
refstringyesSidecar path or registered asset id.
verifybooleannoRe-hash model.glb / collision.bin against the sidecar.
projectPathstringnoExplicit project.json (default: walk up from cwd).
Also available over MCP as inspect_asset.

molen asset list ​

List the assets registered in the surrounding project.

sh
molen asset list [--project <path>]
ParameterTypeRequiredDescription
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as list_assets.

molen asset pack ​

Derive a RUNTIME GLB variant: textures re-encoded as KTX2 (Basis) with mipmaps, power-of-two sized, so the GPU gets ASTC/BC7 instead of RGBA8 (4-8x less texture memory). Recorded as files.variants.<variant>.

sh
molen asset pack <asset-id|sidecar> | --all [--variant ktx2] [--mode auto|etc1s|uastc] [--max-size N] [--no-pot] [--etc1s-quality N] [--uastc-quality N]
ParameterTypeRequiredDescription
refstringnoProject asset id or sidecar path (or pass all: true).
allbooleannoPack every asset registered in the project.
variantstringnoVariant name / file suffix (default "ktx2").
mode`autoetc1suastc`
maxSizeint>=4noLongest texture side after resizing (default 2048).
powerOfTwobooleannoSnap sides to a power of two (default true).
etc1sQualityint 1..255noETC1S quality (default 128).
uastcQualityint 0..4noUASTC pack quality (default 2).
projectPathstringnoExplicit project.json (default: walk up from cwd).
Also available over MCP as pack_asset.

molen asset stage --out-dir ​

Copy registered assets' runtime files (packed variant when requested) into a browser-servable directory and write assets.index.json (id -> URL). Fails on stale assets.

sh
molen asset stage --out-dir <d> [--variant ktx2] [--require-variant] [--clean] [--project <path>]
ParameterTypeRequiredDescription
outDirstringyesOutput directory (created).
variantstringnoStage this packed variant instead of the main GLB.
requireVariantbooleannoFail when an asset lacks the variant (default: warn).
cleanbooleannoRemove a previous staging output first (default false).
projectPathstringnoExplicit project.json (default: walk up from cwd).
Also available over MCP as stage_assets.

Audio ​

Hear what a scene would play without a browser, and build sound banks with provenance.

molen audio plan ​

Run a scene headlessly and list the sounds it would play: looping voices with start/stop ticks, peak gain and pitch range, one-shots by tick, audio.* script events, and unknown sound ids or signals. Hear a scene's audio annotations without a browser.

sh
molen audio plan <scene|name> --ticks <N> [--bank <bank.json,…>] [--commands <f>] [--setup <m>] [--listener <entity>] [--mode <walk|drive|fly>] [--weather <profile>] [--daylight <0..1>] [--project <project.json>] [--json]
ParameterTypeRequiredDescription
scenePathstringyesScene file path or project scene name.
ticksint>0yesTicks to simulate.
bankPathsstring[]nomolen/soundbank@1 files (default: every provides.soundbank in the project's packs).
commandsPathstringnoJSON array (or {commands:[...]}) of command envelopes.
setupModulestringnoESM module exporting setup(world, manifest).
listenerstringnoEntity whose transform is the listener (default: the scene camera).
modestringnolistener.mode for rules: walk, drive, fly…
weatherstringnoWeather profile: sunny, partly-cloudy, overcast, rain, snow, fog.
daylightnumbernosky.daylight 0 (night) – 1 (day); default 1.
projectPathstringnoExplicit project.json (default: walk up from cwd).
Also available over MCP as plan_audio.

molen audio import ​

Add an audio clip to a molen/soundbank@1 file: copy it beside the bank, hash it, probe its duration, and record license and provenance. --append adds a variation to an existing sound.

sh
molen audio import <file> --id <sound.id> --bank <bank.json> --license <spdx> [--source <url>] [--site s] [--author a] [--prompt p] [--generator g] [--description d] [--loop] [--loop-start s] [--loop-end s] [--bus b] [--gain g] [--duration s] [--append] [--copy-to <dir>]
ParameterTypeRequiredDescription
filestringyesAudio file (MP3 recommended; WAV and Ogg accepted).
idstringyesSound id, e.g. "ambience.rain.medium".
bankPathstringyesSound bank JSON to update (created when missing).
licensestringyesSPDX license of the recording, e.g. "CC0-1.0".
sourcestringnoPage of the original recording.
sitestringnoOrigin site: freesound, kenney, opengameart, …
authorstringnoRecordist or creator.
promptstringnoGeneration prompt, for generated clips.
generatorstringnoGenerator/model name, for generated clips.
descriptionstringnoWhat it sounds like (agents choose sounds by it).
loopbooleannoLoop the clip (ambience, engines).
loopStartnumbernoLoop start in seconds.
loopEndnumbernoLoop end in seconds.
busstringnoDefault bus: music, ambience, sfx, ui, voice.
gainnumbernoBase gain (default 1).
durationSnumbernoDuration in seconds; overrides the probed value.
appendbooleannoAdd as another variation of an existing sound.
copyTostringnoDirectory under the bank for copied files (default audio).
Also available over MCP as import_sound.

molen audio check ​

Check a molen/soundbank@1 file and every clip it names: files present, hashes unchanged, durations and loop points consistent, provenance recorded; prints a license summary.

sh
molen audio check <bank.json>
ParameterTypeRequiredDescription
bankPathstringyesSound bank JSON.
Also available over MCP as check_soundbank.

Materials and textures ​

Bake procedural material graphs and round-trip hand-painted UV templates.

molen material bake ​

Bake a material graph / palette ref to a PNG texture.

sh
molen material bake <matgraph.json> -o <png>  [--ref palette:#rrggbb]
ParameterTypeRequiredDescription
pathstringnoMaterial graph JSON path.
inlineobjectnoAn inline molen/matgraph@1 document (MCP).
refstringnoA material ref, e.g. palette:#rrggbb.
outPathstringyesOutput PNG path.
Also available over MCP as rasterize_material.

molen uvpaint apply ​

Import a painted UV template: mask to the island map and dilate the gutters.

sh
molen uvpaint apply <painted.png> --islands <map.png> -o <out.png> [--no-mask] [--dilate N]
ParameterTypeRequiredDescription
paintedPathstringyesPainted texture (from an image model).
islandMapPathstringyesIsland map (flat-filled islands on a dark background).
outPathstringyesOutput PNG path.
maskToIslandsbooleannoMask paint to the islands (default true).
dilationPxint>=0noGutter dilation in pixels.
Also available over MCP as apply_uv_paint.

Worldgen ​

Outlines and labeled polygons into styled buildings and deterministic props.

molen worldgen preview ​

Generate buildings from a style pack in Node and render them headlessly (turntable PNGs). Default batch: one building of every footprint class.

sh
molen worldgen preview [style.archstyle.json] [--pack p] [--style id] [--batch f] [--scatter id] [--ground flat|slope] [--angles N] [--size WxH] --out <png>
ParameterTypeRequiredDescription
stylePathstringnoA standalone molen/archstyle@1 document to preview.
packPathstringnoStyle pack: a stylepack.json or its directory, or a content pack file, URL or source directory (default: the project's content packs).
styleIdstringnoForce every building onto this style id.
batchPathstringnoA molen/worldgen-batch@1 document (default: the lineup).
scatterIdstringnoScatter rule set for the batch scatter request.
ground`'flat''slope'`no
anglesint>0noTurntable angles (default 1).
size[w,h]noViewport in pixels (default 1280x720).
outPathstringnoPNG path (CLI: --out); MCP returns the images directly.
Also available over MCP as worldgen_preview.

molen worldgen bake ​

Generate buildings from a batch document or one outline and bake them to a glTF asset with a molen/asset@1 sidecar.

sh
molen worldgen bake [batch.json] [--outline "x,z;x,z;..."] [--style id] [--pack p] --out <assets-dir> [--id id] [--ground flat|slope] [--project <project.json>] [--force]
ParameterTypeRequiredDescription
batchPathstringnoA molen/worldgen-batch@1 document.
outlinestringnoOne building outline "x,z;x,z;..." in meters (with styleId).
styleIdstringnoStyle id for the outline, or forced onto every building.
packPathstringnoStyle pack: a stylepack.json or its directory, or a content pack file, URL or source directory (default: the project's content packs).
outDirstringyesAssets root; the asset lands in <outDir>/<id>/.
idstringnoAsset id (default: the batch name).
ground`'flat''slope'`no
projectPathstringnoExplicit project.json (default: walk up from cwd).
forcebooleannoReplace an existing asset directory.
Also available over MCP as worldgen_bake.

molen worldgen stats ​

Generate one real terrain-package tile in Node and report counts, histograms, sizes, timings, and determinism; optionally dump the adapted batch.

sh
molen worldgen stats <terrain-package.json> [--tile z/x/y | --auto] [--pack p] [--atlas a] [--style id] [--quality q] [--dump batch.json] [--json]
ParameterTypeRequiredDescription
packagePathstringyesterrain-package.json path.
tilestringno"z/x/y" tile address (default: the package center).
autobooleannoSearch the tiles around the center for the most buildings.
packPathstringnoStyle pack: a stylepack.json or its directory, or a content pack file, URL or source directory (default: the project's content packs).
atlasPathstringnoRegion atlas: a world.atlas.json, or a content pack that provides one (default: the project's content packs).
styleIdstringnoForce every building onto this style id.
quality`'economy''balanced''high'`
dumpPathstringnoWrite the adapted molen/worldgen-batch@1 here.
Also available over MCP as worldgen_stats.

Ambient life ​

Bake real road, rail and path networks so NPC traffic can run in any scene.

molen network bake ​

Bake the roads, railways and paths of a local terrain package into a molen/transport-network@1 document for ambient traffic in scenes without map tiles.

sh
molen network bake <terrain-package.json> (--tile z/x/y [--radius n] | --bbox w,s,e,n) --out network.json [--classes road,rail,path] [--heights] [--json]
ParameterTypeRequiredDescription
packagePathstringyesterrain-package.json path (local PMTiles archives).
tilestringnoCentre tile "z/x/y" at the finest features level.
radiusnumbernoTiles around the centre tile to include (default 0).
bboxnumber[4]noArea [west, south, east, north] in degrees, instead of tile.
classesstring[]noClasses to keep: 'road', 'rail', 'path' (default all).
outPathstringyesWrite the transport-network document here.
heightsbooleannoInclude surface heights from the elevation (default flat).
Also available over MCP as network_bake.

Figures ​

Stylized humans, bipeds and quadrupeds: presets, descriptors, rigs and gaits.

molen figure preview ​

Render figure presets, a molen/figure@1 descriptor, or a built-in lineup headlessly from turntable angles or the art-review view set (PNGs).

sh
molen figure preview [descriptor.figure.json] [--preset id[,id]] [--lineup humans|bodies|species|all] [--mode idle|walk|run|sit|jump|fall] [--tick N] [--tier 0|1|2] [--angles N|review] [--size WxH] --out <png>
ParameterTypeRequiredDescription
preset`stringstring[]`no
descriptorPathstringnoA molen/figure@1 document to render.
descriptorobjectnoAn inline descriptor (the figure component shape).
lineup`'humans''bodies''species'
mode`'idle''walk''run'
tickint>=0noSimulation tick to pose at (default 15).
tier`012`
angles`int>0'review'`no
size[w,h]noViewport in pixels (default 1280x720).
outPathstringnoPNG path (CLI: --out); MCP returns the images directly.
Also available over MCP as figure_preview.

molen figure presets ​

List the shipped figure presets with their resolved descriptors.

sh
molen figure presets [--archetype biped|quadruped] [--json]
ParameterTypeRequiredDescription
archetype`'biped''quadruped'`no
Also available over MCP as list_figure_presets.

Server ​

Expose every operation above to an agent over MCP.

molen mcp ​

Start the MCP server over stdio (exposes every mcpTool in this catalog).

sh
molen mcp

No parameters. CLI only — not exposed over MCP.

Other operations ​

Added since this page was last curated.

molen pack build ​

Build a content pack (molen/pack@1 zip) from a source directory holding molen-pack.source.json. Writes <id>-<hash>.zip and updates index.json in outDir.

sh
molen pack build <sourceDir> --out-dir <d> [--no-solid]
ParameterTypeRequiredDescription
sourceDirstringyesPack source directory (holds molen-pack.source.json).
outDirstringyesOutput directory for the pack file and index.json.
solidbooleannoGroup small text files into compressed solid blocks (default: the source's setting).
Also available over MCP as build_pack.

molen pack inspect ​

Summarize a content pack: id, version, contentHash, sizes, solid blocks, asset ids, roles and the largest files.

sh
molen pack inspect <source>
ParameterTypeRequiredDescription
sourcestringyesBuilt pack file, pack source directory, or http(s) URL.
Also available over MCP as inspect_pack.

molen pack verify ​

Read every file of a content pack checking CRC and sha256, validate each JSON document against its registered schema, and check asset sidecar hashes against their models.

sh
molen pack verify <source>
ParameterTypeRequiredDescription
sourcestringyesBuilt pack file, pack source directory, or http(s) URL.
Also available over MCP as verify_pack.

molen pack extract ​

Write every file of a content pack into a directory, with a molen-pack.source.json that builds it back to the same content.

sh
molen pack extract <source> --out-dir <d>
ParameterTypeRequiredDescription
sourcestringyesBuilt pack file or http(s) URL.
outDirstringyesDirectory to write the files into.
Also available over MCP as extract_pack.

molen pack fetch ​

Download content packs (a pack URL, or a molen/pack-index@1 URL) into the project, list them in index.json in the download directory (so a page can open them), and pin them in project.json packs with their contentHash, so the project runs offline.

sh
molen pack fetch <url> [ids…] [--out-dir <d>] [--project <path>]
ParameterTypeRequiredDescription
urlstringyesURL of a pack file, or of a pack index.
idsstring[]noWith an index URL, fetch only these pack ids (default: all).
outDirstringnoDownload directory (default: packs/ beside project.json).
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as fetch_pack.

molen scripts check ​

Type-check the scene's scripts against their generated declarations: component typos, bad command payloads, unguarded reads.

sh
molen scripts check [--project <path>]
ParameterTypeRequiredDescription
projectPathstringnoExplicit project.json (default: walk up from cwd).
cwdstringnoDirectory to discover the project from (default: process.cwd()).
Also available over MCP as check_scripts.

37 guides · 36 schema formats · 41 API entry points · 10 samples. API, CLI and schema pages are generated from the shipped build.