package minicli
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7660aaf32a1f82d79f803447f9a55e42c11cf8cf594e3e04539e57f238bece1c
md5=4d251eafc27d8f667f6c13f890f17546
Description
minicli provides the CLI module. It allows programmers to quickly and correctly handle options passed via the command line to their program. minicli is intended at people who develop software fast, but who don't want to break things. minicli can throw a variety of informative exceptions to the end user, when the command line interface is not being used properly. So that, the end user has a good chance to correct himself before calling the software support team. Another design goal of minicli is to make command-line scientific programs harder to use incorrectly.
Added to opam-repository:
README
Minicli
Minimalist OCaml library for command line parsing. Look into the test.ml file for usage examples/quickstart.
Example session with the test program
# _build/default/test.exe
usage:
_build/default/test.exe {-i|--input} <file> {-o|--output} <file> -n <int> -x <float> [-v] [--hi <string>]
# _build/default/test.exe -i
Fatal error: exception Minicli__CLI.No_param_for_option("-i")
# _build/default/test.exe -i input.txt
Fatal error: exception Minicli__CLI.Option_is_mandatory("-o")
# _build/default/test.exe -i input.txt -o output.txt
Fatal error: exception Minicli__CLI.Option_is_mandatory("-n")
# _build/default/test.exe -i input.txt -o output.txt -n /dev/null
Fatal error: exception Minicli__CLI.Not_an_int("/dev/null")
# _build/default/test.exe -i input.txt -o output.txt -n 123
Fatal error: exception Minicli__CLI.Option_is_mandatory("-x")
# _build/default/test.exe -i input.txt -o output.txt -n 123 -x /dev/null
Fatal error: exception Minicli__CLI.Not_a_float("/dev/null")
# _build/default/test.exe -i input.txt -o output.txt -n 123 -x 0.123
i: input.txt o: output.txt n: 123 x: 0.123000 v: false
# _build/default/test.exe -i input.txt -o output.txt -n 123 -x 0.123 -v
i: input.txt o: output.txt n: 123 x: 0.123000 v: true
# _build/default/test.exe -i input.txt -o output.txt -n 123 -x 0.123 -v -i input.bin
Fatal error: exception Minicli__CLI.More_than_once("-i, --input")
# _build/default/test.exe --toto titi -i input.txt -o output.txt -n 123 -x 0.123 -v -y 42
Fatal error: exception Minicli__CLI.Unused_options("--toto,-y")Bibliography
Stephenson, N. (1999). In the beginning... was the command line. New York: Avon books.
Dev Dependencies
None
Optional Dependencies
None
Used by (19)
- acp4
-
bst
>= "6.0.0" -
dokeysto_lz4
>= "3.0.1" - fasmifra
-
hts_shrink
>= "2.0.0" -
lbvs_consent
= "1.1.3" | >= "2.0.1" - linwrap
- mmo
- molenc
- odnnr
- omlr
- oplsr
- oranger
- orf
-
orrandomForest
>= "3.0.0" - orsvm_e1071
- pardi
- rankers
- svmwrap
Conflicts
None
Build status
Results of building minicli with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 5.0.2 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure