@genex-ai/cli-demo 0.10.0 → 0.11.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/dist/index.js +20 -0
- package/package.json +11 -10
- package/templates/skills/genex-getting-started/SKILL.md +13 -0
package/dist/index.js
CHANGED
|
@@ -1095,6 +1095,17 @@ async function detectEmbedSdkVersion(cwd = process.cwd()) {
|
|
|
1095
1095
|
return null;
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
+
async function detectMultiplayer(cwd = process.cwd()) {
|
|
1099
|
+
try {
|
|
1100
|
+
const raw = await fs8.readFile(path9.join(cwd, "package.json"), "utf8");
|
|
1101
|
+
const pkg = JSON.parse(raw);
|
|
1102
|
+
return Boolean(
|
|
1103
|
+
pkg.dependencies?.["@genex-ai/multiplayer"] ?? pkg.devDependencies?.["@genex-ai/multiplayer"]
|
|
1104
|
+
);
|
|
1105
|
+
} catch {
|
|
1106
|
+
return false;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1098
1109
|
async function runPublish(opts) {
|
|
1099
1110
|
const log = createLogger({ quiet: opts.quiet });
|
|
1100
1111
|
log.plain(c.bold("genex publish"));
|
|
@@ -1132,8 +1143,10 @@ async function runPublish(opts) {
|
|
|
1132
1143
|
if (opts.title) body.title = opts.title;
|
|
1133
1144
|
if (opts.description) body.description = opts.description;
|
|
1134
1145
|
if (opts.regenerateCover) body.regenerateCover = true;
|
|
1146
|
+
if (opts.categories?.length) body.categories = opts.categories;
|
|
1135
1147
|
const embedSdkVersion = await detectEmbedSdkVersion();
|
|
1136
1148
|
if (embedSdkVersion) body.embedSdkVersion = embedSdkVersion;
|
|
1149
|
+
body.multiplayer = await detectMultiplayer();
|
|
1137
1150
|
res = await fetch(`${apiUrl}/api/projects/${meta.id}/publish`, {
|
|
1138
1151
|
method: "POST",
|
|
1139
1152
|
headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}` },
|
|
@@ -1486,6 +1499,8 @@ ${c.bold("Options for `preview` / `publish`")}
|
|
|
1486
1499
|
--no-push (publish) Skip build + push; only flip the gallery flag.
|
|
1487
1500
|
--title <title> (publish) Gallery title.
|
|
1488
1501
|
--description <text> (publish) Gallery description.
|
|
1502
|
+
--categories <list> (publish) 1-3 gallery categories, comma-separated.
|
|
1503
|
+
Valid: games, assets, physics, terrain, lighting, vfx.
|
|
1489
1504
|
--regenerate-cover (publish) Re-mint the disc cover (concept changed).
|
|
1490
1505
|
--api-url <url> (publish) Override the API base URL.
|
|
1491
1506
|
--env <path> Token env file (default: ~/.genex/env).
|
|
@@ -1506,6 +1521,7 @@ ${c.bold("Examples")}
|
|
|
1506
1521
|
genex init my-game --api-url http://localhost:3000 --auth-url http://localhost:5173
|
|
1507
1522
|
genex preview
|
|
1508
1523
|
genex publish
|
|
1524
|
+
genex publish --categories games,vfx
|
|
1509
1525
|
genex publish --no-push --title "My Game"
|
|
1510
1526
|
genex model "weathered wooden barrel with iron bands"
|
|
1511
1527
|
genex skybox "golden hour over a misty mountain range"
|
|
@@ -1529,6 +1545,7 @@ function parseArgs(argv) {
|
|
|
1529
1545
|
"--name",
|
|
1530
1546
|
"--title",
|
|
1531
1547
|
"--description",
|
|
1548
|
+
"--categories",
|
|
1532
1549
|
"--timeout",
|
|
1533
1550
|
"--duration"
|
|
1534
1551
|
]);
|
|
@@ -1623,6 +1640,9 @@ function applyValueFlag(options, flag, value) {
|
|
|
1623
1640
|
case "--description":
|
|
1624
1641
|
options.description = value;
|
|
1625
1642
|
break;
|
|
1643
|
+
case "--categories":
|
|
1644
|
+
options.categories = value.split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
|
|
1645
|
+
break;
|
|
1626
1646
|
case "--timeout": {
|
|
1627
1647
|
const n = Number(value);
|
|
1628
1648
|
if (!Number.isFinite(n) || n <= 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genex-ai/cli-demo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Set up your ~/.claude workspace, authorize, create a game project, generate AI assets, and publish (genex CLI).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=20"
|
|
17
17
|
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsup",
|
|
20
|
+
"prepack": "pnpm build",
|
|
21
|
+
"start": "node src/index.ts",
|
|
22
|
+
"dev": "node --watch src/index.ts",
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
24
|
+
"test": "node --test test/*.test.ts"
|
|
25
|
+
},
|
|
18
26
|
"keywords": [
|
|
19
27
|
"cli",
|
|
20
28
|
"claude",
|
|
@@ -38,12 +46,5 @@
|
|
|
38
46
|
"bugs": {
|
|
39
47
|
"url": "https://github.com/me-ai-org/genex-demo/issues"
|
|
40
48
|
},
|
|
41
|
-
"homepage": "https://github.com/me-ai-org/genex-demo/tree/main/apps/cli#readme"
|
|
42
|
-
|
|
43
|
-
"build": "tsup",
|
|
44
|
-
"start": "node src/index.ts",
|
|
45
|
-
"dev": "node --watch src/index.ts",
|
|
46
|
-
"typecheck": "tsc --noEmit",
|
|
47
|
-
"test": "node --test test/*.test.ts"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
49
|
+
"homepage": "https://github.com/me-ai-org/genex-demo/tree/main/apps/cli#readme"
|
|
50
|
+
}
|
|
@@ -45,6 +45,19 @@ npx genex texture "mossy cobblestone" --terrain # a tiling surface texture
|
|
|
45
45
|
Each has a focused skill with the exact loader code — `$genex-ai-model`,
|
|
46
46
|
`$genex-ai-skybox`, `$genex-ai-sfx`, `$genex-ai-texture`.
|
|
47
47
|
|
|
48
|
+
## Publishing
|
|
49
|
+
|
|
50
|
+
`npx genex preview` deploys to your unlisted draft URL; `npx genex publish`
|
|
51
|
+
lists the game in the public gallery. When publishing, pick 1–3 gallery
|
|
52
|
+
categories from what you actually built — `games`, `assets`, `physics`,
|
|
53
|
+
`terrain`, `lighting`, `vfx` — and pass them comma-separated:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx genex publish --categories games,vfx
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If unsure, use `games` (also the server's fallback for anything unrecognized).
|
|
60
|
+
|
|
48
61
|
Your own files were left untouched. `genex init` only adds missing files and
|
|
49
62
|
refreshes the genex-owned ones.
|
|
50
63
|
|