superlore-cli 0.3.0 → 0.3.1

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.d.ts CHANGED
@@ -87,7 +87,7 @@ declare function serializeSuperloreJson(config: SuperloreJson): string;
87
87
  declare function resolveMcpPath(config: SuperloreJson): string | undefined;
88
88
 
89
89
  /** The CLI version, kept in sync with package.json at build time. */
90
- declare const VERSION = "0.3.0";
90
+ declare const VERSION = "0.3.1";
91
91
  /** Build the argument parser. Exported for tests; `run()` wires it to argv. */
92
92
  declare function buildCli(argv?: readonly string[]): cac.CAC;
93
93
  /** Parse argv and dispatch. Reports unknown commands and unexpected errors cleanly. */
package/dist/index.js CHANGED
@@ -27,10 +27,10 @@ function banner() {
27
27
  }
28
28
  const seam = dim("\u258F");
29
29
  const lines = [
30
- ` ${accent("\u2597\u259F\u2588")}${accentSoft("\u2599\u2596")}`,
31
- ` ${accent("\u2590\u2588")}${seam}${accentSoft("\u2592\u258C")} ${wordmark("superlore")}`,
32
- ` ${accent("\u2590\u2588")}${seam}${accentSoft("\u2592\u258C")} ${dim("the company knowledge base your agents run on")}`,
33
- ` ${accent("\u259D\u259C\u2588")}${accentSoft("\u259B\u2598")}`
30
+ ` ${accent("\u2597\u2584")}${seam}${accentSoft("\u2584\u2596")}`,
31
+ ` ${accent("\u2588\u2588")}${seam}${accentSoft("\u2588\u2588")} ${wordmark("superlore")}`,
32
+ ` ${accent("\u2588\u2588")}${seam}${accentSoft("\u2588\u2588")} ${dim("the company knowledge base your agents run on")}`,
33
+ ` ${accent("\u259D\u2580")}${seam}${accentSoft("\u2580\u2598")}`
34
34
  ];
35
35
  process.stdout.write(`
36
36
  ${lines.join("\n")}
@@ -213,14 +213,15 @@ function detectPackageManager(root) {
213
213
  function isInstalled(root) {
214
214
  return existsSync(join(root, "node_modules"));
215
215
  }
216
- function runScript(root, script, extraArgs = []) {
216
+ function runScript(root, script, extraArgs = [], env) {
217
217
  const pm = detectPackageManager(root);
218
218
  const args = ["run", script, ...extraArgs.length ? ["--", ...extraArgs] : []];
219
219
  return new Promise((resolvePromise, reject) => {
220
220
  const child = spawn(pm, args, {
221
221
  cwd: root,
222
222
  stdio: "inherit",
223
- shell: process.platform === "win32"
223
+ shell: process.platform === "win32",
224
+ env: env ? { ...process.env, ...env } : process.env
224
225
  });
225
226
  child.on("error", reject);
226
227
  child.on("close", (code) => resolvePromise(code ?? 0));
@@ -417,7 +418,9 @@ function report(result) {
417
418
  log.success(`${bold(result.editor.label)} ${dim("\u2014 extension installed.")}`);
418
419
  break;
419
420
  case "already-installed":
420
- log.info(`${accent("\u203A")} ${bold(result.editor.label)} ${dim("\u2014 already installed, up to date.")}`);
421
+ log.info(
422
+ `${accent("\u203A")} ${bold(result.editor.label)} ${dim("\u2014 already installed, up to date.")}`
423
+ );
421
424
  break;
422
425
  case "failed":
423
426
  log.error(`${bold(result.editor.label)} ${dim("\u2014 install failed:")} ${result.error}`);
@@ -437,12 +440,15 @@ function printManualInstall() {
437
440
  function printMcpNextStep() {
438
441
  log.blank();
439
442
  log.info(bold("Next: connect the MCP"));
443
+ log.info(` ${dim("superlore's docs + help, in your agent \u2014 always current:")}`);
440
444
  log.info(
441
- ` ${dim("Let your agent read the same corpus. Ask Claude")} ${cyan('"connect my superlore MCP"')}${dim(",")}`
445
+ ` ${cyan("claude mcp add --transport http -s user superlore-docs https://superlore.vercel.app/api/mcp")}`
442
446
  );
447
+ log.blank();
443
448
  log.info(
444
- ` ${dim("or register it yourself:")} ${cyan("claude mcp add --transport http -s user superlore <url>/api/mcp")}`
449
+ ` ${dim("And your own KB once it's live (or ask Claude")} ${cyan('"connect my superlore MCP"')}${dim("):")}`
445
450
  );
451
+ log.info(` ${cyan("claude mcp add --transport http -s user my-kb <your-kb-url>/api/mcp")}`);
446
452
  }
447
453
 
448
454
  // src/commands/deploy.ts
@@ -518,8 +524,7 @@ async function devCommand(flags) {
518
524
  );
519
525
  }
520
526
  log.blank();
521
- const args = flags.port ? ["--port", String(flags.port)] : [];
522
- const code = await runScript(project.root, "dev", args);
527
+ const code = await runScript(project.root, "dev", [], { PORT: String(port) });
523
528
  process.exit(code);
524
529
  }
525
530
 
@@ -1508,7 +1513,7 @@ function printNextSteps(root, config) {
1508
1513
  }
1509
1514
 
1510
1515
  // src/index.ts
1511
- var VERSION = "0.3.0";
1516
+ var VERSION = "0.3.1";
1512
1517
  function buildCli(argv = process3.argv) {
1513
1518
  const cli = cac("superlore");
1514
1519
  cli.command("init [dir]", "Scaffold a new superlore knowledge base").option("--name <name>", "KB name").option("--type <type>", "KB type: company-kb | product-docs | personal-kb").option("--auth", "Enable the Google SSO auth gate").option("--no-auth", "Disable the auth gate").option("--allowed-domain <domain>", "Restrict SSO to one email domain (implies --auth)").option("--accent <color>", "Brand accent colour (any CSS colour)").option("--no-mcp", "Disable the MCP endpoint (on by default)").option("--connect", "Install the editor extension after scaffolding (skip the prompt)").option("--no-connect", "Don't set up the editor extension").option("-y, --yes", "Skip prompts; use flags + defaults").example("superlore init my-kb --type product-docs").example("superlore init acme --type company-kb --auth --allowed-domain acme.com").example("superlore init me --type personal-kb").action(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superlore-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "The superlore CLI — scaffold, run, and build an agent-native knowledge base. One corpus. Humans and agents.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Krishnan S G",