Web UI as a learning tool for the CLI?

Is it feasible, with the current UI published at GitHub - zabbly/incus: Incus package repository · GitHub, to support a teaching mode? By that I mean generating the list of commands to run from the CLI to mimic the setup that the UI is doing for things like init’ing a new OCI-driven container.

I presume that one is still pulled from Canonical, so perhaps the answer is “no, you’ll need to build a new UI”?

There is such a teaching mode UI for Incus. It’s this one here, Linux Containers - Incus - Try it online that teaches you the basics for Incus system containers.

You are looking at such a kind of merging, Adding a web UI to the Incus demo service | Stéphane Graber's website

Personally I think you would need to make a new installation of Linux Containers - Incus - Try it online (see above link for the source), and just edit the existing “10 lessons” with appropriate material for OCI containers.

I’m thinking more that the local UI could show a “these are the equivalent CLI invocations” the same way it shows the yaml editor. Having to dive through an online service every time I want to refresh my memory about how something is done is not practical, especially since I may be trying to do it when I have no internet connectivity.

The current UI is really just a light fork of the LXD UI. We have added some minor extra features and fixed some bugs, but we’re not likely to make any large changes as that makes it very hard to rebase on newer LXD UI versions.

We do have a plan to create a new UI from scratch, at which point this kind of feature may become an option. Something that would be fun to support is having built-in CLI access through an ephemeral container that would allow for running CLI commands in the same context as the UI.

In general the goal for any new UI work is to limit the amount of hardcoded data in the UI itself, so all config keys, help messages, … should come from the API metadata endpoint. That endpoint could also provide some CLI suggestions at that point.

1 Like

Do what I do: Type incus then hit enter, you get all the commands that can follow incus, hit up arrow so last command comes up and then type the next command that looked like it would be right and hit enter and get help for that command. Rinse and repeat till you get to the help for the command you want.