cmdliner
v1.1.1
Cmdliner allows the declarative definition of command line interfaces
for OCaml.
It provides a simple and compositional mechanism to convert command
line arguments to OCaml values and pass them to your functions. The
module automatically handles syntax errors, help messages and UNIX man
page generation. It supports programs with single or multiple commands
and respects most of the POSIX and GNU conventions.
Cmdliner has no dependencies and is distributed under the ISC license.
Home page: http://erratique.ch/software/cmdliner
Installation
Cmdliner can be installed with opam
:
opam install cmdliner
If you don't use opam
consult the opam
file for build
instructions.
Documentation
The documentation and API reference is automatically generated by from
the source interfaces. It can be consulted online or viaodig doc cmdliner
.
Sample programs
If you installed Cmdliner with opam
sample programs are located in
the directory opam config var cmdliner:doc
. These programs define
the command line of some classic programs.
In the distribution sample programs are located in the test
directory of the distribution. They can be built and run with:
topkg build --tests true && topkg test
sha512=5478ad833da254b5587b3746e3a8493e66e867a081ac0f653a901cc8a7d944f66e4387592215ce25d939be76f281c4785702f54d4a74b1700bc8838a62255c9e
>= "4.08.0"
>= "1.4.3"
< "1.1.0"
>= "1.3.0"
>= "1.3.0"
>= "1.3.0"
>= "0.2"
>= "3.0.0"
< "3.0.0"
>= "0.0.4"
< "0.9.5" | = "0.9.9"
< "2.2.0"
< "2.2.0"
< "2.3.0"
< "2.2.0"
< "2.2.0"
< "2.2.0"
< "2.1.1"
< "2.2.0"
< "2.2.0"
< "2.2.0"
< "2.0.0"
< "2.2.0"
< "2.2.0"
< "2.2.0"
>= "2.2.0"
>= "1.3.0"
< "2.2.0"
< "1.4.0"
< "2.2.0"
>= "0.0.4"
>= "2.0.0"
>= "1.8.0"
>= "1.8.0"
>= "1.8.0"
>= "1.8.0"
>= "1.8.0"
>= "1.8.0"
>= "0.3.0"
>= "0.3.0"
>= "0.0.2" & < "0.2.0"
>= "0.13.0" & < "0.99.0"
>= "8.9.0+0.6.0"
>= "0.2.1"
>= "0.4"
>= "0.4"
>= "0.10.0"
>= "0.10.0"
>= "0.10.0"
< "0.11.0"
>= "0.9.0"
>= "0.10.0" & < "0.11.0"
>= "0.8" & < "1.0.0" | >= "1.3.0"
>= "0.6.0" & < "0.19.1"
< "0.9.0"
>= "1.1.0" & < "3.0.0"
>= "0.0.4"
>= "0.3.0"
>= "1.1.0"
>= "1.6.1"
>= "1.0"
>= "0.3.5-2"
>= "1.3.1"
< "0.2.0"
>= "3.2.0" & < "5.0.0"
= "3.1.2" | >= "4.0.0"
>= "1.4.4" & < "1.6.0" | >= "3.0.0"
= "3.7.1" | >= "3.8.1"
>= "0.4.0" & < "3.0.0"
>= "0.1.3"
>= "2.7"
< "2.0.0"
>= "0.3.2"
< "1.0.0"
< "3.0.0" | = "3.2.1"
>= "2.3.0" & < "2.9.1" | >= "3.2.1"
>= "2.3.0" & < "3.0.0" | >= "3.2.1"
< "3.0.0" | >= "3.2.1"
>= "1.0.2" & < "1.2.0" | >= "2.3.0" & < "3.0.0" | >= "3.2.1"
>= "2.5" & < "3.0"
>= "0.3" & < "0.5"
>= "0.5"
>= "0.0.9"
= "2.0.0" | >= "2.2.0"
< "0.3.0"
>= "0.2.2"
< "2.0.0"
>= "2.1.2" & < "2.2.0"
>= "2.6.0" & < "3.0.0"
>= "0.5.0"
>= "0.9.2" & < "4.0.3"
>= "2.0.0"
>= "0.3.4"
>= "0.21.0"
>= "1.1.6"
= "1.99.20-beta"
>= "1.6.0"
>= "0.4.1"
< "0.4.1"
>= "2.0.0~beta"
>= "1.2.1"
>= "2.0.0~beta"
>= "0.2.0"
>= "1.3.1"
!= "0.3.0+transition"
>= "1.3.0" & < "2.0"
>= "2.15"
>= "0.12.0"
>= "0.0.5"
>= "4.13"
< "0.4"
>= "0.9.6"
>= "0.2.0"
= "8.1.0"
>= "0.4"
< "0.12.1"
< "0.12.1"
< "0.3.4+transition"
< "0.10.2" | >= "0.11.0"
< "0.2.0"
>= "1.9.51" & < "5.9.0"
< "0.0.1.7"
>= "0.2.0" & < "0.7.1"
>= "0.0.4"
>= "8.0"
>= "0.3.0"
>= "0.15.3"
>= "1.0.5"
>= "3.5.0"
>= "1.0.0" & != "1.4.1"
>= "0.4"
>= "1.0.0"
= "0.2.0"