# A simple to use, efficient, Command Line Argument Parser
[](https://crates.io/crates/cok)
[](https://gitlab.com/andrew_ryan/cok)
[](https://gitlab.com/andrew_ryan/cok/-/raw/master/LICENSE)
## Example
create cli.json
```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
```rust
#[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
```