package inquire

Not available on OCaml 5.5
  1. Overview
  2. Docs
Create beautiful interactive command line interface in OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

inquire-0.3.1.tbz
sha256=2c7e102ded89e9244a817426db1e5bed64cf1ae9ef34ae75c7ddb67c2221d1ab
sha512=39130ab872c1630b630bbd4391864d35d641d44f04a090b9a35210057029b75547dcf66e792b14edc2df191aa37408cba3a502fa6e27e5be1eca73e2b98a60e1

Description

🎨 Create beautiful interactive command line interface in OCaml.

Added to opam-repository:

README

Inquire

Actions Status

🎨 Create beautiful interactive command line interface in OCaml

Installation

Using Opam

opam install inquire

Using Esy

esy add @opam/inquire

Usage

Confirm

Prompt the user to answer the given message with "y" or "n".

Inquire.confirm "Are you sure?"

Raw List

Prompt the user to chose a value from the given options.

Inquire.raw_select "What's your favorite movie?" ~options:[ "Choice 1" ; "Choice 2" ]

Password

Prompt the user to enter a password that will be hidden with stars (*).

Inquire.password "Enter your password:"

Input

Prompt the user to input a string.

Inquire.input "Enter a value:"

Limitations

Inquire is dead simple. The prompt implementations are ~100 line of code each and manage the terminal control flow themselves. This simplicity comes at a price though:

  • No support for UTF8. This would in principle be relatively easy to implement with a buffer that accumulates the input bytes until it matches an UTF8 value, up to a certain number of bytes. A PR for this would be more than welcome.

Contributing

Take a look at our Contributing Guide.

Dependencies (3)

  1. uutf
  2. dune >= "2.7"
  3. ocaml >= "4.08.0" & < "5.0"

Dev Dependencies (1)

  1. odoc with-doc

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building inquire with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. 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
0.3.1 (this version) good good n/a n/a n/a
  • 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