@revealui/cli 0.6.2 → 0.6.4

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
@@ -86,13 +86,13 @@ pnpm dev
86
86
  - You're starting a new RevealUI project from scratch and want a guided setup
87
87
  - You need database, storage, and payment providers configured in one step
88
88
  - You want Dev Container or Devbox configuration generated automatically
89
- - **Not** for adding RevealUI to an existing projectinstall individual packages instead
89
+ - **Not** for adding RevealUI to an existing project - install individual packages instead
90
90
 
91
91
  ## JOSHUA Alignment
92
92
 
93
- - **Justifiable**: Every prompt earns its placetemplate, database, storage, and payment choices all map to real config decisions
93
+ - **Justifiable**: Every prompt earns its place - template, database, storage, and payment choices all map to real config decisions
94
94
  - **Adaptive**: Multiple templates (blog, e-commerce, portfolio) and environment options (DevContainer, Devbox) adapt to your workflow
95
- - **Sovereign**: Scaffolds a self-contained project you fully ownno hosted dependency or account required
95
+ - **Sovereign**: Scaffolds a self-contained project you fully own - no hosted dependency or account required
96
96
 
97
97
  ## License
98
98
 
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { createLegacyCreateCli } from '../dist/cli.js';
3
+ import { createCli } from '../dist/cli.js';
4
4
 
5
- const program = createLegacyCreateCli();
6
- await program.parseAsync(process.argv);
5
+ const args = [...process.argv.slice(0, 2), 'create', ...process.argv.slice(2)];
6
+
7
+ const program = createCli();
8
+ await program.parseAsync(args);
package/dist/cli.d.ts CHANGED
@@ -11,6 +11,5 @@ interface CliOptions {
11
11
  yes?: boolean;
12
12
  }
13
13
  declare function createCli(): Command;
14
- declare function createLegacyCreateCli(): Command;
15
14
 
16
- export { type CliOptions, createCli, createLegacyCreateCli };
15
+ export { type CliOptions, createCli };
package/dist/cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/cli.ts
2
+ import { createRequire } from "module";
2
3
  import { createLogger as createLogger14 } from "@revealui/setup/utils";
3
4
  import { Command } from "commander";
4
5
 
@@ -13,9 +14,7 @@ async function runAgentStatusCommand() {
13
14
  logger.info(`Project root: ${projectRoot}`);
14
15
  logger.info(`Available: ${available ? "yes" : "no"}`);
15
16
  if (!available) {
16
- logger.warn(
17
- "No LLM provider detected. Start BitNet, Ollama, or install an Ubuntu inference snap."
18
- );
17
+ logger.warn("No LLM provider detected. Install an Ubuntu inference snap or start Ollama.");
19
18
  }
20
19
  }
21
20
  async function runAgentHeadlessCommand(prompt) {
@@ -179,13 +178,13 @@ async function loadProDeps() {
179
178
  }
180
179
  async function detectProvider() {
181
180
  const projectRoot = process.cwd();
182
- if (process.env.BITNET_BASE_URL) {
181
+ if (process.env.INFERENCE_SNAPS_BASE_URL) {
183
182
  try {
184
- const res = await fetch(`${process.env.BITNET_BASE_URL}/v1/models`, {
183
+ const res = await fetch(`${process.env.INFERENCE_SNAPS_BASE_URL}/v1/models`, {
185
184
  signal: AbortSignal.timeout(2e3)
186
185
  });
187
186
  if (res.ok) {
188
- return { available: true, provider: "bitnet", model: "bitnet-b1.58-2B-4T", projectRoot };
187
+ return { available: true, provider: "inference-snaps", model: "gemma3", projectRoot };
189
188
  }
190
189
  } catch {
191
190
  }
@@ -196,7 +195,7 @@ async function detectProvider() {
196
195
  signal: AbortSignal.timeout(2e3)
197
196
  });
198
197
  if (res.ok) {
199
- return { available: true, provider: "ollama", model: "llama3.2:3b", projectRoot };
198
+ return { available: true, provider: "ollama", model: "gemma4:e2b", projectRoot };
200
199
  }
201
200
  } catch {
202
201
  }
@@ -358,7 +357,7 @@ async function runAuthStatusCommand(options) {
358
357
  if (npmUser) {
359
358
  logger2.success(`Authenticated as: ${npmUser}`);
360
359
  } else {
361
- logger2.error("Not authenticated \u2014 npm whoami failed");
360
+ logger2.error("Not authenticated - npm whoami failed");
362
361
  }
363
362
  write("\n");
364
363
  logger2.info(
@@ -374,7 +373,7 @@ async function runAuthStatusCommand(options) {
374
373
  logger2.info(`Project .npmrc uses NPM_TOKEN: ${projectUsesEnvVar ? "yes" : "no"}`);
375
374
  if (!projectUsesEnvVar && paths.project) {
376
375
  logger2.warn(
377
- "Project .npmrc does not reference NPM_TOKEN \u2014 direnv/RevVault tokens won't be used for publishing"
376
+ "Project .npmrc does not reference NPM_TOKEN - direnv/RevVault tokens won't be used for publishing"
378
377
  );
379
378
  }
380
379
  if (!vaultValue && hasVault && effectiveToken) {
@@ -389,12 +388,12 @@ async function runAuthSetTokenCommand(options) {
389
388
  logger2.info("Create a Granular Access Token at: https://www.npmjs.com/settings/<user>/tokens");
390
389
  logger2.info(" Type: Granular Access Token");
391
390
  logger2.info(" Packages: All packages (read and write)");
392
- logger2.info(" This bypasses 2FA \u2014 no OTP needed for publish");
391
+ logger2.info(" This bypasses 2FA - no OTP needed for publish");
393
392
  process.exitCode = 1;
394
393
  return;
395
394
  }
396
395
  if (!token.startsWith("npm_")) {
397
- logger2.warn('Token does not start with "npm_" \u2014 this may not be a valid npm token');
396
+ logger2.warn('Token does not start with "npm_" - this may not be a valid npm token');
398
397
  }
399
398
  if (!options.skipVault) {
400
399
  const hasVault = await hasRevvault();
@@ -406,7 +405,7 @@ async function runAuthSetTokenCommand(options) {
406
405
  logger2.error("Failed to store in RevVault");
407
406
  }
408
407
  } else {
409
- logger2.warn("RevVault not installed \u2014 skipping vault storage");
408
+ logger2.warn("RevVault not installed - skipping vault storage");
410
409
  }
411
410
  }
412
411
  if (!options.skipNpmrc) {
@@ -446,7 +445,7 @@ ${NPMRC_AUTH_LINE}
446
445
  const { stdout } = await execa2("npm", ["whoami"], { stdio: "pipe" });
447
446
  logger2.success(`Authenticated as: ${stdout.trim()}`);
448
447
  } catch {
449
- logger2.error("npm whoami failed \u2014 token may be invalid or expired");
448
+ logger2.error("npm whoami failed - token may be invalid or expired");
450
449
  process.exitCode = 1;
451
450
  return;
452
451
  }
@@ -473,7 +472,7 @@ async function runAuthVerifyCommand(options) {
473
472
  checks.push({
474
473
  name: "Token source",
475
474
  pass: !!envToken,
476
- detail: source + (npmrcToken && !envToken ? " \u2014 consider migrating to RevVault" : "")
475
+ detail: source + (npmrcToken && !envToken ? " - consider migrating to RevVault" : "")
477
476
  });
478
477
  const hasVault = await hasRevvault();
479
478
  if (hasVault) {
@@ -490,7 +489,7 @@ async function runAuthVerifyCommand(options) {
490
489
  checks.push({
491
490
  name: ".npmrc NPM_TOKEN",
492
491
  pass: usesEnvVar,
493
- detail: usesEnvVar ? "Project .npmrc uses env var" : "Missing \u2014 direnv token won't reach npm"
492
+ detail: usesEnvVar ? "Project .npmrc uses env var" : "Missing - direnv token won't reach npm"
494
493
  });
495
494
  }
496
495
  const envrcPath = path.join(process.cwd(), ".envrc");
@@ -498,7 +497,7 @@ async function runAuthVerifyCommand(options) {
498
497
  checks.push({
499
498
  name: ".envrc loads npm",
500
499
  pass: loadsNpm,
501
- detail: loadsNpm ? "revealui/env/npm in .envrc" : "Missing \u2014 direnv won't export NPM_TOKEN"
500
+ detail: loadsNpm ? "revealui/env/npm in .envrc" : "Missing - direnv won't export NPM_TOKEN"
502
501
  });
503
502
  const hardcodedToken = await getTokenFromNpmrc();
504
503
  checks.push({
@@ -522,7 +521,7 @@ async function runAuthVerifyCommand(options) {
522
521
  const allPass = checks.every((c) => c.pass);
523
522
  write("\n");
524
523
  if (allPass) {
525
- logger2.success("All checks passed \u2014 ready to publish");
524
+ logger2.success("All checks passed - ready to publish");
526
525
  } else {
527
526
  logger2.warn("Some checks failed. Run `revealui auth set-token` to fix.");
528
527
  process.exitCode = 1;
@@ -942,7 +941,7 @@ async function generateDevContainer(projectPath) {
942
941
  onAutoForward: "notify"
943
942
  },
944
943
  "4000": {
945
- label: "CMS",
944
+ label: "Admin",
946
945
  onAutoForward: "notify"
947
946
  },
948
947
  "5432": {
@@ -1051,7 +1050,7 @@ For GitHub Codespaces, set secrets in your repository settings.
1051
1050
  ## Ports
1052
1051
 
1053
1052
  - 3000: Web application
1054
- - 4000: CMS
1053
+ - 4000: Admin
1055
1054
  - 5432: PostgreSQL database
1056
1055
  `;
1057
1056
  await fs4.writeFile(path4.join(devcontainerDir, "README.md"), readme, "utf-8");
@@ -1201,7 +1200,7 @@ var __dirname2 = path6.dirname(__filename2);
1201
1200
  var TEMPLATES_DIR = existsSync(path6.resolve(__dirname2, "../../templates")) ? path6.resolve(__dirname2, "../../templates") : path6.resolve(__dirname2, "../templates");
1202
1201
  function buildEnvLocal(cfg) {
1203
1202
  const lines = [
1204
- "# Generated by @revealui/cli \u2014 fill in the remaining placeholders before running `pnpm dev`",
1203
+ "# Generated by @revealui/cli - fill in the remaining placeholders before running `pnpm dev`",
1205
1204
  "",
1206
1205
  "# Core",
1207
1206
  `REVEALUI_SECRET=${generateSecret()}`,
@@ -1301,7 +1300,7 @@ async function pullContentRules(projectPath) {
1301
1300
  signal: AbortSignal.timeout(1e4)
1302
1301
  });
1303
1302
  if (!manifestRes.ok) {
1304
- spinner.info("AI rules not available \u2014 skipping");
1303
+ spinner.info("AI rules not available - skipping");
1305
1304
  return;
1306
1305
  }
1307
1306
  const manifest = await manifestRes.json();
@@ -1340,7 +1339,7 @@ async function pullContentRules(projectPath) {
1340
1339
  spinner.info("No AI rules pulled");
1341
1340
  }
1342
1341
  } catch {
1343
- spinner.info("AI rules not available \u2014 skipping");
1342
+ spinner.info("AI rules not available - skipping");
1344
1343
  }
1345
1344
  }
1346
1345
  async function createProject(cfg) {
@@ -1383,7 +1382,7 @@ async function createProject(cfg) {
1383
1382
  const pnpmOk = await isPnpmInstalled();
1384
1383
  if (!pnpmOk) {
1385
1384
  logger7.warn(
1386
- "pnpm not found \u2014 skipping dependency installation. Run `pnpm install` manually."
1385
+ "pnpm not found - skipping dependency installation. Run `pnpm install` manually."
1387
1386
  );
1388
1387
  } else {
1389
1388
  await installDependencies(projectPath);
@@ -1394,7 +1393,7 @@ async function createProject(cfg) {
1394
1393
  if (!skipGit) {
1395
1394
  const gitOk = await isGitInstalled();
1396
1395
  if (!gitOk) {
1397
- logger7.warn("git not found \u2014 skipping repository initialisation.");
1396
+ logger7.warn("git not found - skipping repository initialisation.");
1398
1397
  } else {
1399
1398
  await initializeGitRepo(projectPath);
1400
1399
  await createInitialCommit(projectPath);
@@ -1444,7 +1443,7 @@ async function checkProLicense() {
1444
1443
  }
1445
1444
  function printBanner() {
1446
1445
  logger8.divider();
1447
- logger8.info(" RevealUI \u2014 Agentic Business Runtime");
1446
+ logger8.info(" RevealUI - Agentic Business Runtime");
1448
1447
  logger8.info(" Build your business, not your boilerplate.");
1449
1448
  logger8.divider();
1450
1449
  logger8.info("");
@@ -1464,9 +1463,9 @@ function printPostCreateSummary(projectName) {
1464
1463
  logger8.info(` ./${projectName}/README.md \u2014 getting started guide`);
1465
1464
  logger8.info("");
1466
1465
  logger8.info(" RevealUI ecosystem:");
1467
- logger8.info(" Studio: Native AI experience \u2014 agent hub, local inference, dev environment");
1468
- logger8.info(" Terminal: TUI client \u2014 run `revealui terminal install`");
1469
- logger8.info(" CMS: Admin dashboard at your-domain.com/admin");
1466
+ logger8.info(" Studio: Native AI experience - agent hub, local inference, dev environment");
1467
+ logger8.info(" Terminal: TUI client - run `revealui terminal install`");
1468
+ logger8.info(" admin: Admin dashboard at your-domain.com/admin");
1470
1469
  logger8.info("");
1471
1470
  logger8.info(" Helpful links:");
1472
1471
  logger8.info(" Docs: https://docs.revealui.com");
@@ -1496,9 +1495,9 @@ function formatCreateError(err) {
1496
1495
  }
1497
1496
  logger8.info("");
1498
1497
  logger8.info(" Troubleshooting:");
1499
- logger8.info(" revealui doctor \u2014 diagnose your environment");
1498
+ logger8.info(" revealui doctor - diagnose your environment");
1500
1499
  logger8.info(" https://docs.revealui.com/docs/TROUBLESHOOTING");
1501
- logger8.info(" support@revealui.com \u2014 we are here to help");
1500
+ logger8.info(" support@revealui.com - we are here to help");
1502
1501
  logger8.divider();
1503
1502
  }
1504
1503
  async function runCreateFlow(projectName, options) {
@@ -1746,7 +1745,11 @@ async function runDbStatusCommand() {
1746
1745
  const root = getWorkspaceRootOrThrow();
1747
1746
  const env = buildDbEnv(root);
1748
1747
  const pgdata = getPgDataOrThrow(env);
1749
- await requireCommand("pg_ctl");
1748
+ if (!await commandExists("pg_ctl")) {
1749
+ logger9.warn("pg_ctl is not available in PATH. Install PostgreSQL or enter the Nix devshell.");
1750
+ logger9.info("Run `revealui doctor` for a full environment check.");
1751
+ return;
1752
+ }
1750
1753
  try {
1751
1754
  await execa5("pg_ctl", ["status", "-D", pgdata], {
1752
1755
  env,
@@ -1878,16 +1881,6 @@ var ENV_VAR_SPECS = [
1878
1881
  message: "Must be a JWT (starts with eyJ)"
1879
1882
  })
1880
1883
  },
1881
- // Services
1882
- {
1883
- key: "RESEND_API_KEY",
1884
- label: "Resend API key",
1885
- required: false,
1886
- validate: (v) => ({
1887
- valid: v.startsWith("re_"),
1888
- message: "Must start with re_"
1889
- })
1890
- },
1891
1884
  // npm
1892
1885
  {
1893
1886
  key: "NPM_TOKEN",
@@ -1909,8 +1902,8 @@ var ENV_VAR_SPECS = [
1909
1902
  },
1910
1903
  // AI (open-model inference)
1911
1904
  {
1912
- key: "BITNET_BASE_URL",
1913
- label: "BitNet base URL",
1905
+ key: "INFERENCE_SNAPS_BASE_URL",
1906
+ label: "Inference snaps base URL",
1914
1907
  required: false
1915
1908
  },
1916
1909
  {
@@ -2204,8 +2197,8 @@ var DEV_PROFILES = {
2204
2197
  agent: {
2205
2198
  include: ["mcp"]
2206
2199
  },
2207
- cms: {
2208
- script: "dev:cms"
2200
+ admin: {
2201
+ script: "dev:admin"
2209
2202
  },
2210
2203
  fullstack: {
2211
2204
  include: ["mcp"],
@@ -2632,18 +2625,20 @@ async function runTerminalListCommand(options) {
2632
2625
  }
2633
2626
 
2634
2627
  // src/cli.ts
2628
+ var cliRequire = createRequire(import.meta.url);
2629
+ var CLI_VERSION = cliRequire("../package.json").version;
2635
2630
  var logger14 = createLogger14({ prefix: "CLI" });
2636
- function configureCreateCommand(command, legacyName) {
2631
+ function configureCreateCommand(command) {
2637
2632
  command.description("Create a new RevealUI project").argument("[project-name]", "Name of the project").option("-t, --template <name>", "Template to use (basic-blog, e-commerce, portfolio)").option("--skip-git", "Skip git initialization", false).option("--skip-install", "Skip dependency installation", false).option("-y, --yes", "Skip all prompts and use defaults", false).action(async (projectName, options) => {
2638
- logger14.header(legacyName ? "Create RevealUI Project" : "RevealUI Create");
2633
+ logger14.header("RevealUI Create");
2639
2634
  await runCreateFlow(projectName, options);
2640
2635
  });
2641
2636
  return command;
2642
2637
  }
2643
2638
  function createCli() {
2644
2639
  const program = new Command();
2645
- program.name("revealui").description("RevealUI operational CLI").version("0.2.0");
2646
- configureCreateCommand(program.command("create"), void 0);
2640
+ program.name("revealui").description("RevealUI operational CLI").version(CLI_VERSION);
2641
+ configureCreateCommand(program.command("create"));
2647
2642
  program.command("doctor").description("Check RevealUI workspace and developer environment health").option("--json", "Output machine-readable JSON", false).option("--fix", "Apply safe automatic fixes when possible", false).option("--strict", "Exit nonzero when checks fail", false).action(async (options) => {
2648
2643
  await runDoctorCommand(options);
2649
2644
  });
@@ -2688,7 +2683,7 @@ function createCli() {
2688
2683
  const dev = program.command("dev").description("Prepare and manage the RevealUI development workspace");
2689
2684
  dev.command("up").description(
2690
2685
  "Ensure the local dev environment is ready, migrate the DB, optionally validate MCP, and start a dev script"
2691
- ).option("--json", "Output machine-readable JSON", false).option("--dry-run", "Print the effective plan and actions without executing them", false).option("--fix", "Apply safe automatic fixes before bootstrapping when possible", false).option("--no-ensure", "Skip automatic local DB initialization/start").option("--profile <name>", "Named dev profile: local, agent, cms, fullstack").option(
2686
+ ).option("--json", "Output machine-readable JSON", false).option("--dry-run", "Print the effective plan and actions without executing them", false).option("--fix", "Apply safe automatic fixes before bootstrapping when possible", false).option("--no-ensure", "Skip automatic local DB initialization/start").option("--profile <name>", "Named dev profile: local, agent, admin, fullstack").option(
2692
2687
  "--include <service...>",
2693
2688
  "Additional development services to prepare (currently supports: mcp)"
2694
2689
  ).option("--script <name>", "Optional pnpm script to run after environment bootstrap").option("--inside", "Internal flag used after re-entering nix develop", false).action(
@@ -2696,7 +2691,7 @@ function createCli() {
2696
2691
  await runDevUpCommand(options);
2697
2692
  }
2698
2693
  );
2699
- dev.command("status").description("Show current RevealUI development environment status").option("--json", "Output machine-readable JSON", false).option("--profile <name>", "Named dev profile: local, agent, cms, fullstack").option(
2694
+ dev.command("status").description("Show current RevealUI development environment status").option("--json", "Output machine-readable JSON", false).option("--profile <name>", "Named dev profile: local, agent, admin, fullstack").option(
2700
2695
  "--include <service...>",
2701
2696
  "Additional development services to preview in the effective plan"
2702
2697
  ).option("--script <name>", "Optional pnpm script to preview in the effective plan").option("--inside", "Internal flag used after re-entering nix develop", false).action(
@@ -2707,7 +2702,7 @@ function createCli() {
2707
2702
  dev.command("down").description("Stop local RevealUI development services that are managed by the CLI").action(async () => {
2708
2703
  await runDevDownCommand();
2709
2704
  });
2710
- dev.command("shell").description("Alias for `revealui dev up` without starting an app script").option("--json", "Output machine-readable JSON", false).option("--dry-run", "Print the effective plan and actions without executing them", false).option("--fix", "Apply safe automatic fixes before bootstrapping when possible", false).option("--no-ensure", "Skip automatic local DB initialization/start").option("--profile <name>", "Named dev profile: local, agent, cms, fullstack").option(
2705
+ dev.command("shell").description("Alias for `revealui dev up` without starting an app script").option("--json", "Output machine-readable JSON", false).option("--dry-run", "Print the effective plan and actions without executing them", false).option("--fix", "Apply safe automatic fixes before bootstrapping when possible", false).option("--no-ensure", "Skip automatic local DB initialization/start").option("--profile <name>", "Named dev profile: local, agent, admin, fullstack").option(
2711
2706
  "--include <service...>",
2712
2707
  "Additional development services to prepare (currently supports: mcp)"
2713
2708
  ).option("--inside", "Internal flag used after re-entering nix develop", false).action(
@@ -2724,7 +2719,7 @@ function createCli() {
2724
2719
  }
2725
2720
  );
2726
2721
  const devProfile = dev.command("profile").description("Persist or inspect the default dev profile");
2727
- devProfile.command("set").description("Set the default profile used by `revealui dev up` and `revealui dev status`").argument("<name>", "Profile name: local, agent, cms, fullstack").action(async (name) => {
2722
+ devProfile.command("set").description("Set the default profile used by `revealui dev up` and `revealui dev status`").argument("<name>", "Profile name: local, agent, admin, fullstack").action(async (name) => {
2728
2723
  await runDevProfileSetCommand(name);
2729
2724
  });
2730
2725
  devProfile.command("show").description("Show the configured default dev profile").option("--json", "Output machine-readable JSON", false).action(async (options) => {
@@ -2756,14 +2751,6 @@ function createCli() {
2756
2751
  });
2757
2752
  return program;
2758
2753
  }
2759
- function createLegacyCreateCli() {
2760
- const program = new Command();
2761
- program.name("create-revealui").version("0.2.0");
2762
- configureCreateCommand(program, "create-revealui");
2763
- return program;
2764
- }
2765
2754
  export {
2766
- createCli,
2767
- createLegacyCreateCli
2755
+ createCli
2768
2756
  };
2769
- //# sourceMappingURL=cli.js.map