package pplumbing-log

  1. Overview
  2. Docs
An interface to [logs] using [Pp_tty] rather than [Format]

Install

dune-project
 Dependency

Authors

Maintainers

Sources

pplumbing-0.0.16.tbz
sha256=8ae0c09fec9088bc7af60582717a9e9d8bb7703e2fbf0a1b90b82e5962ed7039
sha512=ddd1d5a3d47e7c5ebfb2898f0810156dfca4e10df500ce8f39238cfe02b51fd12ea6d7796914bd02e9ad8e615da1ed7067c9f712bdbbfb884cab08d57bba3564

Description

[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.

These libraries are meant to combine nicely into a small ecosystem of useful helpers to build CLIs in OCaml.

[Pplumbing_log] is an interface to logs using [Pp_tty] rather than [Format].

Tags

cli logs pp

Published: 26 Sep 2025

README

pplumbing

Logo

CI Status Coverage Status

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. These libraries are meant to combine nicely into a small ecosystem of useful helpers to build CLIs in OCaml.

  • 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_err_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.
  • Cmdlang_climate_err_runner is a library for running command line programs specified with cmdlang with climate as a backend and making opinionated choices, assuming your dependencies are using Err.

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.

Dependencies (5)

  1. pplumbing-pp-tty = version
  2. pp >= "2.0.0"
  3. logs >= "0.7.0"
  4. ocaml >= "4.14"
  5. dune >= "3.17"

Dev Dependencies (1)

  1. odoc with-doc

Used by (2)

  1. pplumbing >= "0.0.16"
  2. pplumbing-log-cli

Conflicts

None