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
sha256=5c2a93d44af8a38996a2c0f80fbd7970fe4751f104be470cafa069353fc004c0
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 < "0.2.0"
  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.5.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. prelude
  274. prof_spacetime
  275. prometheus-app >= "0.4"
  276. protocol-9p < "0.12.1"
  277. protocol-9p-tool
  278. protocol-9p-unix < "0.12.1"
  279. publish < "0.3.4+transition"
  280. pyast < "0.2.0"
  281. pyml_bindgen < "0.3.0"
  282. pyre-ast < "0.1.9"
  283. qcow < "0.10.2" | >= "0.11.0"
  284. qcow-format
  285. qcow-tool
  286. qmp < "0.20.0"
  287. regenerate
  288. rosetta < "0.3.0"
  289. rotor
  290. rpc >= "1.9.51" & < "5.9.0"
  291. rpclib < "9.0.0"
  292. satyrographos < "0.0.1.7"
  293. shared-block-ring < "3.0.1"
  294. sibylfs
  295. sid
  296. slack
  297. slack-backup
  298. slacko
  299. slipshow
  300. snabela
  301. solo5-elftool < "0.3.1"
  302. spin
  303. spotify-cli
  304. sslconf
  305. tallgeese
  306. tar-format >= "0.2.0" & < "0.7.1"
  307. telltime
  308. tensorflow >= "0.0.4"
  309. tezos-context-hash-irmin
  310. tezos-node >= "8.0" & < "13.0"
  311. tidy_email_mailgun
  312. tidy_email_sendgrid
  313. tidy_email_smtp
  314. timmy
  315. tldr >= "0.3.0"
  316. tlstunnel
  317. topkg-care
  318. torch < "v0.16.0"
  319. touist >= "3.5.0"
  320. travis-senv
  321. tuntap >= "1.0.0" & != "1.4.1" & < "2.0.1"
  322. u2f
  323. uring < "0.3"
  324. usbmux
  325. user-setup >= "0.4"
  326. uuuu < "0.2.0"
  327. valentine
  328. vchan < "6.0.2"
  329. vchan-unix < "6.0.2"
  330. vchan-xen < "6.0.2"
  331. vecosek
  332. vhd-tool
  333. vimebac
  334. vpnkit
  335. wayland < "1.1"
  336. webauthn < "0.2.0"
  337. xapi-idl
  338. xapi-inventory
  339. xapi-rrd-transport
  340. xe-unikernel-upload
  341. xen-block-driver
  342. xen-disk
  343. xen-evtchn
  344. xen-evtchn-unix
  345. xen-gnt >= "1.0.0"
  346. xenctrl
  347. xentropyd
  348. yuscii < "0.3.0"

Conflicts

None

OCaml

Innovation. Community. Security.