Juju CLI Improvement Ideas

Continuing the discussion from How do you train your staff to use Juju? Some suggested tasks for people learning Juju:


If we have people who need to do juju help commands | grep something then it seems like it would be good to include that functionality in the Juju CLI. Especially if you are trying to run Juju from Windows, which doesn’t have grep.

Personally I tend to juju --help | less all of the time. :slight_smile: The length of the Juju help documentation is actually cumbersome because it is too long just to run a quick --help and get a synopsis of the command. When you run --help it prints out so much output you have to scroll up to find the options to the command or else pipe it to less. The length of some of the help pages are more suitable for a manpage. It would be awesome if Juju had a built-in help viewer along with short -h output for quick reference.

The Lucky CLI has long doc pages for each command that can be accessed with the --doc or -H argument. The normal -h and --help commands just print out the command arguments and descriptions. This way you can get the quick reference for the command by running lucky some-command --help or you can get the full doc with the examples of how to use it with lucky some-command --doc:

This might be something that Juju could do, too.


I feel similarly about watch --color juju status --color. It is a little bit of a mouthful just to watch on the Juju status and I end up not putting in the 2 --color s because of the typing even though I do want the colors because it helps me see what’s going on. Again, Windows probably doesn’t have watch.

It would be nice if there was a juju status -w or juju status --watch that would automatically refresh the status without using watch.

This has been talked extensively internally with in the team, I don’t think you’ll have much kick back at all from wanting this. It’s a case of finding time in the roadmap to do it!

3 Likes

Sprint project? Let’s do it!

1 Like

One thing I want to highlight is that we are looking at CLI improvements for the future. With the move toward aligning more closely with snaps we’re looking at ways of updating the CLI in some ways to mirror things they do well. For instance, the default snap help is really nice and clean. We recently went through every commandin the snap and juju ecosystem including the snapcraft and charm commands and identified which things were solid, which could use some love, and which were just gaps we should fill in. In the coming releases I think you’ll see a lot of that improvement. The improved UX around Juju Actions is probably one of the first cases in point.

Unfortunately, some of this will be a full on, backward incompatible “Juju 3.0” thing so it’ll take some time to get out there in real use.

1 Like