1.0.4 • Published 1 year ago

@arcletjs/alconna v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@arcletjs/alconna

Alconna Licence FOSSA Status

About

Alconna is a powerful cli tool for parsing message chain or other raw message data. It is an overload version of CommandAnalysis, affiliated to ArcletProject.

Alconna has a large number of built-in components and complex parsing functions. But do not afraid, you can use it as a simple command parser.

example

import { Command, Args, Option} from "@arcletjs/alconna";

let cmd = new Command("npm", ["/"])
.option("list")
.subcommand("install", Args.push("pakName", String), [Option("-S|--save")])

let result = cmd.parse("/npm install tsc --save")
console.log(result.query("install"))

Output as follows:

value=null args={"pakName":["tsc"]} options={"save":{"value":Ellipsis,"args":{}}} subcommands={}

Features

  • High Performance
  • Simple and Flexible Constructor
  • Powerful Automatic Type Parse and Conversion
  • Support Synchronous and Asynchronous Actions
  • Customizable Help Text Formatter, Command Analyser, etc.
  • Customizable Language File, Support i18n
  • Cache of input command for quick response of repeated command
  • Various Features (FuzzyMatch, Command Completion, etc.)