cok 0.1.0

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":"fd",
    "version":"8.4.0",
    "authors":["Anonymous <dnrops@anonymous.com>"],
    "about":"A cli for find file",
    "args":[
        {
            "arg":"--name",
            "short":"-n",
            "required":true,
            "about":"about the file",
            "takes_value":true,
            "subcommands":[
                {
                    "arg":"--remove",
                    "short":"-r",
                    "required":false,
                    "about":"remove or not",
                    "takes_value":false
                }
            ]
        },
        {
            "arg":"--file",
            "short":"-f",
            "required":true,
            "about":"the file type",
            "takes_value":true
        }
    ]
}
cargo add cok

main.rs

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

a simple cli

fd 8.4.0
Anonymous <dnrops@anonymous.com>
A cli for find file

USAGE:
   	OPTION		ABOUT			REQUIRED
fd	-n --name	about the file		true
fd	-f --file	the file type		true
fd	-h --help	Prints help information

SUBCOMMANDS:
   	OPTION		SUBCOMMAND	ABOUT		REQUIRED
fd	-n --name	-r --remove	remove or not	false