package cmdliner

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

Install

Dune Dependency

Authors

Maintainers

Sources

cmdliner-1.0.4.tbz
md5=fe2213d0bc63b1e10a2d0aa66d2fc8d9

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

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"

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

Conflicts

None