diff --git a/docs/cli/setup.md b/docs/cli/setup.md index b1fbfcc2338..74c7c8854ac 100644 --- a/docs/cli/setup.md +++ b/docs/cli/setup.md @@ -46,6 +46,7 @@ openclaw setup --wizard Notes: - Plain `openclaw setup` initializes config + workspace without the full onboarding flow. +- After plain setup, run `openclaw configure` to choose models, channels, Gateway, plugins, skills, or health checks. - Onboarding auto-runs when any onboarding flags are present (`--wizard`, `--non-interactive`, `--mode`, `--import-from`, `--import-source`, `--import-secrets`, `--remote-url`, `--remote-token`). - If Hermes state is detected, interactive onboarding can offer migration automatically. Import onboarding requires a fresh setup; use [Migrate](/cli/migrate) for dry-run plans, backups, and overwrite mode outside onboarding. diff --git a/src/commands/setup.test.ts b/src/commands/setup.test.ts index 64e835c820e..6bbc3d10ec6 100644 --- a/src/commands/setup.test.ts +++ b/src/commands/setup.test.ts @@ -48,6 +48,26 @@ describe("setupCommand", () => { }); }); + it("explains that plain setup only initializes local files", async () => { + await withTempHome(async (home) => { + const runtime = { + log: vi.fn(), + error: vi.fn(), + exit: vi.fn(), + }; + const deps = createSetupDeps(home); + + await setupCommand(undefined, runtime, deps); + + const logs = runtime.log.mock.calls.map((call) => String(call[0])).join("\n"); + expect(logs).toContain( + "Setup complete: local config, workspace, and session directories are ready.", + ); + expect(logs).toContain("openclaw configure"); + expect(logs).toContain("openclaw setup --wizard"); + }); + }); + it("adds gateway.mode=local to an existing config without overwriting workspace", async () => { await withTempHome(async (home) => { const runtime = { diff --git a/src/commands/setup.ts b/src/commands/setup.ts index 6e113165692..0f84d052fb9 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -1,6 +1,7 @@ import fs from "node:fs/promises"; import JSON5 from "json5"; import { z } from "zod"; +import { formatCliCommand } from "../cli/command-format.js"; import type { OptionalBootstrapFileName } from "../config/types.agent-defaults.js"; import type { OpenClawConfig } from "../config/types.js"; import type { RuntimeEnv } from "../runtime.js"; @@ -206,4 +207,10 @@ export async function setupCommand( )(); await (deps.mkdir ?? fs.mkdir)(sessionsDir, { recursive: true }); runtime.log(`Sessions OK: ${shortenHomePath(sessionsDir)}`); + runtime.log(""); + runtime.log("Setup complete: local config, workspace, and session directories are ready."); + runtime.log( + `Next: run ${formatCliCommand("openclaw configure")} to choose models, channels, Gateway, plugins, skills, and health checks.`, + ); + runtime.log(`For full first-run onboarding, run ${formatCliCommand("openclaw setup --wizard")}.`); }