cok 0.1.5

A simple to use, efficient, Command Line Argument Parser
Documentation

A simple to use, efficient, Command Line Argument Parser

Crates.io Rust license

Example

create cli.json

{
    "name":"get",
    "version":"0.1.1",
    "authors":["Anonymous <dnrops@anonymous.com>"],
    "about":"A git cli",
    "args":[
        {
            "arg":"--init",
            "short":"-i",
            "required":true,
            "about":"git init",
            "takes_value":true
          
        },
        {
            "arg":"--add",
            "short":"-a",
            "required":true,
            "about":"git add",
            "takes_value":true
        },
        {
            "arg":"--commit",
            "short":"-c",
            "required":true,
            "about":"the file type",
            "takes_value":true,
            "subcommands":[
                {
                    "arg":"--commit",
                    "short":"-m",
                    "required":false,
                    "about":"commit msg",
                    "takes_value":true
                }
            ]
        }, 
        {
            "arg":"--push",
            "short":"-p",
            "required":true,
            "about":"git push",
            "takes_value":true
        }
    ]
}
cargo add cok

main.rs

#[allow(warnings)]
fn main() {
    use cok::cli::Cli;
    Cli::load_from_json("./cli.json");
    let args = Cli::args();   
}

a simple cli

get 0.1.1
Anonymous <dnrops@anonymous.com>
A git cli

USAGE:
        OPTION          REQUIRED        ABOUT
get     -i --init       true            git init
get     -a --add        true            git add
get     -c --commit     true            the file type
get     -p --push       true            git push
get     -h --help                       Prints help information

SUBCOMMANDS:
        OPTION          SUBCOMMAND      REQUIRED        ABOUT
get     -c --commit     -m --commit     false           commit msg