Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dbuenzli/cmdliner
Declarative definition of command line interfaces for OCaml
https://github.com/dbuenzli/cmdliner
Last synced: 11 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 (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-06-09T06:26:51.000Z (5 months ago)
- Last Synced: 2024-08-02T07:17:33.565Z (3 months ago)
- Language: OCaml
- Homepage: http://erratique.ch/software/cmdliner
- Size: 599 KB
- Stars: 286
- Watchers: 13
- Forks: 56
- Open Issues: 11
-
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
-------------------------------------------------------------------------------
%%VERSION%%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][1] and [GNU][2] conventions.Cmdliner has no dependencies and is distributed under the ISC license.
[1]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
[2]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.htmlHome 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`](opam) file for build
instructions.## Documentation
The documentation and API reference is automatically generated by from
the source interfaces. It can be consulted [online][doc] or via
`odig doc cmdliner`.[doc]: http://erratique.ch/software/cmdliner/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