import type { CommandGroup } from "./cli-command-types.js"; let commandGroupsForUsage: ReadonlyArray | null = null; export function setCommandGroupsForUsage(groups: ReadonlyArray): void { commandGroupsForUsage = groups; } export function getCommandGroupsForUsage(): ReadonlyArray { if (commandGroupsForUsage === null) { throw new Error("BUG: command groups for usage not initialized"); } return commandGroupsForUsage; }