github ↗
docs menu

Module Quill_tui

Terminal notebook interface.

Provides a full-screen TUI for viewing and executing notebooks using the Mosaic TEA framework. The TUI is kernel-agnostic: callers supply a kernel factory function.

#val run : create_kernel:(on_event:(Quill.Kernel.event -> unit) -> Quill.Kernel.t) -> string -> (unit, string) Stdlib.result

run ~create_kernel path launches the notebook TUI for the file at path. create_kernel is called once to obtain a kernel; the TUI owns the kernel lifecycle and calls shutdown on exit. The notebook is loaded from path with Quill_markdown.load and saved back on request with Quill_markdown.save, storing its images as it found them. A save is refused while the file has changed on disk since it was last loaded or saved. The result is Error msg if the notebook cannot be loaded.