Explanation
Welcome to the Explanation section of the cmdlang documentation. This section covers how cmdlang works, its design principles, and our future plans.
Architecture
cmdlang is composed of several parts:
- Core Specification Language: A kernel command-line parsing specification language written as an OCaml EDSL.
- OCaml Library: Exposes a single module,
Cmdlang.Command, with no dependencies, to build command-line parsers in total abstraction using ergonomic helpers. - Translation Libraries: Convert
cmdlangparsers at runtime intocmdliner,core.command, orclimateparsers. - Basic execution runner: A proof-of-concept execution engine implemented on top of
stdlib.arg.
Experimental Status
cmdlang is currently under construction and considered experimental. We are actively seeking feedback to validate our design and engage with other declarative command-line enthusiasts.
Future Plans
In this section, we outline some areas of uncertainty regarding the feasibility of our design in detail. These are the areas we plan to explore next:
- Anonymous Arguments (Positional Arguments)
- Generation of Complex Man Pages
- Auto-Completion
For more details, refer to the Future Plans section.
Acknowledgements
- We are grateful for the years of accumulated work and experience that have resulted in high-quality CLI libraries like
cmdlinerandcore.command climate's early programming interface was a great source of inspiration. We are very thankful for their work on auto-completion and excited to see where theclimateproject goes next.
For more details, refer to the Acknowledgements section of the project on GitHub.