options

    Command line argument parser for MoonBit

    CLI
    argument parser
    command line
    Download zip
    Author
    Version
    0.1.3
    License
    Apache-2.0
    Last updated
    14 days ago
    Downloads
    60

    Dependencies

    #Options: Command Line Argument Parser for MoonBit (Based on JSON)

    Warning: it is for self-use and experimental, not for production.

    If you are interested, check examples.

    LeafCommand

    pub(open) trait LeafCommand : ToJson +
    FromJson
    + Default {
    }

    CommandParser

    type CommandParser[T]

    CommandParser::map

    fn[Sub, T] CommandParser::map(self : CommandParser[Sub], builder : (Sub) -> T) -> CommandParser[T]

    CommandParser::parse

    fn[T] CommandParser::parse(self : CommandParser[T], args : Array[String]) -> T

    CommandParser::parse_terminated

    fn[T] CommandParser::parse_terminated(self : CommandParser[T]) -> T

    father

    fn[T] father(subs : Array[(String, CommandParser[T])]) -> CommandParser[T]

    get_cli_args

    fn get_cli_args() -> Array[String]

    unit

    fn unit() -> CommandParser[Unit]

    unit_map

    fn[T] unit_map(builder : T) -> CommandParser[T]

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io