Inquire
:art: Create beautiful interactive command line interface in OCaml
Install / Use
/learn @tmattio/InquireREADME
Inquire
🎨 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.
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR
