{"repo":"dillonkearns/elm-cli-options-parser","free":true,"listed":false,"github":"https://github.com/dillonkearns/elm-cli-options-parser","clone":"git clone https://github.com/dillonkearns/elm-cli-options-parser.git","description":"Build type-safe command-line utilities in Elm!","language":"Elm","stars":58,"topics":["elm","cli","options-parsing"],"license":"BSD-3-Clause","category":"cli-tools","readme_excerpt":"Elm CLI Options Parser elm-cli-options-parser allows you to build command-line options parsers in Elm. It uses a syntax similar to Json.Decode.Pipeline , with automatic help text generation, validation, and JSON Schema output for MCP tool definitions and elm-pages script introspection. You can play around with elm-cli-options-parser in a live terminal simulation in Ellie here! Example See the examples folder for full end-to-end examples, including how to wire your Elm options parser up through NodeJS so it can receive the command line input. Take this git command: To parse the above command, we could build a Program as follows (this snippet doesn't include the wiring of the OptionsParser-Line options from NodeJS, see the examples folder): It will also generate the help text for you, so it's guaranteed to be in sync. The example code above will generate the following help text: Note: the --help option is a built-in command, so no need to write a OptionsParser for that. Typed Options & JSON Schema The Cli.Option.Typed module lets you specify the type of each option (string, int, float, etc.) via a CliDecoder . This gives you: - JSON Schema generation via Program.toJsonSchema — for MCP tool definitions, elm-pages script introspection, or any tooling that needs a machine-readable description of your CLI's inputs - Typed JSON input — the same parser handles both traditional CLI args and structured JSON, so LLM agents can invoke your tool programmatically - CLI validation — typed d","default_branch":null,"files":null,"tree":[],"storefront":"/r/dillonkearns","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dillonkearns/elm-cli-options-parser/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}