https://github.com/dbuenzli/cmdliner
Declarative definition of command line interfaces for OCaml
https://github.com/dbuenzli/cmdliner
Last synced: 12 days ago
JSON representation
Declarative definition of command line interfaces for OCaml
- Host: GitHub
- URL: https://github.com/dbuenzli/cmdliner
- Owner: dbuenzli
- License: isc
- Created: 2013-02-08T12:45:54.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2025-03-29T00:47:24.000Z (22 days ago)
- Last Synced: 2025-04-01T13:11:29.674Z (19 days ago)
- Language: OCaml
- Homepage: http://erratique.ch/software/cmdliner
- Size: 826 KB
- Stars: 304
- Watchers: 12
- Forks: 57
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-cli-frameworks - cmdliner
- awesome-list - cmdliner
- awesome-ocaml - Cmdliner
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:
[POSIX]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
[GNU]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html## Installation
Cmdliner can be installed with `opam`:
opam install cmdliner
If you don't use `opam` consult the [`opam`](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.[online]: http://erratique.ch/software/cmdliner/doc/
[OCaml forum]: https://discuss.ocaml.org/## Sample programs
A few examples and blueprints can be found in the
[documentation][online] and in the [test](test/) directory.