Parsers and Combinators
cmd-ts
can help you build a full command line application, with nested commands, options, arguments, and whatever you want. One of the secret sauces baked into cmd-ts
is the ability to compose parsers.
Argument Parser
An argument parser is a simple struct with a parse
function and an optional register
function.
cmd-ts
is shipped with a couple of parsers and combinators to help you build your dream command-line app. subcommands
are built using nested command
s. Every command
is built with flag
, option
and positional
arguments. Here is a short parser description:
positional
andrestPositionals
to read arguments by positionoption
andmultioption
to read binary--key value
argumentsflag
andmultiflag
to read unary--key
argumentscommand
to compose multiple arguments into a command line appsubcommands
to compose multiple command line apps into one command line appbinary
to make a command line app a UNIX-executable-ready command