From 931025ff2a197dc1151d6d3c2e0c5e4d7d080762 Mon Sep 17 00:00:00 2001 From: Mikkel Georgsen Date: Tue, 31 Mar 2026 10:58:05 +0200 Subject: [PATCH] [nexus] fix(04-03): add root directory prompt to CLI onboarding (ONBD-06) --- cli/src/commands/onboard.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cli/src/commands/onboard.ts b/cli/src/commands/onboard.ts index d890efba..41473d52 100644 --- a/cli/src/commands/onboard.ts +++ b/cli/src/commands/onboard.ts @@ -644,7 +644,18 @@ export async function onboard(opts: OnboardOptions): Promise { const { runCommand } = await import("./run.js"); // [nexus] Start bootstrap concurrently — health-check poll waits for server readiness const serverUrl = `http://${server.host}:${server.port}`; - const rootDir = process.cwd(); + // [nexus] Prompt for project root directory (mirrors UI wizard flow) + let rootDir = process.cwd(); + if (process.stdin.isTTY && process.stdout.isTTY) { + const answer = await p.text({ + message: "Project root directory:", + initialValue: process.cwd(), + placeholder: process.cwd(), + }); + if (!p.isCancel(answer) && answer) { + rootDir = answer; + } + } bootstrapNexusAgents(serverUrl, rootDir).catch((err: unknown) => { // [nexus] Bootstrap failures are non-fatal console.warn("[nexus] Agent bootstrap error:", err instanceof Error ? err.message : String(err));