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-trace
  136. eio_linux >= "0.3"
  137. elasticsearch-cli
  138. electrod
  139. elpi < "3.7.3"
  140. erlang
  141. expr
  142. extism
  143. facteur
  144. fat-filesystem
  145. fit
  146. forester >= "2.3"
  147. fsevents-lwt
  148. functoria-runtime
  149. git >= "3.2.0"
  150. git-unix >= "3.15.0"
  151. github-unix
  152. gitlab-unix >= "0.1.3"
  153. gobba
  154. gospel < "0.3.1"
  155. happy-eyeballs-lwt
  156. happy-eyeballs-miou-unix
  157. hegel >= "0.26.6"
  158. hlarp
  159. hll
  160. http-lwt-client
  161. hurl
  162. hvsock < "2.0.0" | >= "3.0.1"
  163. hxd >= "0.3.2"
  164. igvxml
  165. index >= "1.6.1"
  166. index-bench >= "1.6.1"
  167. irmin-bench
  168. irmin-cli
  169. irmin-pack != "2.10.2"
  170. irmin-pack-tools
  171. irmin-server
  172. irmin-test
  173. irmin-tezos
  174. irmin-unix
  175. jasmin >= "2023.06.0"
  176. js_of_ocaml-compiler < "6.3.0"
  177. jsonschema2atd
  178. jsonxt
  179. kafka < "0.5"
  180. kafka_lwt
  181. kaun-board
  182. ke >= "0.5"
  183. kinetic-client
  184. kmt
  185. lab
  186. lambdapi != "2.1.0" & < "4.0.0"
  187. learn-ocaml
  188. learn-ocaml-client
  189. ledes
  190. letsencrypt-app
  191. lilac
  192. llopt
  193. locswijch
  194. lwt_ppx_to_let_syntax
  195. MlFront_Cli < "2.3.1"
  196. MlFront_Logs
  197. MlFront_Tools
  198. mastodon-archive-viewer
  199. mcrunch < "0.0.4"
  200. mdx >= "2.2.0"
  201. mel
  202. melange
  203. meldep
  204. merge-fmt
  205. mfetch
  206. miaou-serve
  207. minicaml >= "0.2.2" & < "0.3.3"
  208. mirage >= "4.7.0" & < "4.10.2"
  209. mirage-block-ccm
  210. mirage-logs
  211. mirage-monitoring < "0.0.8"
  212. mirage-runtime >= "4.0.0"
  213. mirage-seal
  214. mkaudio
  215. mlgpx
  216. mnet-cli < "0.0.2"
  217. mnet-dns >= "0.0.5"
  218. mnet-happy-eyeballs >= "0.0.5"
  219. monorobot
  220. mrmime >= "0.5.0"
  221. mustache-cli
  222. named-pipe < "0.4.0"
  223. nbd < "4.0.3"
  224. nbd-tool
  225. niru
  226. nocoiner
  227. nuscr >= "2.0.0"
  228. obandit >= "0.3.4"
  229. obuilder
  230. ocal
  231. ocaml-sbom
  232. ocamlcodoc
  233. ocamlformat >= "0.22.4"
  234. ocamlformat-lib
  235. ocamlformat-mlx
  236. ocamlformat-mlx-lib
  237. ocamlgrep < "0.1.3"
  238. ocamlmig
  239. ocgtk < "0.1~preview2"
  240. ochre-cli
  241. ocluster >= "0.2"
  242. ocp-browser >= "1.2.1"
  243. ocp-indent < "1.10.0"
  244. ocp-indent-nlfork
  245. ocp-index
  246. ocp-reloc
  247. ocsigen-toolkit >= "4.3.0"
  248. odds
  249. odep
  250. odig < "0.1.0"
  251. odoc
  252. odoc-driver
  253. odoc-md >= "3.1.0"
  254. olint
  255. ometrics
  256. omigrate
  257. omod
  258. opam-0install >= "0.4.1" & < "0.6.0"
  259. opam-0install-cudf < "0.4.1"
  260. opam-build
  261. opam-bundle
  262. opam-ci
  263. opam-client < "2.5.0~beta1"
  264. opam-compiler >= "0.2.0"
  265. opam-depext >= "1.2.1"
  266. opam-devel < "2.5.0~beta1"
  267. opam-dune-lint
  268. opam-ed
  269. opam-graph
  270. opam-grep >= "0.2.0"
  271. opam-installer < "2.5.0~beta1"
  272. opam-lib
  273. opam-lock
  274. opam-minver
  275. opam-package-upgrade
  276. opam-publish >= "0.3.5" & < "3.0.0"
  277. opam-repomin
  278. opam-test
  279. opine
  280. opium
  281. orb
  282. ordma >= "0.0.5"
  283. ortac-core
  284. ortac-dune
  285. ortac-qcheck-stm
  286. ortac-wrapper
  287. orun
  288. osbx
  289. osx-fsevents
  290. oui
  291. owee >= "0.8"
  292. owi >= "0.2"
  293. owork
  294. passage < "0.3.2"
  295. passmakercmd
  296. pds >= "4.13"
  297. pg_query >= "0.9.6"
  298. pkcs11-cli
  299. plotkicadsch
  300. polly
  301. pplumbing < "0.0.16"
  302. ppx_deriving_cmdliner
  303. ppx_subliner
  304. ppxlib-tools
  305. prelude < "0.5"
  306. prof_spacetime
  307. prometheus-app
  308. protocol-9p < "0.12.1"
  309. protocol-9p-tool
  310. protocol-9p-unix < "0.12.1"
  311. pyast
  312. pyml_bindgen >= "0.4.1"
  313. pyre-ast
  314. qcow < "0.12.1"
  315. qcow-tool
  316. qmp
  317. queenshead
  318. query-json >= "0.6.1"
  319. quill
  320. rake
  321. randii
  322. reason >= "3.17.0"
  323. rosetta < "0.2.0"
  324. rpclib
  325. runtime_events_tools < "0.5.4"
  326. runtime_events_tools_bare < "0.5.4"
  327. rust-staticlib-gen
  328. salto-analyzer
  329. scfg >= "0.4"
  330. shakuhachi
  331. shared-block-ring
  332. sherlodoc
  333. sid
  334. slack
  335. slacko
  336. slipshow
  337. smtml
  338. solo5-elftool
  339. sosie
  340. spin
  341. sslconf
  342. starred_ml >= "0.0.4"
  343. sun
  344. tallgeese
  345. tcpip >= "8.0.0"
  346. telltime
  347. tensorflow
  348. testo
  349. testo-lwt
  350. tidy_email_mailgun
  351. tidy_email_sendgrid
  352. tidy_email_smtp
  353. timmy
  354. tldr
  355. tls = "0.15.4" | >= "1.0.4"
  356. tls-lwt
  357. toc
  358. topkg-care
  359. torch < "v0.16.0"
  360. touist
  361. transom
  362. tuntap
  363. tw
  364. unic
  365. uring
  366. uring-trace
  367. user-setup
  368. utcp
  369. valentine
  370. vchan < "6.0.2"
  371. vchan-unix
  372. vecosek
  373. vendredi
  374. vif
  375. wasm_of_ocaml-compiler < "6.3.0"
  376. wayland
  377. webauthn
  378. webbrowser >= "0.6.2"
  379. wol-eio
  380. xapi-inventory
  381. xdge
  382. xen-evtchn
  383. xen-evtchn-unix
  384. xen-gnt
  385. yuscii = "0.2.0"
  386. zeit

Conflicts

None

Build status

Results of building cmdliner with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. 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