class

Hwaro::CLI::Commands::InitWizard

Inherits Reference < Object

Guided, line-based wizard for hwaro init --wizard in an interactive session. Mirrors NewWizard: it asks one styled question at a time, shows a Receipt summary, and confirms before anything touches the filesystem. It only collects input — the resulting InitOptions flows through the exact same Services::Initializer pipeline the flag form uses, so there is one creation path, not two.

Constants

BASE_ORDER = [Config::Options::ScaffoldType::Simple, Config::Options::ScaffoldType::Blog, Config::Options::ScaffoldType::Docs, Config::Options::ScaffoldType::Book, Config::Options::ScaffoldType::Bare]

Scaffolds in presentation order. Every scaffold follows the OS color scheme automatically and ships a manual theme switcher, so there is no separate dark-variant picker step.

Instance methods

run(seed_path : String | Nil = nil, base : Config::Options::InitOptions | Nil = nil, seed_scaffold : Config::Options::ScaffoldType | Nil = nil) : Config::Options::InitOptions | Nil

Returns the collected InitOptions, or nil on cancellation — a declined confirmation or an EOF (Ctrl-D) on any prompt — so the caller can bail out without creating anything.

The wizard only asks for what the user has not already supplied on the command line: a path positional (e.g. hwaro init my-site --wizard) skips the directory prompt, and --scaffold blog skips the scaffold picker. Every remaining flag rides in on base — which is the fully parsed InitOptions — so --force, --clean, --skip-*, --minimal-config/--full-config, --agents and --include-multilingual keep working alongside --wizard instead of being silently dropped.

Source