karg

option parser

Unlicense 60 个版本
安装
npm install karg
yarn add karg
pnpm add karg
bun add karg
README

icon

karg

is the german word for meager, barren, sparse

karg

is also an option parser with meager features but simple setup and pretty output

meager features

does just the bare minimum:

  • automatic help generation
  • short and long option names
  • unnamed arguments
  • boolean toggle
  • dictionary output

simple setup

args = require('karg') """

scriptname
    additional  . ? unnamed arguments . **
    an-option   . ? some description  . = default
    boolean     . ? -b to turn it on  . = false
    switch      . ? -s to turn it off . = true
    invisible                         . = hidden
    
help
    some help
    
version       1.0.0

"""

pretty output

karg

npm package Build Status downloads

版本列表
1.26.0 2021-11-05
1.25.0 2021-11-05
1.24.0 2021-11-05
1.23.0 2021-02-24
1.22.0 2020-03-29
1.21.0 2020-03-29
1.20.0 2019-11-15
1.19.0 2019-06-10
1.18.1 2019-06-10
1.18.0 2019-06-07
1.17.0 2019-06-07
1.16.0 2019-06-07
1.13.0 2019-05-30
1.12.0 2019-05-29
1.11.0 2019-05-11
1.10.0 2018-06-06
1.9.0 2018-06-03
1.8.0 2018-06-03
1.7.0 2018-06-03
1.6.0 2018-06-03
1.5.0 2018-06-01
1.4.0 2018-05-31
1.3.0 2018-05-29
1.1.2 2018-03-04
1.1.1 2018-02-25
1.0.10 2017-03-09
1.0.9 2016-06-27
1.0.8 2016-06-01
1.0.7 2016-04-28
1.0.6 2016-04-28
1.0.5 2016-04-28
1.0.4 2016-02-27
1.0.3 2016-02-03
1.0.2 2016-02-03
1.0.1 2016-02-02
0.3.2 2016-01-31
0.3.1 2016-01-28
0.2.1 2016-01-24
0.1.34 2016-01-24
0.1.33 2016-01-24
0.1.32 2016-01-22
0.1.31 2016-01-19
0.1.25 2016-01-19
0.1.23 2016-01-19
0.1.20 2016-01-18
0.1.19 2016-01-13
0.1.18 2016-01-13
0.1.17 2016-01-12
0.1.16 2016-01-12
0.1.15 2016-01-12
0.1.11 2016-01-12
0.1.10 2016-01-11
0.1.9 2016-01-11
0.1.8 2016-01-10
0.1.7 2016-01-10
0.1.6 2016-01-10
0.1.5 2016-01-08
0.1.4 2016-01-07
0.1.3 2016-01-07
0.1.2 2016-01-05