okf-cli
Safe HaskellNone
LanguageGHC2024

Okf.Cli.Help

Description

Conceptual help topic guides for the okf CLI.

Each topic's content lives in a standalone plain-text file under okf-clihelp and is embedded into the binary at compile time with file-embed's embedStringFile splice. The shipped okf executable is therefore self-contained: okf help okf works with no extra files on disk and no network access.

Topic files are written as terminal-oriented plain text (ALL-CAPS section headers, 2-space indented bodies) and printed verbatim; there is no Markdown rendering step.

Synopsis

Documentation

data HelpCommand Source #

A bare help lists topics; help topic shows one.

Constructors

ListTopics 
ShowTopic !Text 

Instances

Instances details
Show HelpCommand Source # 
Instance details

Defined in Okf.Cli.Help

Eq HelpCommand Source # 
Instance details

Defined in Okf.Cli.Help

data HelpTopic Source #

A single help guide: short name, one-line description, embedded content.

Constructors

HelpTopic 

Instances

Instances details
Show HelpTopic Source # 
Instance details

Defined in Okf.Cli.Help

Eq HelpTopic Source # 
Instance details

Defined in Okf.Cli.Help

helpTopics :: [HelpTopic] Source #

All available help topics, in display order.

helpCommandParser :: Parser HelpCommand Source #

Parse help [TOPIC]. With no argument, 'pure ListTopics' wins via <|>.

handleHelpCommand :: HelpCommand -> IO () Source #

Run the help command: list the topic index or print one topic.