refactor: make setup the primary wizard surface

This commit is contained in:
Peter Steinberger
2026-03-15 21:59:51 -07:00
parent 98877dc413
commit 5c120cb36c
37 changed files with 115 additions and 495 deletions

View File

@@ -1,5 +1,5 @@
import type { Command } from "commander";
import { onboardCommand } from "../../commands/onboard.js";
import { setupWizardCommand } from "../../commands/onboard.js";
import { setupCommand } from "../../commands/setup.js";
import { defaultRuntime } from "../../runtime.js";
import { formatDocsLink } from "../../terminal/links.js";
@@ -10,7 +10,7 @@ import { hasExplicitOptions } from "../command-options.js";
export function registerSetupCommand(program: Command) {
program
.command("setup")
.description("Initialize ~/.openclaw/openclaw.json and the agent workspace")
.description("Initialize config/workspace or run the setup wizard")
.addHelpText(
"after",
() =>
@@ -20,8 +20,8 @@ export function registerSetupCommand(program: Command) {
"--workspace <dir>",
"Agent workspace directory (default: ~/.openclaw/workspace; stored as agents.defaults.workspace)",
)
.option("--wizard", "Run the interactive setup wizard", false)
.option("--non-interactive", "Run the wizard without prompts", false)
.option("--wizard", "Run the guided setup wizard", false)
.option("--non-interactive", "Run the setup wizard without prompts", false)
.option("--mode <mode>", "Wizard mode: local|remote")
.option("--remote-url <url>", "Remote Gateway WebSocket URL")
.option("--remote-token <token>", "Remote Gateway token (optional)")
@@ -35,7 +35,7 @@ export function registerSetupCommand(program: Command) {
"remoteToken",
]);
if (opts.wizard || hasWizardFlags) {
await onboardCommand(
await setupWizardCommand(
{
workspace: opts.workspace as string | undefined,
nonInteractive: Boolean(opts.nonInteractive),