Skip to content

First steps

Prerequisites

This document assumes you have installed Moulti.

First steps with Moulti

  1. 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

    export TERM=xterm-256color COLORTERM=truecolor
    
  2. In the first terminal, launch the Moulti instance, i.e. the Terminal User Interface (TUI) itself:

    Terminal #1: TUI

    moulti init
    

    Upon startup, Moulti is empty: it shows nothing beyond a title bar and a footer:

    Terminal #1: TUI

                                                        Moulti                                                      l  Lock scroll  s  Save  z  Console  x   Expand all   o  Collapse all  d  Light  h  Help   q   Quit 

  3. 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

    moulti set --title='This is MY (first) Moulti instance'
    

    The effect should be immediate in the first terminal:

    Terminal #1: TUI

                                          This is MY (first) Moulti instance                                        l  Lock scroll  s  Save  z  Console   x   Expand all  o  Collapse all  d  Light  h   Help   q  Quit 

  4. Create your first Moulti step with step id "my_step":

    Terminal #2: CLI

    moulti step add my_step --title='My first step'
    

    Terminal #1: TUI

                                          This is MY (first) Moulti instance                                       ▼ My first step  l  Lock scroll  s  Save  z  Console   x   Expand all  o  Collapse all  d  Light  h   Help   q  Quit 

  5. Now, fill the "log" part of your step with some content:

    Terminal #2: CLI

    ip -c a | moulti pass my_step
    

    Again, the effect should be immediate in the first terminal:

    Terminal #1: TUI

                                          This is MY (first) Moulti instance                                       ▼ My first step 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host noprefixroute         valid_lft forever preferred_lft forever 2: wlp0s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000     link/ether ab:cd:ef:01:02:03 brd ff:ff:ff:ff:ff:ff permaddr aa:bb:cc:dd:ee:ff     altname shiny-wifi-adapter 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000     link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff     inet 1.2.3.4/24 brd 1.2.3.255 scope global dynamic noprefixroute eth0        valid_lft 86400sec preferred_lft 86400sec     inet6 2001:aaa:bbb:ccc::1/64 scope global dynamic noprefixroute         valid_lft 86400sec preferred_lft 14400sec     inet6 fe80::aaa:bbb:ccc:ddd/64 scope link noprefixroute         valid_lft forever preferred_lft forever  l  Lock scroll  s  Save  z  Console   x   Expand all  o  Collapse all  d  Light  h   Help   q  Quit 

  6. Back to the second terminal, adjust your step:

    Terminal #2: CLI

    # Applying the "success" class turns the step green:
    moulti step update my_step --classes='success'
    # Steps have optional top and bottom texts:
    moulti step update my_step --top-text='Here is the output of [red bold]ip -color address[/]:'
    

    Terminal #1: TUI

                                          This is MY (first) Moulti instance                                       ▼ My first step Here is the output of ip -color address: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host noprefixroute         valid_lft forever preferred_lft forever 2: wlp0s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000     link/ether ab:cd:ef:01:02:03 brd ff:ff:ff:ff:ff:ff permaddr aa:bb:cc:dd:ee:ff     altname shiny-wifi-adapter 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000     link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff     inet 1.2.3.4/24 brd 1.2.3.255 scope global dynamic noprefixroute eth0        valid_lft 86400sec preferred_lft 86400sec     inet6 2001:aaa:bbb:ccc::1/64 scope global dynamic noprefixroute         valid_lft 86400sec preferred_lft 14400sec     inet6 fe80::aaa:bbb:ccc:ddd/64 scope link noprefixroute         valid_lft forever preferred_lft forever  l  Lock scroll  s  Save  z  Console   x   Expand all  o  Collapse all  d  Light  h   Help   q  Quit 

  7. 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: blink bold conceal italic overline reverse strike underline underline2. Try them all at once:

    Terminal #2: CLI

    moulti step update my_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

                                          This is MY (first) Moulti instance                                       ▼ My first step Here is the output of ip -color address: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host noprefixroute         valid_lft forever preferred_lft forever 2: wlp0s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000     link/ether ab:cd:ef:01:02:03 brd ff:ff:ff:ff:ff:ff permaddr aa:bb:cc:dd:ee:ff     altname shiny-wifi-adapter 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000     link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff     inet 1.2.3.4/24 brd 1.2.3.255 scope global dynamic noprefixroute eth0        valid_lft 86400sec preferred_lft 86400sec     inet6 2001:aaa:bbb:ccc::1/64 scope global dynamic noprefixroute         valid_lft 86400sec preferred_lft 14400sec     inet6 fe80::aaa:bbb:ccc:ddd/64 scope link noprefixroute         valid_lft forever preferred_lft forever blinkboldconcealitalicoverlinereversestrike underline underline2blueon yellow1blue on yellow1  l  Lock scroll  s  Save  z  Console   x   Expand all  o  Collapse all  d  Light  h   Help   q  Quit 

    Important: Rich markup cannot be used in the log part of a step.

  8. And of course, you can add multiple such steps:

    Terminal #2: CLI

    for class in warning error inactive standard; do
        moulti step add "${class}_example" \
            --classes="${class}" \
            --title="${class^} step" \
            --text="This is a step with class '${class}'." \
            --bottom-text=' '
    done
    

    Terminal #1: TUI

                                          This is MY (first) Moulti instance                                       ▼ My first step Here is the output of ip -color address: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host noprefixroute         valid_lft forever preferred_lft forever 2: wlp0s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000     link/ether ab:cd:ef:01:02:03 brd ff:ff:ff:ff:ff:ff permaddr aa:bb:cc:dd:ee:ff     altname shiny-wifi-adapter 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000     link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff     inet 1.2.3.4/24 brd 1.2.3.255 scope global dynamic noprefixroute eth0        valid_lft 86400sec preferred_lft 86400sec     inet6 2001:aaa:bbb:ccc::1/64 scope global dynamic noprefixroute         valid_lft 86400sec preferred_lft 14400sec     inet6 fe80::aaa:bbb:ccc:ddd/64 scope link noprefixroute         valid_lft forever preferred_lft forever blinkboldconcealitalicoverlinereversestrike underline underline2blueon yellow1blue on yellow1 ▼ Warning step This is a step with class 'warning'. ▼ Error step This is a step with class 'error'. ▼ Inactive step This is a step with class 'inactive'. ▼ Standard step This is a step with class 'standard'.  l  Lock scroll  s  Save  z  Console   x   Expand all  o  Collapse all  d  Light  h   Help   q  Quit 

    Step ids (e.g. "my_step") must remain unique in a Moulti instance.

  9. If necessary, you can also clear (i.e. empty) a step:

    Terminal #2: CLI

    moulti step clear warning_example
    

    or simply delete it:

    Terminal #2: CLI

    moulti step delete error_example
    

    Terminal #1: TUI

                                          This is MY (first) Moulti instance                                       ▼ My first step Here is the output of ip -color address: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host noprefixroute         valid_lft forever preferred_lft forever 2: wlp0s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000     link/ether ab:cd:ef:01:02:03 brd ff:ff:ff:ff:ff:ff permaddr aa:bb:cc:dd:ee:ff     altname shiny-wifi-adapter 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000     link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff     inet 1.2.3.4/24 brd 1.2.3.255 scope global dynamic noprefixroute eth0        valid_lft 86400sec preferred_lft 86400sec     inet6 2001:aaa:bbb:ccc::1/64 scope global dynamic noprefixroute         valid_lft 86400sec preferred_lft 14400sec     inet6 fe80::aaa:bbb:ccc:ddd/64 scope link noprefixroute         valid_lft forever preferred_lft forever blinkboldconcealitalicoverlinereversestrike underline underline2blueon yellow1blue on yellow1 ▼ Warning step ▼ Inactive step This is a step with class 'inactive'. ▼ Standard step This is a step with class 'standard'.  l  Lock scroll  s  Save  z  Console   x   Expand all  o  Collapse all  d  Light  h   Help   q  Quit 

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.