Tree @master (Download .tar.gz)
MOULTI
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.
Here is what upgrading a Debian system looks like with Moulti:

Interested? Run this demo in a container using docker or podman
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):


Installation
TL;DR: pipx install moulti; pipx ensurepath
More details in the Documentation
How?
Synopsis:
- Start a Moulti instance:
moulti init - Add a step:
moulti step add step_name --title='some clever title here' - Fill it:
whatever_your_script_does | moulti pass step_name - Repeat #2 and #3 until your script is done.
Learn how to leverage Moulti by jumping to its Documentation
Features
As shown in the demo, Moulti enables user interactions through questions:


Moulti also features:
- text search, similar to less: documentation
- ability to maximize a single step log, similar to tmux's zoom feature
- a progress bar: documentation
- programmatic scrolling: documentation
- an askpass helper named moulti-askpass: documentation
- support for Ansible playbooks, man pages and unified diff
When it comes to look and feel, Moulti can be customised:
- through
moulti set: define whether Moulti steps flow up or down: documentation - through Textual CSS (TCSS): documentation
- through ANSI themes: documentation
Implementation
Moulti is written in Python and leverages Textual, along with Pyperclip, argcomplete and unidiff.
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: - Will McGugan for creating it - Dave Pearson for his regular help and feedback about Textual issues
Commit History @master
- Tag v1.4.0. Xavier G. 2 years ago
- Changelog: NetBSD was also affected. Xavier G. 2 years ago
- protocol: work around recv_fds() limitation that affects FreeBSD. Xavier G. 2 years ago
- App: handle MarkupError exceptions. Xavier G. 2 years ago
- Documentation: mention the ability to copy to clipboard. Xavier G. 2 years ago
- Update Changelog. Xavier G. 2 years ago
- MoultiConsole: add highlighting. Xavier G. 2 years ago
- App: log Moulti version to the console. Xavier G. 2 years ago
- App: rename logdebug => logconsole. Xavier G. 2 years ago
- App: rename debug_step => end_user_console. Xavier G. 2 years ago
- Introduce MoultiConsole. Xavier G. 2 years ago
- MoultiLog: add a focus-indicating border. Xavier G. 2 years ago
- AbstractStep: add a focus-indicating border. Xavier G. 2 years ago
- AbstractStep: the focused step should have a hover effect too. Xavier G. 2 years ago
- AbstractStep: rework focus. Xavier G. 2 years ago
- AbstractQuestion: disable only focusable widgets. Xavier G. 2 years ago
- pylint: move configuration to pyproject.toml. Xavier G. 2 years ago
- buttonquestion: add ability to copy contents to clipboard. Xavier G. 2 years ago
- inputquestion: add ability to copy contents to clipboard. Xavier G. 2 years ago
- Step: leverage AbstractStep.copy_to_clipboard. Xavier G. 2 years ago
- AbstractStep: introduce the copy_to_clipboard decorator. Xavier G. 2 years ago
- abstractquestion: introduce method question(). Xavier G. 2 years ago
- abstractstep: introduce method notify_copy_to_clipboard(). Xavier G. 2 years ago
- moultilog: fix method return type. Xavier G. 2 years ago
- Reword some bindings. Xavier G. 2 years ago
- step: add bindings to copy step contents to clipboard. Xavier G. 2 years ago
- abstractstep: add index() method. Xavier G. 2 years ago
- moultilog: add ability to copy contents to clipboard. Xavier G. 2 years ago
- moultilog: add ability to strip styles/colors. Xavier G. 2 years ago
- precli: keep linters happy. Xavier G. 2 years ago