package cmdliner

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

Install

Dune Dependency

Authors

Maintainers

Sources

cmdliner-1.0.3.tbz
md5=3674ad01d4445424105d33818c78fba8

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.3

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 (1)

  1. ocaml >= "4.03.0" & < "5.0"

Dev Dependencies

None

  1. acgtk >= "1.5.1" & < "2.0.0"
  2. albatross < "1.4.3"
  3. alcotest < "1.6.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
  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. lambdapi >= "2.0.0" & < "2.2.0"
  167. learn-ocaml < "0.14.1"
  168. learn-ocaml-client < "0.14.1"
  169. letsencrypt < "0.3.0"
  170. letsencrypt-app < "0.5.0"
  171. llopt
  172. mastodon-archive-viewer < "0.4.0"
  173. mbr-format < "1.0.0"
  174. mdx < "2.2.0"
  175. merge-fmt < "0.3"
  176. message-switch
  177. minicaml >= "0.2.2"
  178. mirage >= "4.0.0" & < "4.4.0"
  179. mirage-block-xen < "2.0.0"
  180. mirage-console >= "2.1.2" & < "2.2.0"
  181. mirage-console-xen-cli
  182. mirage-dns >= "2.6.0" & < "3.0.0"
  183. mirage-seal
  184. mirror
  185. mkaudio < "1.1.3"
  186. monorobot
  187. mrmime = "0.5.0"
  188. named-pipe
  189. nbd >= "0.9.2" & < "4.0.3"
  190. nebula
  191. nocoiner
  192. obandit >= "0.3.4"
  193. obuilder < "0.4"
  194. ocal
  195. ocaml-gist
  196. ocamlcodoc
  197. ocamlformat < "0.21.0"
  198. ocamlformat-rpc < "0.21.0"
  199. oci
  200. ocp-browser >= "1.1.6" & < "1.3.4"
  201. ocp-build >= "1.99.20-beta"
  202. ocp-indent >= "1.6.0"
  203. ocp-indent-nlfork
  204. ocp-index < "1.3.4"
  205. ocp-reloc
  206. odds < "1.1"
  207. odig < "0.0.8"
  208. odoc
  209. ometrics >= "0.1.2"
  210. omigrate < "0.3.0"
  211. omod < "0.0.3"
  212. opam-0install < "0.4.3"
  213. opam-0install-cudf < "0.4.1"
  214. opam-build < "0.2.1"
  215. opam-build-revdeps
  216. opam-bundle
  217. opam-ci
  218. opam-client >= "2.0.0~beta" & < "2.2.0~alpha"
  219. opam-compiler < "0.2.0"
  220. opam-depext >= "1.2.1"
  221. opam-devel >= "2.0.0~beta" & < "2.2.0~alpha"
  222. opam-ed
  223. opam-installer
  224. opam-lib >= "1.3.1"
  225. opam-lock
  226. opam-package-upgrade
  227. opam-publish != "0.3.0+transition" & < "2.2.0"
  228. opam-query
  229. opam-test < "0.2.1"
  230. opam2web >= "1.3.0" & < "2.0"
  231. opass >= "2.15"
  232. operf-macro
  233. opium >= "0.12.0"
  234. ordma >= "0.0.5"
  235. orun
  236. osbx
  237. oskel
  238. osx-fsevents
  239. owi >= "0.2"
  240. owork
  241. passmakercmd
  242. pds >= "4.13"
  243. pecu < "0.4"
  244. pg_query >= "0.9.6"
  245. pkcs11-cli
  246. plotkicadsch >= "0.2.0"
  247. polly < "0.4.1"
  248. ppx_deriving_cmdliner
  249. ppx_deriving_rpc = "8.1.0"
  250. prof_spacetime
  251. prometheus-app >= "0.4"
  252. protocol-9p < "0.12.1"
  253. protocol-9p-tool
  254. protocol-9p-unix < "0.12.1"
  255. publish < "0.3.4+transition"
  256. pyml_bindgen < "0.3.0"
  257. pyre-ast < "0.1.9"
  258. qcow < "0.10.2" | >= "0.11.0"
  259. qcow-format
  260. qcow-tool
  261. qmp < "0.20.0"
  262. regenerate
  263. rosetta < "0.3.0"
  264. rotor
  265. rpc >= "1.9.51" & < "5.9.0"
  266. rpclib < "9.0.0"
  267. satyrographos < "0.0.1.7"
  268. shared-block-ring < "3.0.1"
  269. sibylfs
  270. sid
  271. slack
  272. slack-backup
  273. slacko
  274. snabela
  275. solo5-elftool < "0.3.1"
  276. spin
  277. spotify-cli
  278. sslconf
  279. tallgeese
  280. tar-format >= "0.2.0" & < "0.7.1"
  281. telltime
  282. tensorflow >= "0.0.4"
  283. tezos-context-hash-irmin
  284. tezos-node >= "8.0" & < "13.0"
  285. timmy
  286. tldr >= "0.3.0"
  287. tlstunnel
  288. topkg-care
  289. torch < "v0.16.0"
  290. touist >= "3.5.0"
  291. travis-senv
  292. tuntap >= "1.0.0" & != "1.4.1" & < "2.0.1"
  293. u2f
  294. uring < "0.3"
  295. usbmux
  296. user-setup >= "0.4"
  297. uuuu < "0.2.0"
  298. valentine
  299. vchan < "6.0.2"
  300. vchan-unix < "6.0.2"
  301. vchan-xen < "6.0.2"
  302. vecosek
  303. vhd-tool
  304. vimebac
  305. vpnkit
  306. webauthn
  307. xapi-idl
  308. xapi-inventory
  309. xapi-rrd-transport
  310. xe-unikernel-upload
  311. xen-block-driver
  312. xen-disk
  313. xen-evtchn
  314. xen-evtchn-unix
  315. xen-gnt >= "1.0.0"
  316. xenctrl
  317. xentropyd
  318. yuscii < "0.3.0"

Conflicts

None