@genex-ai/cli-demo 0.22.0 → 0.23.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 CHANGED
@@ -1870,11 +1870,6 @@ async function exists2(p) {
1870
1870
  async function runExplore(opts) {
1871
1871
  const log = createLogger({ quiet: opts.quiet });
1872
1872
  const query = opts.query?.trim();
1873
- if (!query) {
1874
- log.error('Missing query. Usage: genex explore "<what you need>"');
1875
- process.exitCode = 1;
1876
- return;
1877
- }
1878
1873
  const apiUrl = getApiUrl(opts.apiUrl);
1879
1874
  let res;
1880
1875
  try {
@@ -1890,17 +1885,21 @@ async function runExplore(opts) {
1890
1885
  return;
1891
1886
  }
1892
1887
  const { items } = await res.json();
1893
- const ranked = rank(items, query).slice(0, 5);
1888
+ const ranked = query ? rank(items, query).slice(0, 5) : [...items].sort((a, b) => b.playsCount - a.playsCount);
1894
1889
  if (opts.json) {
1895
1890
  console.log(JSON.stringify(ranked, null, 2));
1896
1891
  return;
1897
1892
  }
1898
1893
  if (ranked.length === 0) {
1899
1894
  log.plain(
1900
- `No curated projects matched "${query}". Try a broader term (terrain, grass, vehicle, water, building, dungeon, fish, shader).`
1895
+ query ? `No curated projects matched "${query}". Run \`genex explore\` with no arguments to browse the whole catalog, or try a broader term (terrain, grass, vehicle, water, building, dungeon, fish, shader).` : `The curated catalog is empty right now \u2014 check back soon.`
1901
1896
  );
1902
1897
  return;
1903
1898
  }
1899
+ if (!query) {
1900
+ log.plain(c.bold(`The full curated catalog (${ranked.length} project${ranked.length === 1 ? "" : "s"}):`));
1901
+ log.plain("");
1902
+ }
1904
1903
  for (const [i, p] of ranked.entries()) {
1905
1904
  const meta = [
1906
1905
  p.categories.join(", "),
@@ -1960,8 +1959,9 @@ ${c.bold("Usage")}
1960
1959
  genex texture "<prompt>" [options] Generate a PBR texture into public/assets/textures.
1961
1960
  genex controller <type> [--force] Install a physics controller (character|car|drone)
1962
1961
  into src/controllers (+ assets into public/assets).
1963
- genex explore "<query>" [options] Search the curated community gallery \u2014 proven
1964
- Three.js systems you can clone or borrow parts from.
1962
+ genex explore ["<query>"] [options] Search the curated community gallery \u2014 proven
1963
+ Three.js systems you can clone or borrow parts
1964
+ from. No query lists the whole catalog.
1965
1965
 
1966
1966
  ${c.bold("Options for the generators (`model` `skybox` `sfx` `texture`)")}
1967
1967
  --terrain (texture) seamless tiling surface for terrain/ground.
@@ -2008,8 +2008,9 @@ ${c.bold("Options for `preview` / `publish`")}
2008
2008
  --env <path> Token env file (default: ~/.genex/env).
2009
2009
 
2010
2010
  ${c.bold("Options for `explore`")}
2011
- --json Print the top matches as JSON (for tools/agents).
2011
+ --json Print the matches as JSON (for tools/agents).
2012
2012
  --api-url <url> Override the API base URL.
2013
+ (No query at all lists the entire curated catalog.)
2013
2014
 
2014
2015
  ${c.bold("Global")}
2015
2016
  --quiet Reduce output.
@@ -2036,6 +2037,7 @@ ${c.bold("Examples")}
2036
2037
  genex texture "mossy cracked cobblestone" --terrain
2037
2038
  genex controller character
2038
2039
  genex explore "grass"
2040
+ genex explore
2039
2041
  `;
2040
2042
  function parseArgs(argv) {
2041
2043
  const parsed = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "0.22.0",
3
+ "version": "0.23.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": {
@@ -23,6 +23,13 @@ Examples: `npx genex explore "grass"`, `npx genex explore "vehicle physics"`,
23
23
  `npx genex explore "procedural building"`. No sign-in needed — this works even
24
24
  before `genex init`.
25
25
 
26
+ **Not sure what exists?** Run it with no arguments to browse the whole curated
27
+ catalog first — it's small and every entry is proven:
28
+
29
+ ```bash
30
+ npx genex explore
31
+ ```
32
+
26
33
  Each result prints everything you need to act on it:
27
34
 
28
35
  - `play:` — open it in the browser to judge whether it fits.
@@ -36,8 +43,7 @@ Add `--json` for machine-readable output.
36
43
  **As a NEW game (start from the whole project):**
37
44
 
38
45
  1. `git clone <clone URL from the output> <name>` — pick a short one-word name.
39
- 2. `cd <name>`, then `npx @genex-ai/cli-demo@latest init <name>` — choose
40
- "Ignore files and continue" if it warns the folder isn't empty; never use
46
+ 2. `cd <name>`, then `npx @genex-ai/cli-demo@latest init <name>` — never use
41
47
  `--force`. This creates your own project; the original is untouched.
42
48
  3. `npm install`, keep `base: './'` in `vite.config`, then build your changes
43
49
  and ship with `npx genex preview`.
@@ -64,6 +70,7 @@ build from one:
64
70
  - keep any in-game credits screens or notices in place;
65
71
  - carry the credit into anything you publish or remix from it.
66
72
 
67
- If nothing matches your query, try a broader term (terrain, grass, vehicle,
73
+ If nothing matches your query, run `npx genex explore` with no arguments to
74
+ see everything available, or try a broader term (terrain, grass, vehicle,
68
75
  water, building, dungeon, fish, shader) — or build it with the regular
69
76
  `genex-threejs-*` skills instead.