@nice-code/commander 0.70.0 → 0.70.2

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/build/cli.cjs CHANGED
@@ -23611,14 +23611,16 @@ async function cmdUi(ctx) {
23611
23611
  url,
23612
23612
  opened
23613
23613
  });
23614
- else ctx.out.print(opened ? `opened ${url} (the web UI itself lands in R4)` : `could not open a browser — visit ${url} (the web UI itself lands in R4)`);
23614
+ else ctx.out.print(opened ? `opened ${url}` : `could not open a browser — visit ${url}`);
23615
23615
  return EXIT.ok;
23616
23616
  }
23617
23617
  //#endregion
23618
23618
  //#region src/cli.ts
23619
23619
  const HELP = `nice-commander — one typed config, one control surface, for dev environments.
23620
23620
 
23621
- usage: nice-commander [--config <path>] [--json] [--no-color] [--timeout <ms>] <command> [selection] [flags]
23621
+ usage: nice-commander [--config <path>] [--json] [--no-color] [--timeout <ms>] [command] [selection] [flags]
23622
+
23623
+ With NO command, "ui" runs: the daemon is ensured and the browser opened. --help prints this text.
23622
23624
 
23623
23625
  selection: process ids, group names, tag=val (AND across terms), or --all.
23624
23626
  Bare up/explain use the config's defaultSelection (or print the groups and exit);
@@ -23694,13 +23696,14 @@ async function main() {
23694
23696
  process.stderr.write(`nice-commander: ${parsed.error}\n`);
23695
23697
  return EXIT.usage;
23696
23698
  }
23697
- if (parsed.help || parsed.command == null || parsed.command === "help") {
23699
+ if (parsed.help || parsed.command === "help") {
23698
23700
  process.stdout.write(HELP);
23699
23701
  return EXIT.ok;
23700
23702
  }
23701
- const command = COMMANDS[parsed.command];
23703
+ const requested = parsed.command ?? "ui";
23704
+ const command = COMMANDS[requested];
23702
23705
  if (command == null) {
23703
- process.stderr.write(`nice-commander: unknown command "${parsed.command}" (--help lists them)\n`);
23706
+ process.stderr.write(`nice-commander: unknown command "${requested}" (--help lists them)\n`);
23704
23707
  return EXIT.usage;
23705
23708
  }
23706
23709
  try {