Problem
The help command and --help root flag do not behave like clet:
-
example-app help should launch the Terminal.Gui markdown viewer (like clet help does), rendering rich markdown content in the TUI. Currently, HelpCommand.RunAsync returns markdown text as a CommandResult but does not actually display it in a viewer -- it relies on the host to render it, and the host just writes the string to stdout after RunAsync returns.
-
example-app --help should render the help content as ANSI-styled markdown to stdout (like clet --help does). Currently, MetadataHelpProvider.GetRootHelp generates plain text (not markdown), and CliHost.WriteRootFlag writes it directly with stdout.WriteLine -- no markdown rendering pass.
Expected behavior
help (the command): launches a TUI markdown viewer displaying the help content.
--help (the root flag): renders help content as markdown to stdout via MarkdownRenderer.RenderToAnsi.
- Both paths should start from the same markdown source (either auto-generated from metadata or provided via
EmbeddedMarkdownHelpProvider).
Current behavior
help command: returns markdown string in CommandResult, host writes it as-is to stdout (no TUI viewer).
--help flag: MetadataHelpProvider produces plain text, written directly to stdout without markdown rendering.
Suggested approach
MetadataHelpProvider should generate markdown (not plain text).
CliHost.WriteRootFlag for Help should pass the markdown through MarkdownRenderer.RenderToAnsi before writing to stdout.
HelpCommand.RunAsync should launch a Terminal.Gui markdown viewer (similar to how clet help works) rather than just returning the markdown string as a result.
Problem
The
helpcommand and--helproot flag do not behave likeclet:example-app helpshould launch the Terminal.Gui markdown viewer (likeclet helpdoes), rendering rich markdown content in the TUI. Currently,HelpCommand.RunAsyncreturns markdown text as aCommandResultbut does not actually display it in a viewer -- it relies on the host to render it, and the host just writes the string to stdout afterRunAsyncreturns.example-app --helpshould render the help content as ANSI-styled markdown to stdout (likeclet --helpdoes). Currently,MetadataHelpProvider.GetRootHelpgenerates plain text (not markdown), andCliHost.WriteRootFlagwrites it directly withstdout.WriteLine-- no markdown rendering pass.Expected behavior
help(the command): launches a TUI markdown viewer displaying the help content.--help(the root flag): renders help content as markdown to stdout viaMarkdownRenderer.RenderToAnsi.EmbeddedMarkdownHelpProvider).Current behavior
helpcommand: returns markdown string inCommandResult, host writes it as-is to stdout (no TUI viewer).--helpflag:MetadataHelpProviderproduces plain text, written directly to stdout without markdown rendering.Suggested approach
MetadataHelpProvidershould generate markdown (not plain text).CliHost.WriteRootFlagforHelpshould pass the markdown throughMarkdownRenderer.RenderToAnsibefore writing to stdout.HelpCommand.RunAsyncshould launch a Terminal.Gui markdown viewer (similar to howclet helpworks) rather than just returning the markdown string as a result.