m-cli-builder
v1.0.0
Published
Easy to use cli builder by MiftikCZ.
Downloads
5
Readme
Install
npm i m-cli-builder
Usage
const mclib = require("m-cli-builder")(
"Default message title",
"Default message description",
"--" // prefix
);
mclib.add("
command", // command's name
"description", // command's description
false // required?
);
// check if user used "test" argument (--test)
if(mclib.args["test"]) {
console.log("You used --test !");
}
// see more details about the arguments
console.log(mclib.args);
mclib.check(); // check if user used all required arguments
U can use --command=<detail> <more details>
for example: --send=true Hello from mclib! --type=message
{
"send": {
"text": "Hello from mclib!",
"description": "true",
"name": "--send"
},
"type": {
"text": "",
"description": "message",
"name": "--type"
},
}