@nexusbloom/cli 0.1.1 → 0.1.3

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +9 -9
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@nexusbloom/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "NexusBloom CLI — run tools and workflows from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
7
- "nxb": "./src/index.js"
7
+ "nxb": "src/index.js"
8
8
  },
9
9
  "files": [
10
10
  "src/",
package/src/index.js CHANGED
@@ -29,7 +29,7 @@ import { fileURLToPath } from "url";
29
29
  const require = createRequire(import.meta.url);
30
30
  const { version } = require("../package.json");
31
31
 
32
- const API_BASE = process.env.NEXUSBLOOM_API_URL || "https://nexusbloom.dev";
32
+ const API_BASE = process.env.NEXUSBLOOM_API_URL || "https://www.nexusbloom.dev";
33
33
  const config = new Conf({ projectName: "nexusbloom" });
34
34
 
35
35
  // ─── Cache directory for local tool execution ────────────────────────────────
@@ -57,7 +57,7 @@ program
57
57
  .action(async (opts, cmd) => {
58
58
  const jsonMode = cmd.parent.opts().json || opts.json;
59
59
  try {
60
- const url = new URL("/api/v1/tools", API_BASE);
60
+ const url = new URL("/api/tools", API_BASE);
61
61
  if (opts.search) url.searchParams.set("search", opts.search);
62
62
  const res = await fetch(url);
63
63
  const { tools } = await res.json();
@@ -83,10 +83,10 @@ program
83
83
  .command("search")
84
84
  .description("Search for tools")
85
85
  .argument("<query>", "Search query")
86
- .action(async (query, cmd) => {
87
- const jsonMode = cmd.parent.opts().json;
86
+ .action(async (query, opts, cmd) => {
87
+ const jsonMode = (cmd?.parent?.opts().json) || false;
88
88
  try {
89
- const url = new URL("/api/v1/tools", API_BASE);
89
+ const url = new URL("/api/tools", API_BASE);
90
90
  url.searchParams.set("search", query);
91
91
  const res = await fetch(url);
92
92
  const { tools } = await res.json();
@@ -313,8 +313,8 @@ program
313
313
  .command("chat")
314
314
  .description("Describe what you want and let NexusBloom route to the right tools")
315
315
  .argument("<message>", "What you want to do")
316
- .action(async (message, cmd) => {
317
- const jsonMode = cmd.parent.opts().json;
316
+ .action(async (message, opts, cmd) => {
317
+ const jsonMode = (cmd?.parent?.opts().json) || false;
318
318
  try {
319
319
  if (!jsonMode) console.log(chalk.dim(" Routing your request..."));
320
320
  const res = await fetch(`${API_BASE}/api/v1/route`, {
@@ -351,8 +351,8 @@ program
351
351
  .command("info")
352
352
  .description("Show tool schema and details")
353
353
  .argument("<slug>", "Tool slug")
354
- .action(async (slug, cmd) => {
355
- const jsonMode = cmd.parent.opts().json;
354
+ .action(async (slug, opts, cmd) => {
355
+ const jsonMode = (cmd?.parent?.opts().json) || false;
356
356
  try {
357
357
  const res = await fetch(`${API_BASE}/api/run/${slug}`);
358
358
  if (!res.ok) {