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));