module

Phreak

Phreak is a library for creating CLIs in the style of Crystal's built in OptionRootParser, but with much more flexibility.

Constants

VERSION = "0.1.0"

Class methods

create_parser

Creates a reusable instance of Parser. This is opposed to other class methods on Phreak, which are single-use. As a note, this can also be done using Parser.new, but using this method is preferred style for consistency.

Source
parse(args : Array(String), &block : RootParser -> Nil) : Nil

Initializes a parser, and yields to a setup block with the created subparser.

Source
parse!

Equivalent to invoking Phreak::parse with args = ARGV.

Source

Nested types