minicli is a minimalist OCaml library for command line parsing.
To get it:
opam update && opam install minicli
A usage example:
Competing libraries are the Arg module from the stdlib (but client programs are a little painful to maintain) or Daniel Bunzli’s cmdliner library (which is overkill for many applications).
If you use the Arg module, I suggest you give a try at minicli.