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
- moulti run: suffix the instance name to prevent conflicts. Xavier G. 1 year, 1 month ago
- cli: have separate functions for moulti init and run. Xavier G. 1 year, 1 month ago
- client: prefer moulti_socket_path() over MOULTI_SOCKET. Xavier G. 1 year, 1 month ago
- Documentation: recommend 24-bit colors. Xavier G. 1 year, 1 month ago
- moulti-python-checks: require pytest. Xavier G. 1 year, 1 month ago
- Single-source the project version. Xavier G. 1 year, 1 month ago
- Merge requirements.txt into pyproject.toml. Xavier G. 1 year, 1 month ago
- Merge setup.py into pyproject.toml. Xavier G. 1 year, 1 month ago
- Leverage functions from the environ module. Xavier G. 1 year, 1 month ago
- environ: introduce env, enva, envd. Xavier G. 1 year, 1 month ago
- Tag v1.29.0. Xavier G. 1 year, 1 month ago
- server: fix socket path computation. Xavier G. 1 year, 1 month ago
- security: introduce MoultiSecurityPolicy. Xavier G. 1 year, 1 month ago
- askpass: add tests. Xavier G. 1 year, 1 month ago
- moulti run: fix crash when passing a non-executable script. Xavier G. 1 year, 1 month ago
- askpass: import from client, not protocol. Xavier G. 1 year, 1 month ago
- client: combine helper and protocol functions. Xavier G. 1 year, 1 month ago
- MoultiServer: compute socket path from instance name. Xavier G. 1 year, 1 month ago
- Console: abridge strings in received messages. Xavier G. 1 year, 1 month ago
- app: leverage MoultiServer. Xavier G. 1 year, 1 month ago
- server: introduce MoultiServer. Xavier G. 1 year, 1 month ago
- protocol: introduce MoultiTLVWriter. Xavier G. 1 year, 1 month ago
- protocol: introduce assemble_tlv. Xavier G. 1 year, 1 month ago
- pipeline: use a thread to receive replies. Xavier G. 1 year, 1 month ago
- Bump copyright. Xavier G. 1 year, 1 month ago
- Tag v1.28.0. Xavier G. 1 year, 1 month ago
- Textual 1.0 improved input fields. Xavier G. 1 year, 1 month ago
- Textual 1.0 replaced Ctrl+c with Ctrl+q. Xavier G. 1 year, 1 month ago
- Switch to Textual 1.0. Xavier G. 1 year, 1 month ago
- Tag v1.27.0. Xavier G. 1 year, 1 month ago