package cmdliner

All checked builds pass
  1. Overview
  2. Docs
Declarative definition of command line interfaces for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cmdliner-2.1.1.tbz
sha512=cdc338ae2e56a72b7c75dae9564c57cca4e1fbfac454aabbf8303fcb612346284aede5984dfde7e8a7a496cc870bbd57ddf28cab3a38667279b31657f85c15dd

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 command line completion, 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.

Homepage: http://erratique.ch/software/cmdliner

Tags

cli system declarative org:erratique

Added to opam-repository:

README

Cmdliner — Declarative definition of command line interfaces for OCaml

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 command line completion, 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.

Homepage: 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 can be consulted online or via odig doc cmdliner.

Questions are welcome but better asked on the OCaml forum than on the issue tracker.

Sample programs

A few examples and blueprints can be found in the documentation and in the test directory.

Dependencies (1)

  1. ocaml >= "4.08.0"

Dev Dependencies

None

Optional Dependencies

None

  1. abella >= "2.0.8"
  2. acgtk >= "2.1.0"
  3. albatross >= "1.4.3"
  4. alcobar
  5. alcotest >= "1.9.1"
  6. alcotest-async
  7. alcotest-js
  8. alcotest-lwt
  9. alcotest-mirage
  10. alt-ergo >= "2.6.3"
  11. altgr-ergo >= "2.4.2"
  12. api-watch
  13. arc >= "0.0.2"
  14. areas-and-adversaries
  15. asak
  16. atd >= "2.13.0"
  17. atdcpp
  18. atdd
  19. atdml
  20. atdpy
  21. atdts
  22. awa >= "0.2.0"
  23. aws-s3
  24. b0
  25. bancos
  26. bap-beagle < "2.3.0"
  27. bap-byteweight-frontend
  28. bap-callsites
  29. bap-demangle < "2.5.0"
  30. bap-fsi-benchmark
  31. bap-phoenix
  32. bap-piqi
  33. bap-std
  34. bap-taint-propagator
  35. bap-trace
  36. bap-warn-unused
  37. bcfg
  38. bibfmt
  39. bisect_ppx_ng
  40. boltzgen >= "0.9.5"
  41. boulangerie
  42. builder
  43. builder-web >= "0.2.0"
  44. ca-certs-nss >= "3.77"
  45. cabal_workflow_runner
  46. caisar >= "0.2" & < "6.0"
  47. camels >= "1.0.0"
  48. camyll >= "0.4.1"
  49. capnp-rpc-unix >= "2.1.1"
  50. caqti >= "1.8.0"
  51. caqti-async >= "1.8.0"
  52. caqti-driver-mariadb >= "1.8.0"
  53. caqti-driver-postgresql >= "1.8.0"
  54. caqti-driver-sqlite3 >= "1.8.0"
  55. caqti-dynload = "2.0.1"
  56. caqti-eio
  57. caqti-lwt >= "1.8.0"
  58. caqti-miou
  59. carton = "0.7.2"
  60. carton-miou
  61. carton-miou-unix
  62. cascade
  63. catala >= "0.7.0"
  64. catala-format >= "0.2.0"
  65. chamelon-unix
  66. charrua-unix >= "1.6.0"
  67. checkseum = "0.0.2" | >= "0.0.9" & < "0.2.0"
  68. ciao_lwt
  69. clim-ppx
  70. cmdlang-cmdliner-err-runner
  71. cmdlang-to-cmdliner
  72. cmdliner-stdlib
  73. cmdtui-lambda-term
  74. cohttp-curl-lwt >= "6.2.1"
  75. cohttp-lwt-unix >= "6.0.0~beta2" & < "6.2.2"
  76. cohttp-lwt-unix-bin
  77. colibri2 >= "0.6"
  78. colibrics >= "0.6"
  79. commons >= "1.8.0"
  80. compsort
  81. conex >= "1.0.0"
  82. conex-mirage-crypto
  83. confero
  84. console
  85. console-eio
  86. coq-lsp
  87. coq-serapi < "8.13.0+0.13.0" | >= "8.15.0+0.15.2"
  88. crockford
  89. crowbar >= "0.2.1"
  90. crunch >= "4.0.0"
  91. cucumber
  92. current
  93. current-albatross-deployer
  94. current_examples
  95. current_github
  96. current_gitlab
  97. current_web
  98. decompress >= "1.4.3"
  99. dedukti >= "2.7"
  100. deepseek
  101. diffast-git-cli >= "0.3.5.1"
  102. dkim
  103. dkim-bin
  104. dkml-install-installer
  105. dns-cli >= "10.1.0"
  106. docfd >= "13.0.0"
  107. dockerfile-cmd
  108. dockerfile-opam < "8.2.7"
  109. docteur >= "0.0.4"
  110. doctor
  111. doi2bib >= "0.7.6"
  112. dolmen_bin >= "0.11"
  113. dream-cli >= "0.2.0"
  114. dscheck >= "0.2.0"
  115. dune-deps >= "1.4.0"
  116. dune-release >= "2.2.0"
  117. dune_deps_extra
  118. earlybird != "1.1.0"
  119. eio-trace
  120. eio_linux >= "0.3"
  121. elpi >= "3.7.3"
  122. extism
  123. ez_cmdliner >= "0.5.0"
  124. facteur
  125. fat-filesystem < "0.13.0" | >= "0.15.1"
  126. fit >= "1.0.3"
  127. forester >= "5.0"
  128. functoria-runtime >= "4.0.0"
  129. git >= "3.2.0"
  130. git-unix >= "3.15.0"
  131. github-unix >= "4.5.0"
  132. gitlab-unix >= "0.1.3"
  133. gospel >= "0.3.1"
  134. happy-eyeballs-lwt >= "0.6.0"
  135. happy-eyeballs-miou-unix
  136. hegel >= "0.26.6"
  137. hlarp < "0.0.3"
  138. http-lwt-client >= "0.3.2"
  139. hurl >= "0.0.1~beta2"
  140. hvsock >= "3.0.1"
  141. hxd >= "0.3.5"
  142. index-bench >= "1.6.1"
  143. irmin-bench
  144. irmin-cli
  145. irmin-pack != "2.10.2"
  146. irmin-pack-tools
  147. irmin-server
  148. irmin-test >= "3.11.0"
  149. irmin-tezos
  150. irmin-unix
  151. jasmin >= "2023.06.0"
  152. js_of_ocaml-compiler >= "4.1.0"
  153. jsonschema2atd
  154. k7
  155. kaun-board
  156. ke >= "0.5"
  157. kmt
  158. lab >= "0.1.4"
  159. learn-ocaml
  160. learn-ocaml-client
  161. ledes
  162. letsencrypt-app
  163. locswijch
  164. MlFront_Cli < "2.3.1"
  165. MlFront_Logs
  166. MlFront_Tools
  167. markdown_monolith
  168. mastodon-archive-viewer >= "0.2"
  169. mcrunch
  170. mdx >= "2.5.1"
  171. mel
  172. melange
  173. meldep
  174. menhirformat
  175. merge-fmt >= "0.3"
  176. mfat
  177. mfetch
  178. miaou-serve
  179. migra
  180. mirage >= "4.10.2"
  181. mirage-block-ccm
  182. mirage-logs
  183. mirage-monitoring >= "0.0.8"
  184. mirage-runtime >= "4.9.0"
  185. mirage-seal
  186. mkaudio >= "1.1.4"
  187. mlgpx
  188. mnet-cli
  189. mnet-dns >= "0.0.5"
  190. mnet-happy-eyeballs >= "0.0.5"
  191. mrmime >= "0.6.0"
  192. mtbox
  193. named-pipe < "0.4.0"
  194. nbd < "4.0.3"
  195. niru
  196. nuscr >= "2.1.0"
  197. object
  198. obuilder >= "0.4"
  199. ocaml-sbom
  200. ocamlformat >= "0.25.1"
  201. ocamlformat-lib >= "0.28.1"
  202. ocamlformat-mlx
  203. ocamlformat-mlx-lib >= "0.28.1.1"
  204. ocamlgrep
  205. ocamlmig >= "5.3-20250429"
  206. ocgtk < "0.1~preview2"
  207. ochre-cli
  208. ocluster >= "0.2"
  209. ocp-browser >= "1.2.1"
  210. ocp-indent >= "1.9.0"
  211. ocp-indent-nlfork
  212. ocp-index >= "1.4.0"
  213. ocsigen-toolkit >= "4.3.0"
  214. odds >= "1.1"
  215. odep
  216. odig >= "0.1.0"
  217. odoc >= "3.1.0"
  218. odoc-driver
  219. odoc-md >= "3.1.0"
  220. olint
  221. omigrate >= "0.3.0"
  222. omod
  223. opam-0install >= "0.6.0"
  224. opam-0install-cudf < "0.4.1"
  225. opam-audit
  226. opam-build
  227. opam-bundle
  228. opam-dune-lint
  229. opam-ed >= "0.5"
  230. opam-graph
  231. opam-grep >= "0.4.0"
  232. opam-minver
  233. opam-package-upgrade
  234. opam-publish >= "3.0.0"
  235. opam-repomin
  236. opam-test
  237. opine
  238. oq
  239. orb
  240. ordma >= "0.0.5"
  241. ortac-core
  242. ortac-dune
  243. ortac-qcheck-stm
  244. ortac-wrapper
  245. osx-fsevents
  246. oui
  247. owee >= "0.8"
  248. owi >= "0.2"
  249. oxbow
  250. passage < "0.1.8" | >= "0.3.2"
  251. pds >= "5.42"
  252. pg_query >= "0.9.8"
  253. pkcs11-cli
  254. plotkicadsch < "0.9.0"
  255. polly >= "0.4.1"
  256. pplumbing < "0.0.16"
  257. ppx_deriving_cmdliner < "0.6.0"
  258. ppx_subliner
  259. ppxlib-tools
  260. prelude < "0.5"
  261. prof_spacetime
  262. prometheus-app
  263. protocol-9p < "0.12.1"
  264. protocol-9p-tool < "0.12.0" | >= "2.1.0"
  265. protocol-9p-unix < "0.12.1"
  266. pyast >= "0.2.0"
  267. pyml_bindgen >= "0.4.1"
  268. pyre-ast >= "0.1.9"
  269. qcow < "0.12.1"
  270. qmp >= "0.20.0"
  271. queenshead
  272. query-json
  273. quickterface
  274. quill
  275. rake
  276. randii
  277. reason >= "3.17.0"
  278. rosetta < "0.2.0"
  279. rpclib
  280. runtime_events_tools >= "0.5.4"
  281. runtime_events_tools_bare >= "0.5.4"
  282. rust-staticlib-gen
  283. salto-analyzer
  284. scfg >= "0.4"
  285. shakuhachi
  286. shared-block-ring
  287. sherlodoc != "3.1.0"
  288. slack
  289. slipshow
  290. smtml >= "0.7.0"
  291. solo5-elftool
  292. sosie
  293. soteria
  294. spin = "0.6.0"
  295. starred_ml >= "0.0.4"
  296. stele
  297. stem
  298. sun
  299. tallgeese
  300. tcpip >= "8.0.0"
  301. tensorflow
  302. testo
  303. testo-lwt
  304. tidy_email_mailgun
  305. tidy_email_sendgrid
  306. tidy_email_smtp
  307. timmy
  308. tls = "0.15.4" | >= "1.0.4"
  309. tls-lwt
  310. toc
  311. topkg-care
  312. torch < "v0.16.0"
  313. transom
  314. tuntap
  315. tw
  316. unic
  317. uring
  318. uring-trace
  319. utcp
  320. vchan < "6.0.2"
  321. vchan-unix
  322. vendredi
  323. vif
  324. wasm_of_ocaml-compiler
  325. wax
  326. wax-lib >= "0.2.0"
  327. wayland >= "1.1"
  328. webauthn
  329. webbrowser >= "0.6.2"
  330. wol-eio
  331. xapi-inventory
  332. xdge
  333. xen-evtchn
  334. xen-evtchn-unix
  335. xen-gnt
  336. yuscii = "0.2.0"

Conflicts

None

Build status

Results of building cmdliner with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
2.1.1 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure