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-dune-rules
  250. ocsigen-toolkit = "4.3.0"
  251. odds
  252. odep
  253. odig < "0.1.0"
  254. odoc
  255. odoc-driver
  256. odoc-md >= "3.1.0"
  257. olint
  258. ometrics
  259. omigrate
  260. omod
  261. opam-0install >= "0.4.1" & < "0.6.0"
  262. opam-0install-cudf < "0.4.1"
  263. opam-build
  264. opam-bundle
  265. opam-ci
  266. opam-client < "2.5.0~beta1"
  267. opam-compiler >= "0.2.0"
  268. opam-depext >= "1.2.1"
  269. opam-devel < "2.5.0~beta1"
  270. opam-dune-lint
  271. opam-ed
  272. opam-graph
  273. opam-grep >= "0.2.0"
  274. opam-installer < "2.5.0~beta1"
  275. opam-lib
  276. opam-lock
  277. opam-minver
  278. opam-package-upgrade
  279. opam-publish >= "0.3.5" & < "3.0.0"
  280. opam-repomin
  281. opam-test
  282. opine
  283. opium
  284. orb
  285. ordma >= "0.0.5"
  286. ortac-core
  287. ortac-dune
  288. ortac-qcheck-stm
  289. ortac-wrapper
  290. orun
  291. osbx
  292. osx-fsevents
  293. oui
  294. owee >= "0.8"
  295. owi >= "0.2"
  296. owork
  297. passage < "0.3.2"
  298. passmakercmd
  299. pds >= "4.13"
  300. pg_query >= "0.9.6"
  301. pkcs11-cli
  302. plotkicadsch
  303. polly
  304. pplumbing < "0.0.16"
  305. ppx_deriving_cmdliner
  306. ppx_subliner
  307. ppxlib-tools
  308. prelude < "0.5"
  309. prof_spacetime
  310. prometheus-app
  311. protocol-9p < "0.12.1"
  312. protocol-9p-tool
  313. protocol-9p-unix < "0.12.1"
  314. pyast
  315. pyml_bindgen >= "0.4.1"
  316. pyre-ast
  317. qcow < "0.12.1"
  318. qcow-tool
  319. qmp
  320. queenshead
  321. query-json >= "0.6.1"
  322. quill
  323. rake
  324. randii
  325. reason >= "3.17.0"
  326. reason-to-mlx
  327. rosetta < "0.2.0"
  328. rpclib
  329. runtime_events_tools < "0.5.4"
  330. runtime_events_tools_bare < "0.5.4"
  331. rust-staticlib-gen
  332. salto-analyzer
  333. scfg >= "0.4"
  334. shakuhachi
  335. shared-block-ring
  336. sherlodoc
  337. sid
  338. slack
  339. slacko
  340. slipshow
  341. smtml
  342. solo5-elftool
  343. sosie
  344. spin
  345. sslconf
  346. starred_ml >= "0.0.4"
  347. sun
  348. tallgeese
  349. tcpip >= "8.0.0"
  350. telltime
  351. tensorflow
  352. testo
  353. testo-lwt
  354. tidy_email_mailgun
  355. tidy_email_sendgrid
  356. tidy_email_smtp
  357. timmy
  358. tldr
  359. tls = "0.15.4" | >= "1.0.4"
  360. tls-lwt
  361. toc
  362. topkg-care
  363. torch < "v0.16.0"
  364. touist
  365. transom
  366. tuntap
  367. tw
  368. unic
  369. uring
  370. uring-trace
  371. user-setup
  372. utcp
  373. valentine
  374. vchan < "6.0.2"
  375. vchan-unix
  376. vecosek
  377. vendredi
  378. vif
  379. wasm_of_ocaml-compiler < "6.3.0"
  380. wayland
  381. webauthn
  382. webbrowser >= "0.6.2"
  383. wol-eio
  384. xapi-inventory
  385. xdge
  386. xen-evtchn
  387. xen-evtchn-unix
  388. xen-gnt
  389. yuscii = "0.2.0"
  390. 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