openclaw/src/commands/onboard.ts

23 lines
721 B
TypeScript
Raw Normal View History

2026-01-01 17:57:57 +01:00
import { assertSupportedRuntime } from "../infra/runtime-guard.js";
import type { RuntimeEnv } from "../runtime.js";
import { defaultRuntime } from "../runtime.js";
2026-01-01 18:23:16 +01:00
import { runInteractiveOnboarding } from "./onboard-interactive.js";
import { runNonInteractiveOnboarding } from "./onboard-non-interactive.js";
import type { OnboardOptions } from "./onboard-types.js";
2026-01-01 17:57:57 +01:00
export async function onboardCommand(
opts: OnboardOptions,
runtime: RuntimeEnv = defaultRuntime,
) {
assertSupportedRuntime(runtime);
if (opts.nonInteractive) {
2026-01-01 18:23:16 +01:00
await runNonInteractiveOnboarding(opts, runtime);
2026-01-01 17:57:57 +01:00
return;
}
2026-01-01 18:23:16 +01:00
await runInteractiveOnboarding(opts, runtime);
2026-01-01 17:57:57 +01:00
}
2026-01-01 18:23:16 +01:00
export type { OnboardOptions } from "./onboard-types.js";