I am happy to announce the first release of Clap.
Clap is a library for command-line argument parsing. Clap works by directly consuming arguments in an imperative way. Traditionally, argument parsing in OCaml is done by first defining a specification (an OCaml value defining the types of arguments), and then parsing from this specification. The “impure” approach of Clap skips the need to define a specification and results in code which is quite simple in practice, with limited boilerplate.
Clap is available as an opam package (
opam install clap).
Source code, API documentation and a full commented example are available at: https://github.com/rbardou/clap/