Open two terminals on the same machine/host/VM/container.
For better visual results, these terminals should ideally support 24-bit colors and advertise it to applications.
This typically does the trick:
Both terminals
exportTERM=xterm-256colorCOLORTERM=truecolor
In the first terminal, launch the Moulti instance, i.e. the Terminal User Interface (TUI) itself:
Terminal #1: TUI
moultiinit
Upon startup, Moulti is empty: it shows nothing beyond a title bar and a footer:
Terminal #1: TUI
From now on, we will use the second terminal to issue commands to the Moulti instance through the Command-Line Interface (CLI) client.
First, make yourself at home by setting its title:
Terminal #2: CLI
moultiset--title='This is MY (first) Moulti instance'
The effect should be immediate in the first terminal:
Terminal #1: TUI
Create your first Moulti step with step id "my_step":
Terminal #2: CLI
moultistepaddmy_step--title='My first step'
Terminal #1: TUI
Now, fill the "log" part of your step with some content:
Terminal #2: CLI
ip-ca|moultipassmy_step
Again, the effect should be immediate in the first terminal:
Terminal #1: TUI
Back to the second terminal, adjust your step:
Terminal #2: CLI
# Applying the "success" class turns the step green:
moultistepupdatemy_step--classes='success'# Steps have optional top and bottom texts:
moultistepupdatemy_step--top-text='Here is the output of [red bold]ip -color address[/]:'
Terminal #1: TUI
That syntax we used to turn the command red is called "Rich markup".
Its BBcode-like syntax is described here, the list of available colors is there and styles that typically work fine in a modern terminal emulator are: blinkboldconcealitalicoverlinereversestrikeunderlineunderline2.
Try them all at once:
Terminal #2: CLI
moultistepupdatemy_step--bottom-text\'[blink]blink[/] [bold]bold[/] [conceal]conceal[/] [italic]italic[/] [overline]overline[/] [reverse]reverse[/] [strike]strike[/] [underline]underline[/] [underline2]underline2[/] [blue]blue[/] [on yellow1]on yellow1[/] [blue on yellow1]blue on yellow1[/]'
Terminal #1: TUI
Important: Rich markup cannot be used in the log part of a step.
And of course, you can add multiple such steps:
Terminal #2: CLI
forclassinwarningerrorinactivestandard;domoultistepadd"${class}_example"\--classes="${class}"\--title="${class^} step"\--text="This is a step with class '${class}'."\--bottom-text=' 'done
Terminal #1: TUI
Step ids (e.g. "my_step") must remain unique in a Moulti instance.
If necessary, you can also clear (i.e. empty) a step:
Terminal #2: CLI
moultistepclearwarning_example
or simply delete it:
Terminal #2: CLI
moultistepdeleteerror_example
Terminal #1: TUI
Refer to the output of moulti step add --help for more options.
What next?
You now know how to add, update, fill, clear and delete steps.
Steps are a core feature of Moulti, but they are not the only widgets available: you can also leverage questions, dividers and the progress bar.
Or you can head straight to the Documentation section and browse its various topics, starting with shell scripting.