class

Hwaro::CLI::Commands::InitCommand

Inherits Reference / Object

Constants

DESCRIPTION = "Initialize a new project"
FLAGS = [FlagInfo.new(short: "-f", long: "--force", description: "Allow init even if directory is not empty (keeps existing files, adds missing scaffold files)"), FlagInfo.new(short: nil, long: "--clean", description: "Remove existing files in target before scaffolding (implies --force; refuses if target contains .git/)"), FlagInfo.new(short: nil, long: "--scaffold", description: "Scaffold type or remote source (e.g., blog, github:user/repo)", takes_value: true, value_hint: "TYPE"), FlagInfo.new(short: nil, long: "--include-multilingual", description: "Enable multilingual support (e.g., en,ko)", takes_value: true, value_hint: "LANGS"), FlagInfo.new(short: nil, long: "--minimal-config", description: "Generate minimal config.toml without comments and optional sections"), FlagInfo.new(short: nil, long: "--full-config", description: "Generate full config.toml with maximum comments and optional sections for discoverability"), FlagInfo.new(short: nil, long: "--agents", description: "AGENTS.md content mode: remote (lightweight, default) or local (full embedded)", takes_value: true, value_hint: "MODE"), FlagInfo.new(short: nil, long: "--skip-agents-md", description: "Skip creating AGENTS.md file"), FlagInfo.new(short: nil, long: "--skip-sample-content", description: "Skip creating sample content files"), FlagInfo.new(short: nil, long: "--skip-taxonomies", description: "Skip taxonomies configuration and templates"), FlagInfo.new(short: nil, long: "--list-scaffolds", description: "List available built-in scaffolds and exit"), FlagInfo.new(short: nil, long: "--json", description: "Emit machine-readable JSON output (with --list-scaffolds)"), FlagInfo.new(short: nil, long: "--wizard", description: "Run the interactive wizard (TTY only)"), QUIET_FLAG, HELP_FLAG]

Flags defined here are used both for OptionParser and completion generation

NAME = "init"

Single source of truth for command metadata

POSITIONAL_ARGS = ["path"]
POSITIONAL_CHOICES = [] of String

Class methods

metadata
Source

Instance methods

parse_options(args : Array(String)) : Config::Options::InitOptions
Source
run(args : Array(String))
Source