buildwithnexus 0.6.16 → 0.6.18
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.js +25 -42
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -45,18 +45,10 @@ import * as readline from "readline";
|
|
|
45
45
|
async function deepAgentsInitCommand() {
|
|
46
46
|
console.log(`
|
|
47
47
|
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
48
|
-
\u2551
|
|
48
|
+
\u2551 Nexus - Configuration \u2551
|
|
49
49
|
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
50
50
|
`);
|
|
51
51
|
const envPath = path2.join(os2.homedir(), ".env.local");
|
|
52
|
-
const hasEnv = fs.existsSync(envPath);
|
|
53
|
-
if (hasEnv) {
|
|
54
|
-
const answer = await askQuestion(".env.local already exists. Reconfigure? (y/n) [n]: ");
|
|
55
|
-
if (answer.toLowerCase() !== "y" && answer.toLowerCase() !== "yes") {
|
|
56
|
-
console.log("Setup complete -- using existing configuration.");
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
52
|
console.log(
|
|
61
53
|
"Please provide your LLM API keys:\n(You can set these later by editing .env.local)\n"
|
|
62
54
|
);
|
|
@@ -75,7 +67,7 @@ async function deepAgentsInitCommand() {
|
|
|
75
67
|
}
|
|
76
68
|
const backendUrl = await askQuestion("Backend URL (http://localhost:4200): ") || "http://localhost:4200";
|
|
77
69
|
const dashboardPort = await askQuestion("Dashboard port (4201): ") || "4201";
|
|
78
|
-
const envContent = `#
|
|
70
|
+
const envContent = `# Nexus Configuration
|
|
79
71
|
# Generated by buildwithnexus init
|
|
80
72
|
|
|
81
73
|
# LLM API Keys
|
|
@@ -169,7 +161,7 @@ function getVersion() {
|
|
|
169
161
|
const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
|
|
170
162
|
return packageJson.version;
|
|
171
163
|
} catch {
|
|
172
|
-
return true ? "0.6.
|
|
164
|
+
return true ? "0.6.18" : "0.0.0-unknown";
|
|
173
165
|
}
|
|
174
166
|
}
|
|
175
167
|
function showBanner() {
|
|
@@ -257,7 +249,7 @@ var TUI = class {
|
|
|
257
249
|
chalk.cyan("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")
|
|
258
250
|
);
|
|
259
251
|
console.log(
|
|
260
|
-
chalk.cyan("\u2551") + chalk.bold.white(" \u{1F680}
|
|
252
|
+
chalk.cyan("\u2551") + chalk.bold.white(" \u{1F680} Nexus - Autonomous Agent Orchestration ") + chalk.cyan("\u2551")
|
|
261
253
|
);
|
|
262
254
|
console.log(
|
|
263
255
|
chalk.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")
|
|
@@ -539,7 +531,7 @@ import path3 from "path";
|
|
|
539
531
|
var __dirname = path3.dirname(fileURLToPath(import.meta.url));
|
|
540
532
|
async function dashboardCommand(options) {
|
|
541
533
|
const port = options.port || "4201";
|
|
542
|
-
console.log(`Starting
|
|
534
|
+
console.log(`Starting Nexus Dashboard on http://localhost:${port}
|
|
543
535
|
`);
|
|
544
536
|
const dashboardPath = path3.join(__dirname, "../deep-agents/dashboard/server.js");
|
|
545
537
|
const dashboard = spawn("node", [dashboardPath], {
|
|
@@ -642,23 +634,20 @@ function classifyIntent(task) {
|
|
|
642
634
|
init_config();
|
|
643
635
|
async function interactiveMode() {
|
|
644
636
|
const backendUrl = process.env.BACKEND_URL || "http://localhost:4200";
|
|
637
|
+
console.log(chalk2.cyan("\n\u{1F527} Configure API Keys\n"));
|
|
638
|
+
const { deepAgentsInitCommand: deepAgentsInitCommand2 } = await Promise.resolve().then(() => (init_init_command(), init_command_exports));
|
|
639
|
+
await deepAgentsInitCommand2();
|
|
640
|
+
reloadEnv();
|
|
645
641
|
if (!hasAnyKey()) {
|
|
646
|
-
console.
|
|
647
|
-
|
|
648
|
-
await deepAgentsInitCommand2();
|
|
649
|
-
reloadEnv();
|
|
650
|
-
if (!hasAnyKey()) {
|
|
651
|
-
console.error("Error: At least one API key is required to use buildwithnexus.");
|
|
652
|
-
console.error("Please run: buildwithnexus da-init");
|
|
653
|
-
process.exit(1);
|
|
654
|
-
}
|
|
655
|
-
const keys = loadApiKeys();
|
|
656
|
-
console.log(chalk2.green("\n\u2713 Configuration complete!"));
|
|
657
|
-
console.log(chalk2.gray(` Anthropic: ${keys.anthropic ? "\u2713" : "\u2717"}`));
|
|
658
|
-
console.log(chalk2.gray(` OpenAI: ${keys.openai ? "\u2713" : "\u2717"}`));
|
|
659
|
-
console.log(chalk2.gray(` Google: ${keys.google ? "\u2713" : "\u2717"}
|
|
660
|
-
`));
|
|
642
|
+
console.error("Error: At least one API key is required to use buildwithnexus.");
|
|
643
|
+
process.exit(1);
|
|
661
644
|
}
|
|
645
|
+
const keys = loadApiKeys();
|
|
646
|
+
console.log(chalk2.green("\n\u2713 Keys configured!"));
|
|
647
|
+
console.log(chalk2.gray(` Anthropic: ${keys.anthropic ? "\u2713" : "\u2717"}`));
|
|
648
|
+
console.log(chalk2.gray(` OpenAI: ${keys.openai ? "\u2713" : "\u2717"}`));
|
|
649
|
+
console.log(chalk2.gray(` Google: ${keys.google ? "\u2713" : "\u2717"}
|
|
650
|
+
`));
|
|
662
651
|
try {
|
|
663
652
|
const response = await fetch(`${backendUrl}/health`);
|
|
664
653
|
if (!response.ok) {
|
|
@@ -675,12 +664,6 @@ async function interactiveMode() {
|
|
|
675
664
|
});
|
|
676
665
|
const ask = (question) => new Promise((resolve) => rl.question(question, resolve));
|
|
677
666
|
console.clear();
|
|
678
|
-
console.log(chalk2.cyan("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"));
|
|
679
|
-
console.log(
|
|
680
|
-
chalk2.cyan("\u2551") + chalk2.bold.white(" \u{1F680} DEEP AGENTS - Autonomous Execution Engine ") + chalk2.cyan("\u2551")
|
|
681
|
-
);
|
|
682
|
-
console.log(chalk2.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"));
|
|
683
|
-
console.log("");
|
|
684
667
|
console.log(chalk2.gray("Welcome! Describe what you want the AI agents to do."));
|
|
685
668
|
console.log(chalk2.gray('Type "exit" to quit.\n'));
|
|
686
669
|
while (true) {
|
|
@@ -758,7 +741,7 @@ async function runModeLoop(mode, task, backendUrl, rl, ask) {
|
|
|
758
741
|
function printAppHeader() {
|
|
759
742
|
console.log(chalk2.cyan("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"));
|
|
760
743
|
console.log(
|
|
761
|
-
chalk2.cyan("\u2551") + chalk2.bold.white(" \u{1F680}
|
|
744
|
+
chalk2.cyan("\u2551") + chalk2.bold.white(" \u{1F680} Nexus - Autonomous Agent Orchestration ") + chalk2.cyan("\u2551")
|
|
762
745
|
);
|
|
763
746
|
console.log(chalk2.cyan("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"));
|
|
764
747
|
console.log("");
|
|
@@ -3537,7 +3520,7 @@ function getVersionStatic() {
|
|
|
3537
3520
|
const packageJson = JSON.parse(readFileSync2(packagePath, "utf-8"));
|
|
3538
3521
|
return packageJson.version;
|
|
3539
3522
|
} catch {
|
|
3540
|
-
return true ? "0.6.
|
|
3523
|
+
return true ? "0.6.18" : "0.0.0-unknown";
|
|
3541
3524
|
}
|
|
3542
3525
|
}
|
|
3543
3526
|
var cli = new Command15().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version(getVersionStatic());
|
|
@@ -3658,13 +3641,13 @@ import os5 from "os";
|
|
|
3658
3641
|
import path11 from "path";
|
|
3659
3642
|
var homeEnvPath = path11.join(os5.homedir(), ".env.local");
|
|
3660
3643
|
dotenv2.config({ path: homeEnvPath });
|
|
3661
|
-
var version = true ? "0.6.
|
|
3644
|
+
var version = true ? "0.6.18" : "0.5.17";
|
|
3662
3645
|
checkForUpdates(version);
|
|
3663
|
-
program.name("buildwithnexus").description("
|
|
3664
|
-
program.command("da-init").description("Initialize
|
|
3665
|
-
program.command("run <task>").description("Run a task with
|
|
3666
|
-
program.command("dashboard").description("Start the
|
|
3667
|
-
program.command("da-status").description("Check
|
|
3646
|
+
program.name("buildwithnexus").description("Nexus - AI-Powered Task Execution").version(version);
|
|
3647
|
+
program.command("da-init").description("Initialize Nexus (set up API keys and .env.local)").action(deepAgentsInitCommand);
|
|
3648
|
+
program.command("run <task>").description("Run a task with Nexus").option("-a, --agent <name>", "Agent role (engineer, researcher, etc)", "engineer").option("-g, --goal <goal>", "Agent goal").option("-m, --model <model>", "LLM model", "claude-sonnet-4-20250514").action(runCommand);
|
|
3649
|
+
program.command("dashboard").description("Start the Nexus dashboard server").option("-p, --port <port>", "Dashboard port", "4201").action(dashboardCommand);
|
|
3650
|
+
program.command("da-status").description("Check Nexus backend status").action(async () => {
|
|
3668
3651
|
const backendUrl = process.env.BACKEND_URL || "http://localhost:4200";
|
|
3669
3652
|
try {
|
|
3670
3653
|
const response = await fetch(`${backendUrl}/health`);
|