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 >= "1.7.0"
  143. index-bench >= "1.6.1"
  144. irmin-bench
  145. irmin-cli
  146. irmin-pack != "2.10.2" & != "3.10.0"
  147. irmin-pack-tools
  148. irmin-server
  149. irmin-test >= "3.11.0"
  150. irmin-tezos
  151. irmin-unix
  152. jasmin >= "2023.06.0"
  153. js_of_ocaml-compiler >= "4.1.0"
  154. jsonschema2atd
  155. k7
  156. kaun-board
  157. ke >= "0.5"
  158. kmt
  159. lab >= "0.1.4"
  160. learn-ocaml
  161. learn-ocaml-client
  162. ledes
  163. letsencrypt-app
  164. locswijch
  165. MlFront_Cli < "2.3.1"
  166. MlFront_Logs
  167. MlFront_Tools
  168. markdown_monolith
  169. mastodon-archive-viewer >= "0.2"
  170. mcrunch
  171. mdx >= "2.5.1"
  172. mel
  173. melange
  174. meldep
  175. menhirformat
  176. merge-fmt >= "0.3"
  177. mfat
  178. mfetch
  179. miaou-serve
  180. migra
  181. mirage >= "4.10.2"
  182. mirage-block-ccm
  183. mirage-logs
  184. mirage-monitoring >= "0.0.8"
  185. mirage-runtime >= "4.9.0"
  186. mirage-seal
  187. mkaudio >= "1.1.4"
  188. mlgpx
  189. mnet-cli
  190. mnet-dns >= "0.0.5"
  191. mnet-happy-eyeballs >= "0.0.5"
  192. mrmime >= "0.6.0"
  193. mtbox
  194. named-pipe < "0.4.0"
  195. nbd < "4.0.3"
  196. niru
  197. nix-syntax
  198. nuscr >= "2.1.0"
  199. object
  200. obuilder >= "0.4"
  201. ocaml-sbom
  202. ocamlformat >= "0.25.1"
  203. ocamlformat-lib >= "0.28.1"
  204. ocamlformat-mlx
  205. ocamlformat-mlx-lib >= "0.28.1.1"
  206. ocamlgrep
  207. ocamlmig >= "5.3-20250429"
  208. ocgtk < "0.1~preview2"
  209. ochre-cli
  210. ocluster >= "0.2"
  211. ocp-browser >= "1.2.1"
  212. ocp-indent >= "1.9.0"
  213. ocp-indent-nlfork
  214. ocp-index >= "1.4.0"
  215. ocsigen-toolkit >= "4.3.0"
  216. odds >= "1.1"
  217. odep
  218. odig >= "0.1.0"
  219. odoc >= "3.1.0"
  220. odoc-driver
  221. odoc-md >= "3.1.0"
  222. olint
  223. omigrate >= "0.3.0"
  224. omod
  225. opam-0install >= "0.6.0"
  226. opam-0install-cudf < "0.4.1"
  227. opam-audit
  228. opam-build
  229. opam-bundle
  230. opam-dune-lint
  231. opam-ed >= "0.5"
  232. opam-graph
  233. opam-grep >= "0.4.0"
  234. opam-minver
  235. opam-package-upgrade
  236. opam-publish >= "3.0.0"
  237. opam-repomin
  238. opam-test
  239. opine
  240. oq
  241. orb
  242. ordma >= "0.0.5"
  243. ortac-core
  244. ortac-dune
  245. ortac-qcheck-stm
  246. ortac-wrapper
  247. osx-fsevents
  248. oui
  249. owee >= "0.8"
  250. owi >= "0.2"
  251. oxbow
  252. passage < "0.1.8" | >= "0.3.2"
  253. pds >= "5.42"
  254. pg_query >= "0.9.8"
  255. pkcs11-cli
  256. plotkicadsch < "0.9.0"
  257. polly >= "0.4.1"
  258. pplumbing < "0.0.16"
  259. ppx_deriving_cmdliner < "0.6.0"
  260. ppx_subliner
  261. ppxlib-tools
  262. prelude < "0.5"
  263. prof_spacetime
  264. prometheus-app
  265. protocol-9p < "0.12.1"
  266. protocol-9p-tool < "0.12.0" | >= "2.1.0"
  267. protocol-9p-unix < "0.12.1"
  268. pyast >= "0.2.0"
  269. pyml_bindgen >= "0.4.1"
  270. pyre-ast >= "0.1.9"
  271. qcow < "0.12.1"
  272. qmp >= "0.20.0"
  273. queenshead
  274. query-json
  275. quickterface
  276. quill
  277. rake
  278. randii
  279. reason >= "3.17.0"
  280. rosetta < "0.2.0"
  281. rpclib
  282. runtime_events_tools >= "0.5.4"
  283. runtime_events_tools_bare >= "0.5.4"
  284. rust-staticlib-gen
  285. salto-analyzer
  286. scfg >= "0.4"
  287. shakuhachi
  288. shared-block-ring
  289. sherlodoc != "3.1.0"
  290. slack
  291. slipshow
  292. smtml >= "0.7.0"
  293. solo5-elftool
  294. sosie
  295. soteria
  296. spin = "0.6.0"
  297. starred_ml >= "0.0.4"
  298. stele
  299. stem
  300. sun
  301. tallgeese
  302. tcpip >= "8.0.0"
  303. tensorflow
  304. testo
  305. testo-lwt
  306. tidy_email_mailgun
  307. tidy_email_sendgrid
  308. tidy_email_smtp
  309. timmy
  310. tls = "0.15.4" | >= "1.0.4"
  311. tls-lwt
  312. toc
  313. topkg-care
  314. torch < "v0.16.0"
  315. transom
  316. tuntap
  317. tw
  318. unic
  319. uring
  320. uring-trace
  321. utcp
  322. vchan < "6.0.2"
  323. vchan-unix
  324. vendredi
  325. vif
  326. wasm_of_ocaml-compiler
  327. wax
  328. wax-lib >= "0.2.0"
  329. wayland >= "1.1"
  330. webauthn
  331. webbrowser >= "0.6.2"
  332. wol-eio
  333. xapi-inventory
  334. xdge
  335. xen-evtchn
  336. xen-evtchn-unix
  337. xen-gnt
  338. 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 8d8d144. 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