import { HelpOptions } from "../help/index.mjs"; import { CommandSchema } from "../schema/command.mjs"; //#region src/core/cli/root-help.d.ts /** Structural subset of `CLISchema` — avoids circular imports through the barrel. */ interface CLISchemaLike { readonly name: string; readonly version: string | undefined; readonly description: string | undefined; readonly commands: ReadonlyArray<{ readonly schema: CommandSchema; }>; readonly defaultCommand: { readonly schema: CommandSchema; } | undefined; /** Whether the default is also a named route — listed in `Commands:` when so. */ readonly defaultCommandRouted?: boolean | undefined; readonly helpLinks?: { readonly name: string | undefined; readonly version: string | undefined; } | undefined; readonly completionsFlag?: { readonly shells: readonly string[]; } | undefined; /** * Config discovery settings. Only its presence is read — defined means * `.config()` enabled the built-in `--config ` flag, so root help * advertises it in `Global options:`. */ readonly configSettings?: { readonly appName: string; } | undefined; } /** * Generate root-level help text for the CLI program. * * Shows program name, version, description, usage line, and available * subcommands. The default command is the CLI's root *surface*: its arguments * and flags are rendered inline (unless `inlineDefault` is `false`) and it is * omitted from the `Commands:` list unless `showDefaultInCommands` is set. When * `.completions({ as: 'flag' })` is active, the eager `--completions ` * flag is advertised in the `Flags:` section. * * @internal */ declare function formatRootHelp(schema: CLISchemaLike, options?: HelpOptions): string; //#endregion export { formatRootHelp };