Java Command Line Parsers Comparison

来自picocli的几个java cli 处理框架的比较,转自:https://github.com/remkop/picocli/wiki/CLI-Comparison

Overview

Overview
NameCreatorFirst
Public
Release
Latest
Stable
Version
Latest
Release
Date
Minimum
Java
Version
Software
License

picocli

Remko Popma

2017-04-15

4.1.2

2019-12-08

5

Apache 2.0

Airline

Airlift

2012-01-15

0.8

2017-08-28

8

Apache 2.0

Airline 2

Rob Vesse

2015-06-22

2.7.2

2019-07-23

7

Apache 2.0

argparse4j

Tatsuhiro Tsujikawa

2011-11-30

0.8.1

2017-09-18

6

MIT

argparser

John Lloyd

Fall 2004

1

Fall 2004

4

-

args4j

Kohsuke Kawaguchi

2005-05-10

2.33

2016-01-31

6

MIT

clajr

Marco Tonti

2006-05-16

0.9

2006-05-16

4

LGPL 2

cli-parser

Sam Pullara

2011-09-18

1.1.5

2019-01-25

5

Apache 2.0

CmdLn

Stephen Ostermiller

2003-01

1.08.02

2010

5

GPL

Commandline

Jan Kroken

2014-03-06

1.7.0

2014-03-06

8

Apache 2.0

DocOpt.java

Docopt

2014-07-21

0.6.0

2014-08-16

6

BSD

DPML CLI
(Jakarta Commons CLI2 fork)

The Digital Product Meta Library

2006-12-01

2.1.1

2008-08-22

6

Apache 2.0

Dr. Matthias Laux

Matthias Laux

2004-08

1.0

2004-08

5

-

Jakarta Commons CLI

Apache Commons

2002-11-06

1.4

2017-03-09

5

Apache 2.0

jargo

Softhouse

2013-03-18

0.1.1

2013-08-22

6

Apache 2.0

jargp

Dennis M. Sosnoski

2003

1.0

2013-02-27

4

BSD

jargs

Steve Purcell & Ewan Mellor

2001

1.0

2013-04-17

5

BSD

java-getopt

Aaron M. Renn

1998

1.0.14

2012-02-08

4

LGPL 2

JCLAP

Giles Winstanley

2011-07-05

2.0

2018-12-04

8

BSD

jcmdline

Lynne Lawrence

2002-10-29

2.0.0

2002-10-29

4

Mozilla Public License 1.1

jcommander

Cédric Beust

2010-10-12

1.71

2017-05-17

8

Apache 2.0

jcommando

Brett Wool- dridge

2005-06-22

1.2

2011-08-19

?

zlib/libpng (binary distribution)

jewelcli

Tim Wood

2011-10-20

0.8.9

2014-02-13

6

Apache 2.0

JOpt simple

Paul Holser

06-Nov-2011?

5.0.4

2017-07-14

8

MIT

jsap

Martian Software

2004-02-24

2.1

2006-08-03

4

LGPL

naturalcli

Ferran Busquets

2007-12-08

1.2.2

2008-07-20

4?

Apache 2.0

parse-cmd

jf.zarama

2008-08-09

0.0.93

2011-09-19

4

Apache 2.0

ritopt

Damian Ryan Eads

2001-10-18

0.2.1

2001-10-24

3

GPL

Rop

ryenus

2013-03-23

1.1.1

2013-09-18

7

MIT

TE-Code Command

Andrew S. Townley

2003-06-07

3.0.0-pre3

2005-02-06

4

BSD

Product Comparison

Product Comparison
NameAPIGenerates
Usage
Help
Custom-
izable
Usage
Help
User
Manual
Facilitates
Source
Inclusion
Required
depen-
dencies

picocli

annotations & reflection, and builder API (use either or both together)

yes

yes

yes

yes

-

Airline

annotations & reflection

yes

 

readme

no

Google Guava

Active Airline fork

annotations & reflection

yes

 

yes

no

Javax Inject, Apache Commons Collections 4

argparse4j

Builder

yes

 

yes

no

-

argparser

Builder

yes

 

javadoc

yes

-

args4j

annotations & reflection

yes

 

partial

no

-

clajr

method name reflection

yes

 

readme

yes

-

cli-parser

annotations & reflection

yes

 

readme

yes

-

CmdLn

Builder

yes

 

readme

yes

-

Commandline

annotations & reflection

no

-

readme

no

-

DocOpt.java

Generates code from usage help

yes

yes

readme

yes

-

DPML CLI
(Jakarta Commons CLI2 fork)

Builder

yes

 

yes

no

?

Dr. Matthias Laux

Builder

no

-

yes

yes

-

Jakarta Commons CLI

Builder

yes

 

yes

yes

-

jargo

Builder

yes

 

readme & javadoc

no

Google Guava

jargp

Descriptor & reflection

no

-

no

yes

-

jargs

Builder

no

-

no

yes

-

java-getopt

Getopt

no

-

javadoc

yes

-

JCLAP

Builder

yes

 

readme

yes

-

jcmdline

Builder

yes

 

yes

yes

-

jcommander

annotations & reflection

yes

no

yes

no

-

jcommando

Generates code from XML

yes

 

yes

yes

-

jewelcli

annotations & reflection

yes

 

yes

no

optionally Google Guava, Google Guice, LambdaJ, Commons Lang 3

JOpt simple

Builder

yes

 

yes

no

-

jsap

Builder

yes

 

yes

no

-

naturalcli

Builder

yes

 

yes

no

-

parse-cmd

Builder

yes

 

readme

yes

-

ritopt

Builder

yes

 

yes

yes

-

Rop

annotations & reflection

yes

 

readme

yes

-

TE-Code Command

Declarative with callbacks

yes

 

yes

no

-

Parsing Features

Parsing Features Comparison
NamePOSIX
Short Option
Groups
Configurable
Option
Prefix
Strongly Typed
Option
Parameters
Strongly Typed
Positional
Parameters
Multi-value Options

picocli

yes

yes

yes

yes

yes

Airline

yes

no

yes

yes

yes

Airline 2

yes

no

yes

no

yes

argparse4j

yes

yes

yes

no

yes

argparser

no

yes

yes

yes

yes

args4j

no

yes

yes

yes

yes

clajr

no

no

yes

no

yes

cli-parser

no

no

yes

no

no

CmdLn

no

no

no

no

no

Commandline

yes

no

no

no

no

DocOpt.java

yes

no

no

no

yes

DPML CLI
(Jakarta Commons CLI2 fork)

yes

no

no

no

yes

Dr. Matthias Laux

no

no

no

no

yes

Jakarta Commons CLI

yes

no

no

no

yes

jargo

no

yes

yes

yes

yes

jargp

no

no

yes

?

yes

jargs

yes

no

yes

no

no

java-getopt

yes

no

no

no

no

JCLAP

yes

no

yes

no

yes

jcmdline

no

no

yes

no

no

jcommander

no

yes

yes

no

yes

jcommando

no

no

numbers

no

no

jewelcli

no

no

yes

yes

yes

JOpt simple

yes

no

yes

yes

yes

jsap

no

no

yes

no

no

naturalcli

no

yes

yes

no

yes

parse-cmd

no

yes

no

no

no

ritopt

no

no

yes

no

yes

Rop

no

no

yes

no

no

TE-Code Command

yes

no

no

no

yes

Advanced Parsing Features

Advanced Parsing Features Comparison
NameSubcommandsExclusive
Options
Configurable
Validation
i18n

picocli

yes

yes (in 4.0)

minimal (use jsr-380)

yes

Airline

yes

no

no

no

Airline 2

yes

yes

no

no

argparse4j

yes

yes

no

layout is locale-aware

argparser

no

no

no

no

args4j

yes

yes

no

yes

clajr

no

no

no

no

cli-parser

no

no

no

no

CmdLn

no

no

yes

no

Commandline

no

no

no

no

DocOpt.java

no

yes

no

no

DPML CLI
(Jakarta Commons CLI2 fork)

yes

no

yes

no

Dr. Matthias Laux

no

no

no

no

Jakarta Commons CLI

no

no

no

no

jargo

yes

no

no

no

jargp

no

no

no

no

jargs

no

no

no

no

java-getopt

no

no

no

yes

JCLAP

no

no

no

yes

jcmdline

no

no

no

yes

jcommander

yes

no

yes

yes

jcommando

no

no

no

no

jewelcli

no

no

no

yes

JOpt simple

no

no

no

no

jsap

no

no

no

no

naturalcli

no

no

no

no

parse-cmd

no

no

yes

no

ritopt

yes

no

no

no

Rop

yes

no

no

no

TE-Code Command

no

yes

no

yes

 

posted on 2020-01-21 10:16  荣锋亮  阅读(892)  评论(0编辑  收藏  举报

导航