INNER CODE UNIT · TypeScript

applyHelpConfigurationRecursively

lmstudio-ai/lms · src/index.ts:144

function applyHelpConfigurationRecursively(
  commandToConfigure: HelpConfigurableCommand,
  commandHelpConfig: HelpConfiguration,
  nestedHelpConfig: HelpConfiguration,
): void {
  commandToConfigure.configureHelp(commandHelpConfig);
  const subcommands = commandToConfigure.commands;
  for (const subcommand of subcommands) {
    applyHelpConfigurationRecursively(subcommand, nestedHelpConfig, nestedHelpConfig);
  }
}

program.name("lms");
program.helpCommand(true);

// Add a hidden global version option (-v/--version) that prints and exits without cluttering help
program.addOption(new Option("-v, --version", "Print the version of the CLI").hideHelp());
program.addHelpText(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…