nomadexapp 0.1.0 → 0.2.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/README.md CHANGED
@@ -83,6 +83,22 @@ The packaged launcher:
83
83
  6. prints a UI password and requires it before the browser can open the workspace
84
84
  7. checks whether a newer npm release is available and prompts before startup when appropriate
85
85
 
86
+ ### 📱 Termux
87
+
88
+ Nomadex also works on Termux.
89
+
90
+ Recommended Codex install on Termux:
91
+
92
+ ```bash
93
+ npm install -g @mmmbuto/codex-cli-termux@latest
94
+ ```
95
+
96
+ The launcher now prefers the host `codex` binary on Termux instead of forcing the bundled desktop `@openai/codex` dependency. If your Codex binary lives in a non-standard location, launch with:
97
+
98
+ ```bash
99
+ NOMADEX_CODEX_CMD=/data/data/com.termux/files/usr/bin/codex npx nomadexapp
100
+ ```
101
+
86
102
  Open:
87
103
 
88
104
  - 🏠 Local machine: `http://127.0.0.1:3784`
@@ -168,10 +184,10 @@ More detail: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
168
184
  - [x] Theme picker, settings, skills library, and account/provider surfaces
169
185
  - [x] Local workspace browsing and uploaded asset handling
170
186
  - [x] Provider-aware launcher and app layer
187
+ - [x] First public npm release of `nomadexapp`
171
188
 
172
189
  ### 🧭 Next
173
190
 
174
- - [ ] Publish the first public npm release
175
191
  - [ ] Harden the packaged launcher for more providers and remote auth flows
176
192
  - [ ] Extend provider parity beyond the current Codex-first runtime path
177
193
  - [ ] Improve durable cross-provider thread memory and reload persistence
@@ -186,6 +202,7 @@ More detail: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
186
202
  ## 🚢 Publishing
187
203
 
188
204
  - `main` now has GitHub Actions for lint, build, and npm publish.
205
+ - successful npm publishes also create a matching GitHub Release
189
206
  - The publish workflow only releases when the version in `package.json` is not already on npm.
190
207
  - Add a repo secret named `NPM_TOKEN` before relying on automatic publish.
191
208
  - To ship an update, bump the package version, push to `main`, and GitHub Actions will publish `nomadexapp` automatically.
package/bin/nomadex.mjs CHANGED
@@ -59,6 +59,7 @@ const parseArgs = (argv) => {
59
59
  process.env.NOMADEX_AUTH_RELAY_TARGET ??
60
60
  process.env.VITE_CODEX_AUTH_RELAY_TARGET ??
61
61
  "http://127.0.0.1:1455",
62
+ codexCommand: process.env.NOMADEX_CODEX_CMD ?? "",
62
63
  password: process.env.NOMADEX_PASSWORD ?? "",
63
64
  updateCheck:
64
65
  process.env.NOMADEX_NO_UPDATE_CHECK === "1" ? false : true,
@@ -94,6 +95,11 @@ const parseArgs = (argv) => {
94
95
  index += 1;
95
96
  continue;
96
97
  }
98
+ if (arg === "--codex-cmd") {
99
+ options.codexCommand = argv[index + 1] ?? options.codexCommand;
100
+ index += 1;
101
+ continue;
102
+ }
97
103
  if (arg === "--password") {
98
104
  options.password = argv[index + 1] ?? options.password;
99
105
  index += 1;
@@ -124,6 +130,7 @@ Options:
124
130
  --port <port> UI port (default: 3784)
125
131
  --ws-url <url> App-server websocket target (default: ws://127.0.0.1:3901)
126
132
  --auth-relay-target <url> Auth relay HTTP target (default: http://127.0.0.1:1455)
133
+ --codex-cmd <path> Codex CLI command or absolute path override
127
134
  --password <value> UI password (default: generated per launch)
128
135
  --no-update-check Skip npm registry update prompt
129
136
  --help Show this help
@@ -428,6 +435,13 @@ const readyzUrl = (() => {
428
435
  return target;
429
436
  })();
430
437
  const authRelayTarget = options.authRelayTarget;
438
+ const isTermuxEnvironment = () => {
439
+ const prefix = process.env.PREFIX ?? "";
440
+ return (
441
+ Boolean(process.env.TERMUX_VERSION) ||
442
+ prefix.startsWith("/data/data/com.termux/files/usr")
443
+ );
444
+ };
431
445
 
432
446
  const resolveLocalNodePackageLaunch = (packageName, binName) => {
433
447
  try {
@@ -453,13 +467,73 @@ const resolveLocalNodePackageLaunch = (packageName, binName) => {
453
467
  }
454
468
  };
455
469
 
456
- const getCodexLaunch = () =>
457
- resolveLocalNodePackageLaunch("@openai/codex", "codex") ?? {
470
+ const resolveExecutableOnPath = (commandNames) => {
471
+ const pathDirs = (process.env.PATH ?? "").split(path.delimiter).filter(Boolean);
472
+
473
+ for (const dir of pathDirs) {
474
+ for (const commandName of commandNames) {
475
+ const candidate = path.join(dir, commandName);
476
+ try {
477
+ if (statSync(candidate).isFile()) {
478
+ return candidate;
479
+ }
480
+ } catch {
481
+ continue;
482
+ }
483
+ }
484
+ }
485
+
486
+ return null;
487
+ };
488
+
489
+ const resolvePathCodexLaunch = () => {
490
+ const commandNames =
491
+ process.platform === "win32"
492
+ ? ["codex.cmd", "codex.exe", "codex.bat", "codex"]
493
+ : ["codex"];
494
+ const command = resolveExecutableOnPath(commandNames);
495
+ if (!command) {
496
+ return null;
497
+ }
498
+
499
+ return {
500
+ command,
501
+ args: [],
502
+ shell: false,
503
+ source: "PATH codex",
504
+ };
505
+ };
506
+
507
+ const getCodexLaunch = () => {
508
+ const explicitCommand = options.codexCommand.trim();
509
+ if (explicitCommand) {
510
+ return {
511
+ command: explicitCommand,
512
+ args: [],
513
+ shell: false,
514
+ source: "--codex-cmd / NOMADEX_CODEX_CMD",
515
+ };
516
+ }
517
+
518
+ const dependencyLaunch = resolveLocalNodePackageLaunch("@openai/codex", "codex");
519
+ const pathLaunch = resolvePathCodexLaunch();
520
+
521
+ if (isTermuxEnvironment()) {
522
+ return pathLaunch ?? dependencyLaunch ?? {
523
+ command: process.platform === "win32" ? "codex.cmd" : "codex",
524
+ args: [],
525
+ shell: false,
526
+ source: "global PATH",
527
+ };
528
+ }
529
+
530
+ return dependencyLaunch ?? pathLaunch ?? {
458
531
  command: process.platform === "win32" ? "codex.cmd" : "codex",
459
532
  args: [],
460
533
  shell: false,
461
534
  source: "global PATH",
462
535
  };
536
+ };
463
537
 
464
538
  const isPortOpen = (targetHost, targetPort) =>
465
539
  new Promise((resolve) => {
@@ -508,6 +582,9 @@ const formatSpawnError = (error) => {
508
582
  "code" in error &&
509
583
  error.code === "ENOENT"
510
584
  ) {
585
+ if (isTermuxEnvironment()) {
586
+ return "Could not find a working Codex CLI. On Termux, install `@mmmbuto/codex-cli-termux@latest`, make sure `codex` is on PATH, or set `NOMADEX_CODEX_CMD`.";
587
+ }
511
588
  return "Could not find the Codex CLI. Install `@openai/codex` or use the bundled package dependency.";
512
589
  }
513
590
 
@@ -583,8 +660,12 @@ const ensureAppServer = async () => {
583
660
  return;
584
661
  }
585
662
  if (appServer.exitCode !== null) {
663
+ const termuxHint =
664
+ isTermuxEnvironment() && codexLaunch.source !== "PATH codex"
665
+ ? " Termux detected. Install `@mmmbuto/codex-cli-termux@latest`, ensure `codex` is on PATH, or launch Nomadex with `--codex-cmd codex`."
666
+ : "";
586
667
  throw new Error(
587
- `Codex app-server exited with code ${appServer.exitCode} (${codexLaunch.source}).`,
668
+ `Codex app-server exited with code ${appServer.exitCode} (${codexLaunch.source}).${termuxHint}`,
588
669
  );
589
670
  }
590
671
  await sleep(200);
package/docs/SETUP.md CHANGED
@@ -18,6 +18,16 @@ Quick check:
18
18
  codex --version
19
19
  ```
20
20
 
21
+ ### Termux
22
+
23
+ Recommended Codex install on Termux:
24
+
25
+ ```bash
26
+ npm install -g @mmmbuto/codex-cli-termux@latest
27
+ ```
28
+
29
+ Nomadex now prefers the host `codex` binary on Termux, so it does not need to rely on the bundled desktop `@openai/codex` package there.
30
+
21
31
  ## 2. Recommended Launch
22
32
 
23
33
  Normal use:
@@ -116,6 +126,8 @@ Main variables:
116
126
  UI port used by `npx nomadexapp`. Default: `3784`
117
127
  - `NOMADEX_AUTH_RELAY_TARGET`
118
128
  HTTP target used by the packaged auth relay. Default: `http://127.0.0.1:1455`
129
+ - `NOMADEX_CODEX_CMD`
130
+ Codex CLI command or full path override for the packaged launcher. Useful on Termux or custom installs.
119
131
  - `NOMADEX_PASSWORD`
120
132
  Stable UI password for the packaged launcher. If unset, Nomadex generates one on each launch and prints it in the terminal.
121
133
  - `VITE_CODEX_WS_URL`
@@ -130,6 +142,7 @@ Examples:
130
142
  ```bash
131
143
  npx nomadexapp --port 4173
132
144
  npx nomadexapp --ws-url ws://127.0.0.1:3902
145
+ NOMADEX_CODEX_CMD=/data/data/com.termux/files/usr/bin/codex npx nomadexapp
133
146
  NOMADEX_PASSWORD=my-secret npx nomadexapp
134
147
  VITE_CODEX_UI_PORT=4173 npm run dev:live
135
148
  VITE_CODEX_WS_URL=ws://127.0.0.1:3902 npm run dev:live
@@ -163,6 +176,7 @@ Behavior:
163
176
  - pushes and pull requests run `npm ci`, `npm run lint`, and `npm run build`
164
177
  - pushes to `main` also check npm
165
178
  - if the current `package.json` version is not published yet, GitHub Actions runs `npm publish --access public --provenance`
179
+ - successful npm publishes also create a matching GitHub Release tag like `v0.1.0`
166
180
 
167
181
  Required setup:
168
182
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nomadexapp",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Remote browser workspace for local coding agents",
5
5
  "license": "MIT",
6
6
  "type": "module",