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

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.

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