Skip to main content

Module init

Module init 

Source
Expand description

ralph init command: Clap types and handler.

Responsibilities:

  • Parse CLI arguments for the init command.
  • Determine interactive vs non-interactive mode based on flags and TTY detection.
  • Delegate to the init command implementation.

Not handled here:

  • Actual file creation logic (see crate::commands::init).
  • Interactive wizard implementation (see crate::commands::init).

Invariants/assumptions:

  • --interactive and --non-interactive are mutually exclusive.
  • TTY detection requires both stdin and stdout to be TTYs for interactive mode.
  • --interactive fails fast if stdin/stdout are not usable TTYs.

Structs§

InitArgs

Functions§

handle_init