package cmdliner

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cmdliner-1.3.0.tbz
sha512=4c46bc334444ff772637deae2f5ba03645d7a1b7db523470a1246acfce79b971c764d964cbb02388639b3161b279700d9ade95da550446fb32aa4849c8a8f283

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.

Home page: 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

v1.3.0

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

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.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.5.0"
  6. alcotest-async
  7. alcotest-js
  8. alcotest-lwt
  9. alcotest-mirage
  10. alt-ergo >= "2.4.2" & < "2.6.3"
  11. alt-ergo-free >= "2.4.3"
  12. altgr-ergo >= "2.4.2"
  13. api-watch
  14. arc >= "0.0.2"
  15. areas-and-adversaries
  16. asak
  17. atd >= "2.13.0"
  18. atdcpp
  19. atdd
  20. atdml
  21. atdpy
  22. atdts
  23. awa
  24. aws-s3
  25. b0 < "0.0.6"
  26. bancos
  27. bap-beagle < "2.3.0"
  28. bap-byteweight-frontend
  29. bap-callsites
  30. bap-demangle < "2.5.0"
  31. bap-fsi-benchmark
  32. bap-main
  33. bap-phoenix
  34. bap-piqi
  35. bap-powerpc
  36. bap-std
  37. bap-taint-propagator
  38. bap-trace
  39. bap-warn-unused
  40. bap-x86
  41. bentov
  42. bibfmt
  43. bisect_ppx >= "2.0.0"
  44. bisect_ppx_ng
  45. boltzgen
  46. boulangerie
  47. builder
  48. builder-web >= "0.2.0"
  49. bytepdf
  50. ca-certs-nss
  51. cabal_workflow_runner
  52. caisar
  53. camels < "1.0.0"
  54. camyll
  55. capnp-rpc-unix
  56. caqti >= "1.8.0"
  57. caqti-async >= "1.8.0"
  58. caqti-driver-mariadb >= "1.8.0"
  59. caqti-driver-postgresql >= "1.8.0"
  60. caqti-driver-sqlite3 >= "1.8.0"
  61. caqti-dynload = "2.0.1"
  62. caqti-eio
  63. caqti-lwt >= "1.8.0"
  64. caqti-miou
  65. carton >= "0.4.3" & < "1.0.0"
  66. carton-miou
  67. carton-miou-unix
  68. cascade < "1.2.0"
  69. catala >= "0.7.0" & < "1.2.0"
  70. catala-format >= "0.2.0" & < "1.2.0"
  71. cca >= "0.6.2"
  72. certify >= "0.3.0"
  73. chamelon-unix
  74. charrua-unix
  75. checkseum >= "0.0.2" & < "0.2.0"
  76. ciao_lwt
  77. clim-ppx
  78. cmdlang-cmdliner-err-runner
  79. cmdlang-to-cmdliner
  80. cmdliner-stdlib
  81. cmdtui-lambda-term
  82. cohttp-lwt-unix != "2.5.8" & < "6.2.1"
  83. colibri2 < "0.6"
  84. colibrics < "0.6"
  85. commons >= "1.8.0"
  86. compsort
  87. conex
  88. conex-mirage-crypto
  89. confero
  90. console
  91. console-eio
  92. coq-lsp
  93. coq-serapi
  94. cosovo
  95. cppffigen
  96. craml
  97. crockford
  98. crowbar >= "0.2.1"
  99. crunch
  100. cucumber
  101. current
  102. current-albatross-deployer
  103. current_examples
  104. current_github
  105. current_gitlab
  106. current_web
  107. decompress < "1.0.0" | >= "1.3.0"
  108. dedukti >= "2.7"
  109. deepseek
  110. depgraph
  111. diffast-git-cli < "0.3.5.1"
  112. dirsift
  113. diskuvbox
  114. dkim
  115. dkim-bin
  116. dkml-install
  117. dkml-install-installer
  118. dkml-install-runner
  119. dns-cli
  120. docfd < "13.0.0"
  121. dockerfile-cmd
  122. dockerfile-opam < "8.2.7"
  123. docteur >= "0.0.4"
  124. doctor
  125. doi2bib
  126. dolmen_bin
  127. dream-cli
  128. dryunit
  129. dscheck >= "0.2.0"
  130. dune-deps >= "1.1.0"
  131. dune-expand
  132. dune-release >= "1.6.1" & < "2.2.0"
  133. dune_deps_extra
  134. earlybird
  135. eio-fs
  136. eio-trace
  137. eio_linux >= "0.3"
  138. elasticsearch-cli
  139. electrod
  140. elpi < "3.7.3"
  141. erlang
  142. expr
  143. extism
  144. facteur
  145. fat-filesystem
  146. fit
  147. forester >= "2.3"
  148. fsevents-lwt
  149. functoria-runtime
  150. git >= "3.2.0"
  151. git-unix >= "3.15.0"
  152. github-unix
  153. gitlab-unix >= "0.1.3"
  154. gobba
  155. gospel < "0.3.1"
  156. happy-eyeballs-lwt
  157. happy-eyeballs-miou-unix
  158. hegel >= "0.26.6"
  159. hlarp
  160. hll
  161. http-lwt-client
  162. hurl
  163. hvsock < "2.0.0" | >= "3.0.1"
  164. hxd >= "0.3.2"
  165. igvxml
  166. index >= "1.6.1"
  167. index-bench >= "1.6.1"
  168. irmin-bench
  169. irmin-cli
  170. irmin-pack != "2.10.2"
  171. irmin-pack-tools
  172. irmin-server
  173. irmin-test
  174. irmin-tezos
  175. irmin-unix
  176. jasmin >= "2023.06.0"
  177. js_of_ocaml-compiler < "6.3.0"
  178. jsonschema2atd
  179. jsonxt
  180. kafka < "0.5"
  181. kafka_lwt
  182. kaun-board
  183. ke >= "0.5"
  184. kinetic-client
  185. kmt
  186. lab
  187. lambdapi != "2.1.0" & < "4.0.0"
  188. learn-ocaml
  189. learn-ocaml-client
  190. ledes
  191. letsencrypt-app
  192. lilac
  193. llopt
  194. locswijch
  195. lwt_ppx_to_let_syntax
  196. MlFront_Cli < "2.3.1"
  197. MlFront_Logs
  198. MlFront_Tools
  199. mastodon-archive-viewer
  200. mcrunch < "0.0.4"
  201. mdx >= "2.2.0"
  202. mel
  203. melange
  204. meldep
  205. merge-fmt
  206. mfetch
  207. miaou-serve
  208. minicaml >= "0.2.2" & < "0.3.3"
  209. mirage >= "4.7.0" & < "4.10.2"
  210. mirage-block-ccm
  211. mirage-logs
  212. mirage-monitoring < "0.0.8"
  213. mirage-runtime >= "4.0.0"
  214. mirage-seal
  215. mkaudio
  216. mlgpx
  217. mnet-cli < "0.0.2"
  218. mnet-dns >= "0.0.5"
  219. mnet-happy-eyeballs >= "0.0.5"
  220. monorobot
  221. mrmime >= "0.5.0"
  222. mustache-cli
  223. named-pipe < "0.4.0"
  224. nbd < "4.0.3"
  225. nbd-tool
  226. niru
  227. nix-syntax
  228. nocoiner
  229. nuscr >= "2.0.0"
  230. obandit >= "0.3.4"
  231. obuilder
  232. ocal
  233. ocaml-sbom
  234. ocamlcodoc
  235. ocamlformat >= "0.22.4"
  236. ocamlformat-lib
  237. ocamlformat-mlx
  238. ocamlformat-mlx-lib
  239. ocamlgrep < "0.1.3"
  240. ocamlmig
  241. ocgtk < "0.1~preview2"
  242. ochre-cli
  243. ocluster >= "0.2"
  244. ocp-browser >= "1.2.1"
  245. ocp-indent < "1.10.0"
  246. ocp-indent-nlfork
  247. ocp-index
  248. ocp-reloc
  249. ocsigen-toolkit >= "4.3.0"
  250. odds
  251. odep
  252. odig < "0.1.0"
  253. odoc
  254. odoc-driver
  255. odoc-md >= "3.1.0"
  256. olint
  257. ometrics
  258. omigrate
  259. omod
  260. opam-0install >= "0.4.1" & < "0.6.0"
  261. opam-0install-cudf < "0.4.1"
  262. opam-build
  263. opam-bundle
  264. opam-ci
  265. opam-client < "2.5.0~beta1"
  266. opam-compiler >= "0.2.0"
  267. opam-depext >= "1.2.1"
  268. opam-devel < "2.5.0~beta1"
  269. opam-dune-lint
  270. opam-ed
  271. opam-graph
  272. opam-grep >= "0.2.0"
  273. opam-installer < "2.5.0~beta1"
  274. opam-lib
  275. opam-lock
  276. opam-minver
  277. opam-package-upgrade
  278. opam-publish >= "0.3.5" & < "3.0.0"
  279. opam-repomin
  280. opam-test
  281. opine
  282. opium
  283. orb
  284. ordma >= "0.0.5"
  285. ortac-core
  286. ortac-dune
  287. ortac-qcheck-stm
  288. ortac-wrapper
  289. orun
  290. osbx
  291. osx-fsevents
  292. oui
  293. owee >= "0.8"
  294. owi >= "0.2"
  295. owork
  296. passage < "0.3.2"
  297. passmakercmd
  298. pds >= "4.13"
  299. pg_query >= "0.9.6"
  300. pkcs11-cli
  301. plotkicadsch
  302. polly
  303. pplumbing < "0.0.16"
  304. ppx_deriving_cmdliner
  305. ppx_subliner
  306. ppxlib-tools
  307. prelude < "0.5"
  308. prof_spacetime
  309. prometheus-app
  310. protocol-9p < "0.12.1"
  311. protocol-9p-tool
  312. protocol-9p-unix < "0.12.1"
  313. pyast
  314. pyml_bindgen >= "0.4.1"
  315. pyre-ast
  316. qcow < "0.12.1"
  317. qcow-tool
  318. qmp
  319. queenshead
  320. query-json >= "0.6.1"
  321. quill
  322. rake
  323. randii
  324. reason >= "3.17.0"
  325. rosetta < "0.2.0"
  326. rpclib
  327. runtime_events_tools < "0.5.4"
  328. runtime_events_tools_bare < "0.5.4"
  329. rust-staticlib-gen
  330. salto-analyzer
  331. scfg >= "0.4"
  332. shakuhachi
  333. shared-block-ring
  334. sherlodoc
  335. sid
  336. slack
  337. slacko
  338. slipshow
  339. smtml
  340. solo5-elftool
  341. sosie
  342. spin
  343. sslconf
  344. starred_ml >= "0.0.4"
  345. sun
  346. tallgeese
  347. tcpip >= "8.0.0"
  348. telltime
  349. tensorflow
  350. testo
  351. testo-lwt
  352. tidy_email_mailgun
  353. tidy_email_sendgrid
  354. tidy_email_smtp
  355. timmy
  356. tldr
  357. tls = "0.15.4" | >= "1.0.4"
  358. tls-lwt
  359. toc
  360. topkg-care
  361. torch < "v0.16.0"
  362. touist
  363. transom
  364. tuntap
  365. tw
  366. unic
  367. uring
  368. uring-trace
  369. user-setup
  370. utcp
  371. valentine
  372. vchan < "6.0.2"
  373. vchan-unix
  374. vecosek
  375. vendredi
  376. vif
  377. wasm_of_ocaml-compiler < "6.3.0"
  378. wayland
  379. webauthn
  380. webbrowser >= "0.6.2"
  381. wol-eio
  382. xapi-inventory
  383. xdge
  384. xen-evtchn
  385. xen-evtchn-unix
  386. xen-gnt
  387. yuscii = "0.2.0"
  388. zeit

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.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
2.1.1 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