package cmdliner

  1. Overview
  2. Docs
Declarative definition of command line interfaces for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cmdliner-2.1.1.tbz
sha512=cdc338ae2e56a72b7c75dae9564c57cca4e1fbfac454aabbf8303fcb612346284aede5984dfde7e8a7a496cc870bbd57ddf28cab3a38667279b31657f85c15dd

doc/index.html

Cmdliner v2.1.1

Cmdliner provides a simple and compositional mechanism to convert command line arguments to OCaml values and pass them to your functions.

The library automatically handles command line completion, syntax errors, help messages and UNIX man page generation. It supports programs with single or multiple commands (like git) and respects most of the POSIX and GNU conventions.

Manuals

The following manuals are available.

  • The tutorial makes you write your first command line interface with Cmdliner.
  • The cookbook has a few off-the-shelf recipes, tips about source code structure, and blueprints to define your command lines with Cmdliner.
  • The command line interface manual describes how command lines and environment variables are parsed by Cmdliner and how command line completion is performed. This can be communicated to the users of your tools.
  • The tool man page manual describes how Cmdliner generates man pages for your tools and their commands and how you can format them.
  • The examples page has examples of some classic UNIX tools with their command line interface implemented by Cmdliner.

Library cmdliner

  • Cmdliner Declarative definition of command line interfaces.