@genex-ai/cli-demo 1.31.2 → 1.32.0-dev.653
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 +18 -0
- package/dist/blender-mcp-Q6PSFYSE.js +241 -0
- package/dist/blender-serve-BF4FZ55Z.js +244 -0
- package/dist/chunk-2COG4P3T.js +968 -0
- package/dist/chunk-HYCSNWYX.js +126 -0
- package/dist/index.js +4759 -2830
- package/package.json +3 -3
- package/templates/blender-service/demo/castle.py +117 -0
- package/templates/blender-service/gpu_witness.py +245 -0
- package/templates/blender-service/ops.py +225 -0
- package/templates/blender-service/pool.py +910 -0
- package/templates/blender-service/server.py +611 -0
- package/templates/blender-service/supervisor.py +221 -0
- package/templates/blender-service/views.py +281 -0
- package/templates/controllers/character/follow-camera.ts +16 -1
- package/templates/controllers/character/meshy/meshy-loader.ts +3 -2
- package/templates/controllers/quality/deadline.ts +117 -0
- package/templates/controllers/quality/pick-asset.ts +49 -16
- package/templates/controllers/shared/physics-world.ts +6 -4
- package/templates/skills/genex-ai-character/SKILL.md +77 -15
- package/templates/skills/genex-ai-menu/SKILL.md +15 -11
- package/templates/skills/genex-ai-model/SKILL.md +45 -7
- package/templates/skills/genex-ai-texture/SKILL.md +1 -1
- package/templates/skills/genex-ai-video/SKILL.md +75 -17
- package/templates/skills/genex-blender-scene/SKILL.md +243 -0
- package/templates/skills/genex-game-director/SKILL.md +112 -46
- package/templates/skills/genex-game-director/references/design-contract.md +13 -5
- package/templates/skills/genex-game-director/references/routing-map.md +30 -45
- package/templates/skills/genex-getting-started/SKILL.md +2 -2
- package/templates/skills/genex-lane-card/SKILL.md +78 -0
- package/templates/skills/genex-monetization/SKILL.md +11 -17
- package/templates/skills/genex-threejs-adaptive-quality/SKILL.md +21 -0
- package/templates/skills/genex-threejs-character-controller/SKILL.md +17 -5
- package/templates/skills/genex-threejs-creatures/SKILL.md +8 -1
- package/templates/skills/genex-threejs-embed-auth/SKILL.md +12 -8
- package/templates/skills/genex-threejs-game-ui/SKILL.md +55 -6
- package/templates/skills/genex-threejs-procedural-assets/SKILL.md +17 -10
- package/templates/skills/genex-threejs-visual-validation/SKILL.md +12 -2
- package/templates/skills/genex-tool-audio/SKILL.md +3 -2
- package/templates/skills/genex-tool-character/SKILL.md +36 -5
- package/templates/skills/genex-tool-image/SKILL.md +4 -2
- package/templates/skills/genex-tool-model/SKILL.md +32 -6
- package/templates/skills/genex-tool-publish/SKILL.md +100 -0
- package/templates/skills/genex-tool-texture/SKILL.md +1 -1
- package/templates/skills/genex-tool-video/SKILL.md +28 -5
- package/templates/skills/genex-tool-workflow/SKILL.md +4 -1
- package/templates/skills/genex-updates/SKILL.md +1 -1
|
@@ -21,6 +21,17 @@ npx genex model --image ./reference-photo.jpg # build it FROM an image; pr
|
|
|
21
21
|
Blocks until ready, saves the GLB into `./assets`, and prints the path. Wire the
|
|
22
22
|
local path; the URL printed beside it is provenance, not hosting.
|
|
23
23
|
|
|
24
|
+
## Bring your own mesh
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx genex model import ./hero-cart.glb # free — a file you already have becomes a model of yours
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`.glb` only, ≤ 64 MB (export a `.gltf`/FBX as one binary `.glb` first). The
|
|
31
|
+
import is free and checked before it completes; after it, `segment`, `rig`,
|
|
32
|
+
`animate` and `character import` all take its id. **Never rebuild a mesh the
|
|
33
|
+
user hands you** — import it.
|
|
34
|
+
|
|
24
35
|
## Mesh lanes
|
|
25
36
|
|
|
26
37
|
Each takes the **generation id** of a previous model — never a URL.
|
|
@@ -31,29 +42,44 @@ npx genex model rig <model-id> --type quadruped
|
|
|
31
42
|
npx genex model animate <rig-id> --preset walk,run
|
|
32
43
|
```
|
|
33
44
|
|
|
34
|
-
- **`segment`** — one GLB
|
|
45
|
+
- **`segment`** — one GLB split into addressable parts: doors, turrets, magazines, destructibles. `--granularity simple|balanced|detailed`. The parts are named by index (`tripo_part_0`, `tripo_part_1`, …), not by what they are — find the one you want by its bounds (the sails are the part with the widest extent, the door the lowest thin one), then keep that index in your manifest.
|
|
35
46
|
- **`rig`** — a skeleton for any mesh, across 7 body plans: `biped`, `quadruped`, `hexapod`, `octopod`, `avian`, `serpentine`, `aquatic`. The plan is auto-detected; `--type` picks it. A mesh that cannot be rigged is refused and refunded before the paid step.
|
|
36
47
|
- **`animate`** — retarget ready-made clips onto a rig, billed per clip. biped: `idle|walk|run|dive|climb|jump|slash|shoot|hurt|fall|turn`; quadruped/hexapod/octopod: `walk`; serpentine/aquatic: `march`.
|
|
37
48
|
|
|
38
49
|
## Options
|
|
39
50
|
|
|
40
51
|
- `--image <path|url>` — build the model from a reference image (local file ≤ 4 MB, or a previous generation's URL). The prompt becomes optional.
|
|
52
|
+
- **Quality knobs** (Tripo H3.1, each priced in the quote — pick per asset, say it in one line): `--texture standard|detailed|none` (detailed default, +10 over standard; none = geometry only), `--geometry detailed` (+20, hero pieces only), `--quad` (+5, for meshes you will edit; face limit ≤150000), `--low-poly` (+10, game-ready topology for props in numbers — it holds `--face-limit` to 1000-20000, 500-10000 with `--quad`; omit the flag to take 20000; it runs a post-process after the mesh, so allow up to 30 minutes), `--parts` (+20, named parts at generation), `--face-limit <n>` (1000-2000000, default 150000; see `--low-poly` for its band), `--auto-size` (real-world metres).
|
|
41
53
|
- `--out-dir <dir>` — where the file lands (default `./assets`).
|
|
42
54
|
- `--no-download` — print the URL only.
|
|
43
55
|
- `--no-wait` — enqueue and return; pick it up with `npx genex wait <id>`.
|
|
44
56
|
|
|
45
57
|
## Cost
|
|
46
58
|
|
|
47
|
-
|
|
48
|
-
|
|
59
|
+
From **35 credits** a model (**46** from a reference image; `--texture standard`
|
|
60
|
+
**23**, `--geometry detailed` **58**, `--low-poly` **46**, `--parts` **58**) ·
|
|
61
|
+
**46** segment · **29** rig · **12 per clip** for animate (1 credit = $0.01).
|
|
62
|
+
Live prices and your balance: `npx genex doctor`.
|
|
49
63
|
|
|
50
64
|
## Waiting
|
|
51
65
|
|
|
52
66
|
Models take the longest of any lane. `--no-wait` is the normal way to run
|
|
53
67
|
several at once: enqueue them all, keep building, then `npx genex wait --all`
|
|
54
|
-
for one status line each
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
for one status line each — in a tools workspace it also downloads every
|
|
69
|
+
finished model that is not in `./assets` yet, so one call after a break (or a
|
|
70
|
+
restarted session) delivers the whole batch. `npx genex wait <id>` picks one
|
|
71
|
+
up. **Re-running the model command bills a NEW model** — never use it as a
|
|
72
|
+
status check. Five or so in flight at a time is the provider's comfortable
|
|
73
|
+
concurrency; a burst beyond that waits on the server side rather than failing.
|
|
74
|
+
|
|
75
|
+
## Placing a model
|
|
76
|
+
|
|
77
|
+
A generated GLB has no shared "front": one building's door faces −x, the next
|
|
78
|
+
one's +z. Do not guess and do not spend a render per side — read the mesh once
|
|
79
|
+
on load (bounding box, and where the detail is: the door, the counter, the
|
|
80
|
+
opening) or check it in a viewer, then record a per-model `front` (a yaw in
|
|
81
|
+
your manifest) beside its path and apply it when you place it. Ask for a facing
|
|
82
|
+
in the prompt too (`"…front toward +Z"`) — it helps, it does not guarantee.
|
|
57
83
|
|
|
58
84
|
## Troubleshooting
|
|
59
85
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-tool-publish
|
|
3
|
+
description: Put the game in this folder on the web with Genex — the draft page, `npx genex preview`, then `promote` / `publish`; the link you hand the user, the size limits, and what to do with the preflight lines. Installed once the folder is connected to a hosted Genex game (`npx genex init --convert`). Load it before the first preview.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Tools · Publish
|
|
7
|
+
|
|
8
|
+
The user built this game themselves and asked for it online. Your job is to
|
|
9
|
+
put it there **as it is** — the code, the structure and the assets stay
|
|
10
|
+
exactly what they are. Publishing adds glue and nothing else; it never starts
|
|
11
|
+
a rework, a design document or a build plan.
|
|
12
|
+
|
|
13
|
+
## The glue (all of it)
|
|
14
|
+
|
|
15
|
+
1. **A static build.** The game must build to files with its own build
|
|
16
|
+
command — `npm run build` into `dist/`, or an `index.html` at the root
|
|
17
|
+
with no build step. Asset paths must work from the game's own hosted URL,
|
|
18
|
+
so prefer relative ones (Vite: `base: './'`). Files the game loads at
|
|
19
|
+
runtime — everything in `./assets` — must end up inside the build (Vite:
|
|
20
|
+
a `public/` folder, or copy `assets/` into `dist/` in the build).
|
|
21
|
+
2. **Player identity.** Load `$genex-threejs-embed-auth` and add the one
|
|
22
|
+
`initEmbed(...)` call at the very top of the boot code. Create the
|
|
23
|
+
renderer and draw a frame BEFORE any `await waitForPlayer()` — on a hosted
|
|
24
|
+
page identity takes seconds, and a game that awaits it first ships black.
|
|
25
|
+
3. **The CLI as a dev dependency** so plain `npx genex` keeps resolving here
|
|
26
|
+
(setup already did this; check `package.json` if in doubt).
|
|
27
|
+
|
|
28
|
+
Commit the glue as its own small commit when the folder is a git repo, so the
|
|
29
|
+
line between the user's game and what publishing added stays visible.
|
|
30
|
+
|
|
31
|
+
## Preview
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx genex preview
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Builds, uploads and puts the build on the game's **draft page** — unlisted,
|
|
38
|
+
only the user can open it. When it reports live, open the hosted build once
|
|
39
|
+
yourself and confirm it loads with no missing files (the dev server forgives
|
|
40
|
+
paths the hosted build will not), then hand over the link.
|
|
41
|
+
|
|
42
|
+
**The link is always the game's page on Genex, never the raw play address,
|
|
43
|
+
never localhost, never a file path:**
|
|
44
|
+
|
|
45
|
+
- draft: `<dashboard>/draft/<slug>`
|
|
46
|
+
- public, once published: `<dashboard>/world/<slug>`
|
|
47
|
+
|
|
48
|
+
`<dashboard>` is the first `dashboardOrigins` entry in `.genex/project.json`
|
|
49
|
+
and `<slug>` is the `slug` there. `preview` prints the exact page link as
|
|
50
|
+
"your game's page" — use that line verbatim.
|
|
51
|
+
|
|
52
|
+
## The preflight is a report, not a to-do list
|
|
53
|
+
|
|
54
|
+
`preview` prints warning lines before it uploads — an estimated phone GPU
|
|
55
|
+
budget, a music track with no volume slider, a paid asset nobody wired, a
|
|
56
|
+
viewport meta line. None of them blocks the deploy, and none of them was
|
|
57
|
+
asked for. So: **ship first**, hand over the link, then relay each line to
|
|
58
|
+
the user in one plain sentence with an offer ("phones will struggle with the
|
|
59
|
+
textures — want me to shrink them?"). Fix one only on the user's yes. Never
|
|
60
|
+
turn the report into a milestone before the link.
|
|
61
|
+
|
|
62
|
+
## Draft and public version
|
|
63
|
+
|
|
64
|
+
`preview` updates the **draft** and never touches what players are on. The
|
|
65
|
+
first release lists the game:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx genex publish --categories games
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Pick 1–3 categories that fit (`games`, `assets`, `physics`, `terrain`,
|
|
72
|
+
`lighting`, `vfx`); `games` when unsure. Ask before the first publish — "This
|
|
73
|
+
is a private draft only you can open. Say the word and I'll publish it for
|
|
74
|
+
anyone to play." — and celebrate the public page link when it lands.
|
|
75
|
+
|
|
76
|
+
After that first release the game is two versions, and the user only ever
|
|
77
|
+
hears these two words for them: the **draft** (updated by `preview`) and the
|
|
78
|
+
**public version** (what everyone plays). "Publish it", "update it" and "yes"
|
|
79
|
+
after the first release ALL mean:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx genex promote # the exact draft build goes public — no rebuild
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Never run `publish` a second time (it would ship an untried rebuild). If
|
|
86
|
+
anything changed since the last `preview`, preview again before promoting.
|
|
87
|
+
Ask once per round of work, in one line, and keep working while you wait.
|
|
88
|
+
|
|
89
|
+
## Limits and refusals
|
|
90
|
+
|
|
91
|
+
- **Upload size**: ~95 MB per file, ~500 MB in total. Over that, tell the user
|
|
92
|
+
plainly which part is too large (usually a video, model or audio file) and by
|
|
93
|
+
roughly how much; ask before compressing or removing anything.
|
|
94
|
+
- **Terms refusal**: the CLI prints a link, waits for the user's click and
|
|
95
|
+
re-sends by itself — hand the link over and let it finish.
|
|
96
|
+
- **`preview` says the folder is behind another machine** (`stale_source`):
|
|
97
|
+
`npx genex pull` takes the newer draft, then redo the change — never
|
|
98
|
+
`--force` over somebody else's work.
|
|
99
|
+
- **Out of credits or a lane down**: `npx genex doctor` says which; publishing
|
|
100
|
+
itself costs nothing.
|
|
@@ -39,7 +39,7 @@ repeat — the file names carry the role, so the mapping is unambiguous.
|
|
|
39
39
|
|
|
40
40
|
## Cost
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
From **5 credits** for the whole set (1 credit = $0.01). Live prices and
|
|
43
43
|
your balance: `npx genex doctor`.
|
|
44
44
|
|
|
45
45
|
## Waiting
|
|
@@ -18,6 +18,10 @@ npx genex video "candle flame flickering in the dark" --loop
|
|
|
18
18
|
Blocks until ready, saves the mp4 into `./assets`, and prints the path. Wire the
|
|
19
19
|
local path — a shipped build must never fetch the URL at runtime.
|
|
20
20
|
|
|
21
|
+
Every clip carries a **native stereo audio track** (score, foley, ambience).
|
|
22
|
+
Browsers only autoplay muted video, so keep the `<video>` element muted unless
|
|
23
|
+
the sound is the point — and route it through your game's volume control.
|
|
24
|
+
|
|
21
25
|
## Animating a still
|
|
22
26
|
|
|
23
27
|
The strongest results come from conditioning on an image you already approved,
|
|
@@ -29,13 +33,30 @@ npx genex video "camera drifts slowly forward, banners stirring" --frame ./asset
|
|
|
29
33
|
```
|
|
30
34
|
|
|
31
35
|
- `--frame <path|url>` — animate FROM this frame back to itself, i.e. a seamless loop. Local file (≤ 4 MB) or a previous generation's URL.
|
|
32
|
-
- `--
|
|
36
|
+
- `--start-frame <path|url>` — continue from this frame, no end anchor — the clip-chaining primitive.
|
|
37
|
+
- `--first-frame <path|url>` / `--last-frame <path|url>` — a two-frame motion between them. All frame anchors take local files.
|
|
38
|
+
|
|
39
|
+
Frame anchors are **compositional guidance, not pixel-pinning** — the model
|
|
40
|
+
repaints the frame (same scene and composition, not the same pixels), and
|
|
41
|
+
regenerating doesn't change that. Chained clips (a cutscene sequence, a
|
|
42
|
+
branching video story) stay coherent when each clip starts from the previous
|
|
43
|
+
clip's REAL last frame, so drift never accumulates:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
ffmpeg -sseof -0.2 -i ./assets/prev.mp4 -update 1 -q:v 1 last.png
|
|
47
|
+
npx genex video "she turns and walks toward the far door" --start-frame last.png
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Write chained prompts as CHANGE ONLY — the start frame already says everything
|
|
51
|
+
else. Cut clip-to-clip, or crossfade ~200 ms to hide the residual repaint.
|
|
33
52
|
|
|
34
53
|
## Options
|
|
35
54
|
|
|
36
|
-
- `--duration <sec>` — target clip length
|
|
55
|
+
- `--duration <sec>` — target clip length, 5–15 seconds (default 5; clips bill
|
|
56
|
+
per second).
|
|
37
57
|
- `--loop` — a seamless loop.
|
|
38
|
-
- `--resolution <
|
|
58
|
+
- `--resolution <480p|768p|2k|4k>` — default 768p (the top native mode). `2k`/`4k` upscale the same base at ~2–3× the cost; `480p` is the opt-down for clips where fidelity genuinely does not matter. Loop clips ignore it.
|
|
59
|
+
- `--ref <path|url>` — repeatable, up to 9 subject/style reference images, cited in the prompt as "Image 1"…"Image N" — the way one character or art style holds across many clips. Cannot combine with `--frame`/`--loop`.
|
|
39
60
|
- `--open` — also open it in a browser, for something the user must approve.
|
|
40
61
|
- `--out-dir <dir>` — where the file lands (default `./assets`).
|
|
41
62
|
- `--no-download` — print the URL only.
|
|
@@ -43,8 +64,9 @@ npx genex video "camera drifts slowly forward, banners stirring" --frame ./asset
|
|
|
43
64
|
|
|
44
65
|
## Cost
|
|
45
66
|
|
|
46
|
-
|
|
47
|
-
`
|
|
67
|
+
From **23 credits** for a 5 s 768p clip (1 credit = $0.01); longer clips, 2K/4K
|
|
68
|
+
and `--frame` menu loops cost more, and the command prints the exact quote
|
|
69
|
+
before it waits. Live prices and your balance: `npx genex doctor`.
|
|
48
70
|
|
|
49
71
|
## Waiting
|
|
50
72
|
|
|
@@ -55,5 +77,6 @@ command bills a NEW clip** — it is never a way to check on one already running
|
|
|
55
77
|
## Troubleshooting
|
|
56
78
|
|
|
57
79
|
- **It failed** — video fails server-side more often than any other lane, and every attempt is minutes. The CLI counts failures in this folder and tells you when to stop: after the second, use a still image instead and say so in one plain line. A third attempt bills the same and returns the same.
|
|
80
|
+
- **"Prompt rejected"** — the content-safety filter; never retryable with the same wording. The measured false-positive class is anatomy being pierced or entered (cables/wires/needles into a body — biomech vocabulary trips it). Describe the object or machine instead: "a statue-like figure threaded into the wall" passes where "cables entering her spine" fails.
|
|
58
81
|
- **Out of credits** — the error prints balance, price and refill date. Relay it; don't retry.
|
|
59
82
|
- **Anything else** — `npx genex doctor` reports sign-in, credits, and whether the video lane is live.
|
|
@@ -92,4 +92,7 @@ tiling floor and three paid assets nobody loaded.
|
|
|
92
92
|
Hosting, publishing, multiplayer, remixing and custom domains are the Genex
|
|
93
93
|
platform, not this toolkit — those commands are refused in this folder by
|
|
94
94
|
design, and the refusal says where they live. This workspace generates assets
|
|
95
|
-
for a game you build and ship yourself.
|
|
95
|
+
for a game you build and ship yourself. When the user wants that game live on
|
|
96
|
+
Genex with its own URL, the AGENTS.md rules say how to offer it; on a yes the
|
|
97
|
+
folder is connected to a hosted game in place — same cards, same rules — and
|
|
98
|
+
the `$genex-tool-publish` card arrives with the publishing commands.
|
|
@@ -38,7 +38,7 @@ update, so update immediately.)
|
|
|
38
38
|
Run exactly the command the nudge printed, from the game project root:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npm i -D @genex-ai/cli-demo@
|
|
41
|
+
npm i -D @genex-ai/cli-demo@dev # the genex CLI (a dev dependency)
|
|
42
42
|
npm i @genex-ai/embed-sdk@latest # identity/saves SDK (ships inside the game)
|
|
43
43
|
npm i @genex-ai/multiplayer@latest # multiplayer SDK (only if the game uses it)
|
|
44
44
|
```
|