https://github.com/mbarbin/pplumbing
Utility libraries to use with Pp
https://github.com/mbarbin/pplumbing
Last synced: 10 months ago
JSON representation
Utility libraries to use with Pp
- Host: GitHub
- URL: https://github.com/mbarbin/pplumbing
- Owner: mbarbin
- License: mit
- Created: 2025-03-09T16:09:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-09T20:02:59.000Z (over 1 year ago)
- Last Synced: 2025-03-09T20:26:03.710Z (over 1 year ago)
- Language: OCaml
- Size: 89.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
pplumbing
*pplumbing* defines a set of utility libraries to use with `pp`. It is compatible with `logs` and inspired by design choices used by *Dune* for user messages:
- `Pp_tty` extends `pp` to build colored documents in the user's terminal using ANSI escape codes.
- `Err` is an abstraction to report located errors and warnings to the user.
- `Log` is an interface to `logs` using `Pp_tty` rather than `Format`.
- `Log_cli` contains functions to work with `Err` on the side of end programs (such as a command line tools). It defines command line helpers to configure the `Err` library, while taking care of setting the `logs` and `fmt` style rendering.
- `Cmdlang_cmdliner_runner` is a library for running command line programs specified with `cmdlang` with `cmdliner` as a backend and making opinionated choices, assuming your dependencies are using `Err`.
These libraries are meant to combine nicely into a small ecosystem of useful helpers to build CLIs in OCaml.
## Links to plumbed projects
- [cmdlang](https://github.com/mbarbin/cmdlang)
- [cmdliner](https://github.com/dbuenzli/cmdliner)
- [dune](https://github.com/ocaml/dune)
- [fmt](https://github.com/dbuenzli/fmt)
- [logs](https://github.com/dbuenzli/logs)
- [pp](https://github.com/ocaml-dune/pp)
## Experimental Status
:construction: `pplumbing` is currently under construction. During this initial `0.0.X` experimental phase, the interfaces and behavior are subject to breaking changes.
## Acknowledgements
- We are thankful to the authors and contributors of the projects we use as dependencies.
- We would like to thank the *Dune* developers for the user-facing error handling of Dune (`Stdune.User_message`), on which we based the error handling scheme used in `Err`. By adopting a similar approach, we aim to provide a consistent and unified user experience for OCaml users across different tools and libraries.