As you might have noticed, Tuist CLI’s UI is an area where we haven’t put much attention, despite it being tightly connected with your experience interfacing with the Tuist ecosystem.
Months ago, we started taking steps to address that by designing and building a design system, Noora, which will span both the CLI and the server (web UI). You can check out the repository github.com/tuist/noora where we already have some components for building CLIs in Swift.
We began adopting Noora in the CLI, releasing the first changes in version 4.44.0 (along with some regressions—apologies for those). If you run the CLI now, you’ll notice that alerts (warnings, success, and errors) are collected and beautifully printed at the end with actionable next steps:
In the following weeks, we’ll gradually migrate commands to use the new progress components to bring visual consistency while ensuring we show developers the right information they need to understand what’s happening.
Logging
As part of this effort, we decided to draw a line between logging and UI. In apps that run outside of the terminal, UI and logging are usually two different things. Logs are typically useful in the context of debugging the execution of something, while the UI is what users interface with and receive feedback through. Logging is text; UI is pixels.
In a CLI, logging and UI are both text, so it’s natural to merge them into a single entity. That’s what we did, and that’s what led to an output that’s a mix of UI and verbose information that’s not really relevant most of the time.
With the aim of improving that, we now separate UI from logging. Your logs will be stored in the file-system, and the path is presented on completion when the CLI encounters an error so that you can understand what happened and share the details with us (example above). The UI will be centered around conveying progress and giving you an overview of the steps the CLI is going through. We’ll focus on ensuring that in cases where asynchronous tasks take a long time, for example pulling binaries from the server, you can see the percentage of progress that’s completed.
Looking for contributors
If you are interested in helping us with the adoption of Noora, let me know in this discussion. I’d be happy to give you some pointers on how to roll this out incrementally. We can start with one-off commands such as “tuist clean,” and gradually move towards “tuist generate,” which will be one of the most complex to migrate.