Nimony

The road to Nim 3

smartcli

nimony/lib/std/smartcli.nim

Typed command-line parser generation from a help-text specification.

Use cliapp with a specification containing Commands:, Arguments:, and Options: sections. The accompanying compiler plugin generates a parser and a typed options object at the call site.

A trailing positional name ending in ..., such as install ITEM..., accepts zero or more values and generates a seq[string] field named item. Other positional fields are strings. A repeated field name across commands must have the same cardinality. Options can occur between values. Usage: is descriptive; the Commands: and Arguments: sections define the parser. Inline command arguments take precedence over Arguments:.