package cmdliner

  1. Overview
  2. Docs
Declarative definition of command line interfaces for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

cmdliner-1.0.2.tbz
md5=ab2f0130e88e8dcd723ac6154c98a881

Description

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.

README

Cmdliner — Declarative definition of command line interfaces for OCaml

v1.0.2

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
Contact: Daniel Bünzli <daniel.buenzl i@erratique.ch>

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 via odig 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

Dependencies (5)

  1. result < "1.5"
  2. topkg >= "0.8.1" & build
  3. ocamlbuild build
  4. ocamlfind build
  5. ocaml >= "4.01.0" & < "5.0"

Dev Dependencies

None

  1. acgtk >= "1.5.1" & < "2.0.0"
  2. albatross < "1.4.3"
  3. alcotest < "1.0.0" | = "1.5.0"
  4. alcotest-async >= "1.3.0" & < "1.6.0"
  5. alcotest-js < "1.6.0"
  6. alcotest-lwt >= "1.3.0" & < "1.6.0"
  7. alcotest-mirage >= "1.3.0" & < "1.6.0"
  8. alt-ergo >= "2.4.0" & < "2.4.2"
  9. altgr-ergo >= "2.4.0" & < "2.4.2"
  10. aperf
  11. archsat
  12. asak >= "0.2" & < "0.4"
  13. awa < "0.1.1"
  14. aws-s3 >= "3.0.0" & < "4.6.0"
  15. aws-s3-async < "3.0.0"
  16. b0 < "0.0.4"
  17. bap < "0.9.5" | = "0.9.9"
  18. bap-abi < "2.2.0"
  19. bap-api < "2.2.0"
  20. bap-beagle < "2.3.0"
  21. bap-bil < "2.2.0"
  22. bap-byteweight-frontend
  23. bap-cache < "2.2.0"
  24. bap-callsites
  25. bap-demangle < "2.5.0"
  26. bap-dump-symbols < "2.2.0"
  27. bap-frames < "2.1.1"
  28. bap-frontend < "2.2.0"
  29. bap-fsi-benchmark
  30. bap-ida-plugin < "2.2.0"
  31. bap-llvm < "2.2.0"
  32. bap-main
  33. bap-mc < "2.0.0"
  34. bap-objdump < "2.2.0"
  35. bap-optimization < "2.2.0"
  36. bap-phoenix
  37. bap-piqi
  38. bap-plugins < "2.2.0"
  39. bap-powerpc >= "2.2.0"
  40. bap-std >= "1.3.0"
  41. bap-symbol-reader < "2.2.0"
  42. bap-taint < "1.4.0"
  43. bap-taint-propagator
  44. bap-term-mapper < "2.2.0"
  45. bap-trace
  46. bap-veri
  47. bap-warn-unused
  48. bap-x86
  49. batsh >= "0.0.4"
  50. benchpress
  51. benchpress-server
  52. bisect_ppx >= "2.0.0"
  53. boltzgen
  54. brozip
  55. bt
  56. builder < "0.3.1"
  57. builder-web
  58. bun
  59. bytepdf
  60. ca-certs-nss < "3.77"
  61. camels
  62. camyll < "0.4.1"
  63. capnp-rpc-unix < "1.2.3"
  64. caqti = "1.7.0"
  65. caqti-async = "1.7.0"
  66. caqti-lwt = "1.7.0"
  67. certify
  68. charrua-unix
  69. checkseum >= "0.0.2" & < "0.2.0"
  70. cmdliner-stdlib
  71. cmdtui-lambda-term
  72. coclobas
  73. cohttp >= "0.13.0" & < "0.99.0"
  74. cohttp-lwt-unix != "4.1.2" & < "5.2.0"
  75. cohttp-lwt-unix-nossl
  76. cohttp-lwt-unix-ssl
  77. coin < "0.1.2"
  78. conex
  79. conex-mirage-crypto
  80. conex-nocrypto
  81. confero
  82. coq-serapi < "8.15.0+0.15.2"
  83. craml
  84. crowbar < "0.2.1"
  85. crunch < "3.3.0"
  86. current < "0.6"
  87. current_examples < "0.6"
  88. current_web < "0.6"
  89. datakit >= "0.10.0"
  90. datakit-bridge-github >= "0.10.0"
  91. datakit-bridge-local-git
  92. datakit-ci >= "0.10.0"
  93. datakit-client < "0.11.0"
  94. datakit-client-9p
  95. datakit-github >= "0.9.0"
  96. datakit-server >= "0.10.0" & < "0.11.0"
  97. decompress >= "0.8" & < "1.0.0" | >= "1.3.0" & < "1.4.3"
  98. depgraph
  99. dirsift
  100. diskuvbox < "0.2.0"
  101. dkim < "0.4.0"
  102. dns >= "0.6.0" & < "0.19.1"
  103. dns-cli < "6.2.0"
  104. dns-forward < "0.9.0"
  105. dns-lwt-unix
  106. dockerfile >= "1.1.0" & < "3.0.0"
  107. dockerfile-cmd
  108. dockerfile-opam < "8.1.0"
  109. dog
  110. doi2bib >= "0.3.0" & < "0.6.2"
  111. dolmen_bin < "0.7"
  112. dream-cli < "0.2.0"
  113. dryunit
  114. dscheck >= "0.2.0"
  115. duff < "0.3"
  116. dune-deps >= "1.1.0"
  117. dune-expand
  118. dune-release < "1.6.1"
  119. earlybird < "1.0.0"
  120. elasticsearch-cli >= "1.0"
  121. electrod
  122. electrumAnalyzer >= "0.3.5-2"
  123. elpi >= "1.3.1"
  124. equinoxe < "0.2.0"
  125. erlang
  126. ez_cmdliner < "0.4.3"
  127. ezxenstore < "0.4.3"
  128. facteur
  129. fat-filesystem < "0.15.1"
  130. frenetic >= "3.2.0" & < "5.0.0"
  131. fsevents-lwt
  132. functoria < "4.0.0"
  133. functoria-runtime < "4.0.0"
  134. git >= "1.4.4" & < "1.6.0" | >= "3.0.0" & != "3.7.1" & < "3.8.1"
  135. git-unix >= "1.10.1" & < "3.0.0"
  136. github >= "0.4.0" & < "3.0.0"
  137. github-unix
  138. gobba
  139. gospel < "0.2.0"
  140. happy-eyeballs-lwt < "0.2.0"
  141. hlarp
  142. hll >= "2.7"
  143. http-lwt-client < "0.0.6"
  144. hvsock < "3.0.1"
  145. hxd < "0.3.2"
  146. igvxml
  147. index >= "1.3.0"
  148. index-bench < "1.3.2" | >= "1.4.2"
  149. irmin < "1.0.0"
  150. irmin-bench
  151. irmin-cli
  152. irmin-pack >= "2.3.0"
  153. irmin-test >= "2.3.0"
  154. irmin-tezos
  155. irmin-unix >= "1.0.2" & < "1.2.0" | >= "2.3.0"
  156. jitsu
  157. js_of_ocaml >= "2.5" & < "3.0"
  158. js_of_ocaml-compiler < "4.1.0"
  159. jsonxt
  160. kafka >= "0.3" & < "0.5"
  161. kafka_lwt
  162. ketrew
  163. kinetic-client >= "0.0.9"
  164. lab < "0.1.4"
  165. labrys
  166. learn-ocaml < "0.14.1"
  167. learn-ocaml-client < "0.14.1"
  168. letsencrypt < "0.3.0"
  169. letsencrypt-app < "0.5.0"
  170. llopt
  171. mastodon-archive-viewer < "0.4.0"
  172. mbr-format < "1.0.0"
  173. mdx < "2.2.0"
  174. merge-fmt < "0.3"
  175. message-switch
  176. minicaml >= "0.2.2"
  177. mirage >= "4.0.0" & < "4.4.0"
  178. mirage-block-xen < "2.0.0"
  179. mirage-console >= "2.1.2" & < "2.2.0"
  180. mirage-console-xen-cli
  181. mirage-dns >= "2.6.0" & < "3.0.0"
  182. mirage-seal
  183. mirror
  184. mkaudio < "1.1.3"
  185. monorobot
  186. mrmime = "0.5.0"
  187. named-pipe
  188. nbd >= "0.9.2" & < "4.0.3"
  189. nebula
  190. nocoiner
  191. obandit >= "0.3.4"
  192. obuilder < "0.4"
  193. ocal
  194. ocaml-gist
  195. ocamlcodoc
  196. ocamlformat < "0.21.0"
  197. ocamlformat-rpc < "0.21.0"
  198. oci
  199. ocp-browser >= "1.1.6" & < "1.3.4"
  200. ocp-build >= "1.99.20-beta"
  201. ocp-indent >= "1.6.0"
  202. ocp-indent-nlfork
  203. ocp-index < "1.3.4"
  204. ocp-reloc
  205. odds < "1.1"
  206. odig < "0.0.8"
  207. odoc
  208. ometrics >= "0.1.2"
  209. omigrate < "0.3.0"
  210. omod < "0.0.3"
  211. opam-0install < "0.4.3"
  212. opam-0install-cudf < "0.4.1"
  213. opam-build < "0.2.1"
  214. opam-build-revdeps
  215. opam-bundle
  216. opam-ci
  217. opam-client >= "2.0.0~beta" & < "2.2.0~alpha"
  218. opam-compiler < "0.2.0"
  219. opam-depext >= "1.2.1"
  220. opam-devel >= "2.0.0~beta" & < "2.2.0~alpha"
  221. opam-ed
  222. opam-installer
  223. opam-lib >= "1.3.1"
  224. opam-lock
  225. opam-package-upgrade
  226. opam-publish != "0.3.0+transition" & < "2.2.0"
  227. opam-query
  228. opam-test < "0.2.1"
  229. opam2web >= "1.3.0" & < "2.0"
  230. opass >= "2.15"
  231. operf-macro
  232. opium >= "0.12.0"
  233. ordma >= "0.0.5"
  234. orun
  235. osbx
  236. oskel
  237. osx-fsevents
  238. owork
  239. passmakercmd
  240. pds >= "4.13"
  241. pecu < "0.4"
  242. pg_query >= "0.9.6"
  243. pkcs11-cli
  244. plotkicadsch >= "0.2.0"
  245. polly < "0.4.1"
  246. ppx_deriving_cmdliner
  247. ppx_deriving_rpc = "8.1.0"
  248. prof_spacetime
  249. prometheus-app >= "0.4"
  250. protocol-9p < "0.12.1"
  251. protocol-9p-tool
  252. protocol-9p-unix < "0.12.1"
  253. publish < "0.3.4+transition"
  254. pyml_bindgen < "0.3.0"
  255. pyre-ast < "0.1.9"
  256. qcow < "0.10.2" | >= "0.11.0"
  257. qcow-format
  258. qcow-tool
  259. qmp < "0.20.0"
  260. regenerate
  261. rosetta < "0.3.0"
  262. rotor
  263. rpc >= "1.9.51" & < "5.9.0"
  264. rpclib < "9.0.0"
  265. satyrographos < "0.0.1.7"
  266. shared-block-ring < "3.0.1"
  267. sibylfs
  268. sid
  269. slack
  270. slack-backup
  271. slacko
  272. snabela
  273. solo5-elftool < "0.3.1"
  274. spin
  275. spotify-cli
  276. sslconf
  277. tallgeese
  278. tar-format >= "0.2.0" & < "0.7.1"
  279. telltime
  280. tensorflow >= "0.0.4"
  281. tezos-context-hash-irmin
  282. tezos-node >= "8.0" & < "13.0"
  283. timmy
  284. tldr >= "0.3.0"
  285. tlstunnel
  286. topkg-care
  287. torch < "v0.16.0"
  288. touist >= "3.5.0"
  289. travis-senv
  290. tuntap >= "1.0.0" & != "1.4.1"
  291. u2f
  292. uring < "0.3"
  293. usbmux
  294. user-setup >= "0.4"
  295. uuuu < "0.2.0"
  296. valentine
  297. vchan
  298. vchan-unix
  299. vchan-xen
  300. vecosek
  301. vhd-tool
  302. vimebac
  303. vpnkit
  304. webauthn
  305. xapi-idl
  306. xapi-inventory
  307. xapi-rrd-transport
  308. xe-unikernel-upload
  309. xen-block-driver
  310. xen-disk
  311. xen-evtchn
  312. xen-evtchn-unix
  313. xen-gnt >= "1.0.0"
  314. xenctrl
  315. xentropyd
  316. yuscii < "0.3.0"

Conflicts

None