lurqrun 0.0.10 → 0.1.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/bin/lurq.js CHANGED
@@ -24,7 +24,7 @@ var init_package = __esm({
24
24
  "package.json"() {
25
25
  package_default = {
26
26
  name: "lurqrun",
27
- version: "0.0.10",
27
+ version: "0.1.0",
28
28
  description: "A continuously-updated, evidence-scored index of JS/TS frameworks and libraries, exposed as an MCP server, CLI, and agent skill \u2014 so AI coding assistants get fresh, objective dependency recommendations.",
29
29
  type: "module",
30
30
  license: "Apache-2.0",
@@ -297,16 +297,17 @@ __export(installSkill_exports, {
297
297
  installAgent: () => installAgent,
298
298
  installInstructions: () => installInstructions,
299
299
  installInstructionsFile: () => installInstructionsFile,
300
+ lurqInvocation: () => lurqInvocation,
300
301
  printInstallReport: () => printInstallReport,
301
302
  resolveAgents: () => resolveAgents,
302
303
  runInstallSkill: () => runInstallSkill,
303
304
  stripTomlBlock: () => stripTomlBlock,
304
305
  upsertMarkedBlock: () => upsertMarkedBlock
305
306
  });
306
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
307
+ import { accessSync, constants, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
307
308
  import { copyFileSync } from "fs";
308
309
  import { homedir as homedir3 } from "os";
309
- import { dirname as dirname3, join as join3 } from "path";
310
+ import { delimiter, dirname as dirname3, join as join3 } from "path";
310
311
  function home(...p) {
311
312
  return join3(homedir3(), ...p);
312
313
  }
@@ -599,6 +600,20 @@ function resolveAgents(target) {
599
600
  }
600
601
  return [spec];
601
602
  }
603
+ function lurqInvocation() {
604
+ const candidates = process.platform === "win32" ? [".cmd", ".exe", ""] : [""];
605
+ for (const dir of (process.env.PATH ?? "").split(delimiter)) {
606
+ if (!dir) continue;
607
+ for (const ext of candidates) {
608
+ try {
609
+ accessSync(join3(dir, `lurq${ext}`), constants.X_OK);
610
+ return { command: "lurq", onPath: true };
611
+ } catch {
612
+ }
613
+ }
614
+ }
615
+ return { command: `npx ${PACKAGE_NAME}`, onPath: false };
616
+ }
602
617
  function printInstallReport(results, instructionsPath, mode) {
603
618
  const specs = agentSpecs();
604
619
  const short = (p) => p.startsWith(homedir3()) ? `~${p.slice(homedir3().length)}` : p;
@@ -628,7 +643,15 @@ Full guide: ${short(instructionsPath)}`);
628
643
  console.log(" 1. Restart the agent so it picks up the new MCP server.");
629
644
  }
630
645
  console.log(" \u2022 Ask it to recommend a library. It should call lurq.");
631
- console.log(' \u2022 Or use the terminal directly: `lurq recommend "a form library for React"`.');
646
+ const { command, onPath } = lurqInvocation();
647
+ console.log(` \u2022 Or use the terminal directly: \`${command} recommend "a form library for React"\`.`);
648
+ if (!onPath) {
649
+ console.log(`
650
+ There is no \`lurq\` command on this machine yet. Everything above`);
651
+ console.log(" worked and your agents are wired up; only the terminal shortcut is");
652
+ console.log(` missing, so use \`npx ${PACKAGE_NAME} <command>\`. To get \`lurq\` itself:`);
653
+ console.log(` npm install -g ${PACKAGE_NAME}`);
654
+ }
632
655
  }
633
656
  async function runInstallSkill(opts) {
634
657
  const selected = resolveAgents(opts.agent ?? "claude-code");
@@ -936,7 +959,10 @@ ${green("\u2713")} API key saved to ${configPath} ${dim("(mode 0600)")}`);
936
959
  console.log(
937
960
  `${green("\u2713")} Pointed at ${remote.url}${remote.url === DEFAULT_ENDPOINT ? "" : dim(" (your own server)")}`
938
961
  );
939
- console.log(dim(" `lurq recommend`, `evaluate`, `compare`, `verify`, `usage` now work anywhere."));
962
+ const { command } = lurqInvocation();
963
+ console.log(
964
+ dim(` \`${command} recommend\`, \`evaluate\`, \`compare\`, \`verify\`, \`usage\` now work anywhere.`)
965
+ );
940
966
  if (selected.length === 0) {
941
967
  console.log(
942
968
  "\nNo agents selected or detected. Re-run `lurq setup --agent <id>` once your assistant is installed."