Moulti changes the way your shell scripts (bash, zsh, etc.) display their output in your terminal.
Moulti enables you to assign the numerous lines emitted by your scripts to "steps", i.e. visual, collapsible blocks featuring their own title and color.
Not convinced yet? What if the output of your Ansible playbooks looked like this?
Moulti is a tool meant for people who write and execute shell scripts and/or Ansible playbooks.
Specifically, if you find yourself scrolling up your terminal to ensure everything went fine while your script is still running, then Moulti is made for you.
By the way, Moulti can also display man pages and unified diff files (with colors courtesy of delta):
For decades, scripts and command-line tools have resorted to various techniques to make it possible to navigate copious output.
One of these techniques is to "draw" separators using ASCII characters.
Example
$ my-huge-batch.sh
======== PART 1 ========[10,000 lines of output]======== PART 2 ========[10,000 lines of output]======== PART 3 ========[10,000 lines of output]Huge batch finished, exiting with return code 0.
Implementing such separators is straightforward, and they make it easier to spot and navigate to relevant points of the output, but as mere non-interactive markers, they remain a limited tool.
TUIs (Text User Interfaces) offer much more potential, starting with the ability to fold/collapse entire sections, yet remain costly to implement compared with CLI tools.
As a CLI-driven TUI, Moulti intends to bridge that gap by bringing specialized TUI capabilities to authors of CLI tools.
Inspiration
Moulti remained a mere idea for a significant time (possibly years).
The idea of driving TUI elements from scripts obviously comes from tools like
dialog and
whiptail.
At some point, the author stumbled upon
multiplex, which is probably the closest thing to Moulti. multiplex was deemed
unsatisfying on multiple points (including architecture) and that prompted the development of Moulti.
procmux is also similar to Moulti but did not affect its development.
Acknowledgments
The Textual framework helped a lot, so kudos to the Textual team, and specifically to: