Open-source News

AlmaLinux 9, openSUSE Leap 15.4, Ubuntu 22.04, Debian 11.3 & Clear Linux Benchmarks

Phoronix - Wed, 07/06/2022 - 18:30
Given the recent releases of openSUSE Leap 15.4 and AlmaLinux 9.0, here are some fresh Linux server/workstation-oriented benchmarks on a dual Intel Xeon Platinum 8380 "Ice Lake" platform and running the fresh releases of various enterprise Linux choices.

Fedora May Finally Provide Official Support For The Raspberry Pi 4

Phoronix - Wed, 07/06/2022 - 17:54
For as popular as the Raspberry Pi 4 has been since its 2019 launch, Fedora hasn't officially supported this Arm single board computer with its Linux distribution. But now thanks to the upstream, open-source graphics acceleration finally coming together for the Raspberry Pi 4, with Fedora 37 they may end up finally providing "official" support for this popular, low-cost developer board...

AMD Hiring For Another Open-Source GPU Driver Developer With Multimedia Expertise

Phoronix - Wed, 07/06/2022 - 17:45
It's great seeing AMD continuing to hire for more Linux/open-source driver developers. Beyond their many roles they are still working to fill on the CPU side of the house, they have a new job posting in hiring for their open-source GPU driver stack with a focus on multimedia efforts...

Asahi Linux Nears Release "Real Soon" For Apple M2 Hardware

Phoronix - Wed, 07/06/2022 - 17:30
While Apple just recently introduced their first M2-powered Apple Silicon devices, thanks to the dedication of Hector Martin with Asahi Linux and not too many breaking changes over the M1, Asahi Linux is looking at "soon" having a Linux release to support the new platform...

Oracle Linux 9 Reaches GA With Unbreakable Enterprise Kernel R7

Phoronix - Wed, 07/06/2022 - 16:58
Oracle Linux 9 as Oracle's offshoot of Red Hat Enterprise Linux 9 is now available in general availability (GA) form. Besides being based on RHEL9, Oracle Linux 9 offers up their latest "Unbreakable Enterprise Kernel" for extra kernel features while also continuing to produce a Red Hat Compatible Kernel flavor as well...

Linux Mint Vs Ubuntu: Which OS Is Better for Beginners?

Tecmint - Wed, 07/06/2022 - 15:07
The post Linux Mint Vs Ubuntu: Which OS Is Better for Beginners? first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Ubuntu is arguably the most widely used Linux-based desktop operating system (OS) out there. It is a free, open-source, and easy-to-use Debian Linux derivative first launched in October 2004, by a team of Debian

The post Linux Mint Vs Ubuntu: Which OS Is Better for Beginners? first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

3 steps to create an awesome UX in a CLI application

opensource.com - Wed, 07/06/2022 - 15:00
3 steps to create an awesome UX in a CLI application Noaa Barki Wed, 07/06/2022 - 03:00 Register or Login to like Register or Login to like

As I was sitting in a meeting room, speaking with one of my teammates, our manager walked in with the rest of the dev team. The door slammed shut and our manager revealed that he had a big announcement. What unfolded before our eyes was the next project we were going to develop—an open source CLI (command line interface) application.

In this article, I'd like to share what I learned during our development process, and specifically what I wish I had known before we began developing Datree's CLI. Perhaps the next person can use these tips to create a great CLI application faster.

My name is Noaa Barki. I've been a full-stack developer for over six years, and I'll let you in on a little secret—I have a superpower: My interest and expertise are evenly split between back-end and front-end development. I simply cannot choose one without the other.

So when my manager revealed the news about our future CLI, the back-end developer-me got very excited because I'd never created a CLI (or any open source project, for that matter). A few seconds later, the front-end developer-me started to wonder, How can I build an awesome user experience in a CLI application?

Since Datree CLI helps engineers prevent Kubernetes misconfigurations, my users are primarily DevOps and engineers, so I interviewed all my DevOps friends and searched online about the general DevOps persona.

More great content Free online course: RHEL technical overview Learn advanced Linux commands Download cheat sheets Find an open source alternative Explore open source resources

Here are the steps I came up with:

  1. Design the commands
  2. Design the UI
  3. Provide backward compatibility
Step 1: Design the commands

Once you have completed the strategic process, it's time to design the commands. I think about CLI applications like magic boxes—they hold great features that work in a magical way, but only if you know how to use them. That means a CLI application must be intuitive and easy to use.

My top six principles for CLI commands

Here are my top six principles and best practices for designing and developing CLI commands:

1. Input flag vs. arguments

Use arguments for required fields, and for everything else, use flags. Take, for example, the datree test command, which prints the policy results, and say that you want to enable the user to print the output into a specific file. If you use datree test {pattern} {output-file}, it is difficult to understand from reading the executed command which argument is the pattern and which argument is the file path.

For example, this occurs with the following command: datree test **/* **.YAML. However, if you use datree test {pattern} -output {output-path}, it becomes much clearer.

Note: Reports show that most users find flags to be clearer.

2. Enum-style vs. Boolean flags

It's preferable to use an enum-style flag over a Boolean-style flag because then you (a developer and user) need to think about all combinations of the presence or absence of the flags in the command. An enum-style flag is a flag that assumes a value. Enum-style flags make it much easier to implement tab completion.

3. Use familiar language

Remember that a CLI is built more for humans than machines. Pick real-world language for your commands and descriptions.

4. Naming conventions

Use CLI commands that are named in a SINGLE form and VERB-NOUN format. This allows the command to be read like an imperative or request, for example: Computer, start app!

Minimize with the total number of commands you use, and don't rush to introduce new verbs to new commands. This makes it easier for users to remember command names.

5. Prompts

Provide a bypass to the prompt option. The user cannot script the command if prompting is required to complete it. To avoid frustrating users, a simple --output flag can be a valuable solution to allow the user to parse the output and script the CLI.

6. Command descriptions

The root command should list all the commands with their descriptions. Provide a command description to all commands (or do not offer descriptions at all), choose the screen width you want it to fit into (generally an 80-character width), and begin with a lowercase character. Also, don't end with a period to avoid unclear line breaks or lost periods.

Step 2: Design the UI

Now you have a solid definition for your users. You have also planned and designed your commands and outputs. Next it's time to think about making the CLI application aesthetic, accessible, and easy to learn.

If you think about it, almost every app must deal with UX (user experience) challenges during the users' onboarding and journey. The how part of UX for web applications is much more obvious because you have many component libraries (such as material-UI and bootstrap) that make it easier to adopt standard style guides and functionality flows. But what about CLI applications? Are there any design conventions for CLI interfaces? How can you create an aesthetic design of the CLI functionality that is also accessible? Is there any way to make the CLI UI as friendly as a GUI?

Top three UI and UX best practices for CLI applications

1. Use colors

Colors are a great way to attract your user's eyes and help them read commands and outputs much faster. The most recommended font colors are magenta, cyan, blue, green, and gray, but don't forget that background colors can provide more variety. I encourage you to use yellow and red colors but remember that these are typically saved for errors and warnings.

2. Input-output consistency

Be consistent with inputs and outputs across the application; this encourages usability and allows the user to learn how to interact with new commands quickly.

3. Ordering arguments

Choose an argument's position based on how it correlates with the command's action. Consider NestJS's generate command nest generate {schematic} {name}, which needs schematic and name as arguments. Notice that the action generate refers directly to the schematic, not name, so it makes more sense for schematic to be the first arg.

Step 3: Provide backward compatibility

Avoid modifying the output. Now that you know how to create a perfect CLI application, don't forget to keep your users in the back of your mind, especially when enabling scripting the CLI. Remember that any change in the command's outputs may break users' current scripts; therefore, avoid modifying the output.

Wrap up

Creating a new CLI is exciting and challenging, and doing so with a helpful and easy UX adds to the challenge. My experience shows that three key factors go into a successful UX for a CLI project:

  1. Design the commands
  2. Design the UI
  3. Provide backward compatibility

Each of these phases has its own components that support the logic and make the lives of your users easier.

I hope these concepts are useful and that you have the opportunity to apply them in your next project.

Here is what I've learned to be the key factors that go into a successful user experience for a CLI project.

Image by:

Image by Mapbox Uncharted ERG, CC-BY 3.0 US

Command line DevOps Art and design What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Pages