SMFCommandRunner constructor

SMFCommandRunner()

Configures the top-level CLI and registers subcommands.

Implementation

SMFCommandRunner()
    : super(
        'smf',
        'A CLI tool by Say My Frame',
        usageLineLength: terminalLineLength,
      ) {
  argParser
    ..addFlag(
      'verbose',
      negatable: false,
      help: 'Enable verbose logging.',
    )
    ..addFlag(
      'strict',
      negatable: false,
      help: 'Enable strict mode for module compatibility checks.',
    )
    ..addFlag(
      'version',
      abbr: 'v',
      negatable: false,
      help: 'Print the current CLI version.',
    )
    ..addOption(
      'on-conflict',
      help: 'Behavior when destination directory exists '
          '(replace, copy, cancel, prompt).',
      allowed: ['replace', 'copy', 'cancel', 'prompt'],
      defaultsTo: 'prompt',
    );

  addCommand(CreateCommand());
}