 So, welcome to another Mycroft Soundbytes. I'm Stratus. And I'm Giz. And today we are going to be looking at the Mycroft CLI client and how useful it is as a developer to get information as things happen in real time. So, just as a brief overview, it does things like has a scrolling log view and it can show you different things in terms of the input output that Mycroft receives and gives and stuff like that. And so, today we're just going to kind of cover some of the basics of things that you might want to take a look at while you're using the Mycroft CLI. So, let's take a look at the Mycroft CLI client. So, what we have here, let's go through, you know, what are we looking at? So, the main thing that you'll see straight up is that scrolling text and that is the various logs coming out of Mycroft all in one feed. So, you know, you'll get the skills log and the voice log and the other logs all going through, which means that, you know, if there's particularly something goes wrong, then we can catch that. But also, you can see when the mic gets activated or we can see what the speech-to-text returns so that we can, you know, you can see if the speech-to-text was incorrect or whether our, you know, skill intents aren't matching up with the utterance correctly. So, really useful. What else do we have? In the top right corner, we can see that we're running Mycroft Core version 20.8.1 and then down the bottom on the right, we have the mic level. So, if you have microphone attached and you are making any sounds, well actually, even if you're not making sounds just with the background noise, it should be jumping around a little bit. So, it looks like that, you know, there's some, it's not picking up the microphone on this VM at the moment, but that's fine. Yeah, I believe I have it muted because I was triggering it in previous videos on accident. Yeah, yeah. So, let's leave it muted. But you will see that jumping around. And then on the left, we have the history, which is the history of input. So, we can type utterances in here if we want to. So, you know. Turn off Desk Lamp. Turn off the Desk Lamp. Great. So, this is injecting that text as if the user said it. So, it's exactly the same as if you said, hey, wake word, turn off Desk Lamp. It'll send that through the Intent Service and to the skills and all that sort of stuff. The other thing that we can input here that you'll see is it says put a colon for a command. So, if we type colon and then help, we've moved to this command mode. And there's actually a whole range of shortcuts and other commands that we can do. So, you can see that you can go up and down through the history. You can scroll through the logs quickly. You can also re-enter your previous command by doing control left. Oh, yeah. Yeah. Clearly history shortcuts. So, you can do control and control P or control right, control left. So, that'll, you know, if you're typing commands and you just want to type the same command rather than having to re-type everything, you can just control left and that'll enter it again. And then we have some more colon commands looking for something in particular, something from a particular skill or, you know, maybe a pairing code or something like that. We can change the logging level. So, if you generally, we just have info level logging because if you switch to debug, you'll notice that there is quite a lot of information going on in the background. It's not particularly useful on a normal day-to-day basis, but sometimes you need to do that. And then we have some skill debugging commands. So, we can see a list of all the installed skills and we'll have a look at that in a second because that's really useful. We can see the API methods that are available for any skill. So, that's a really new one and it's really cool. So, we're going to take a look at that. And then we can activate and deactivate different skills, particularly if we're doing development or if something's causing us trouble or something like that. It just basically turns the skill on or off. And the colon key deactivates all skills except for the one you specify. So, it could be useful at different points in time. Let's jump into colon skills first to just have a quick look at that. Cool. So, here we have all of the skills that are loaded on the device. And you can see that most of them are in yellow, which means that they loaded correctly. And down in the bottom left, there's the Microsoft stock skill, which is listed in red. So, that indicates that the skill exists, the Microsoft scene that there's a skill there, but for some reason it hasn't loaded, so it's not going to respond to utterances. In this case, we intentionally deactivated that skill because we need to update the API. But if there was, say, some kind of syntax error or some kind of error in our skill that we were working on, it would probably fail and therefore show up in red. So, we could see that pretty easily here. All right. So, I'm going to grab this skill right here. And we're going to use this one to take a look at the API. And, yeah, now we'll look at the API. So, we do colon API and then the name of a skill. Oh, that's not going to work because that's the name of skill. Yeah. So, it is a good point though. So, unlike MSM where it does some fuzzy matching, so you can say, you know, things like camera and it will just match up, you know, with the most likely skill. These commands require you to use the exact name of the skill as is shown in the skills list. So, that's a good reason to have that skills list there. Yeah, let's take a look at this. So, what this does is it shows us all of the methods that are exposed by a skill on that skills API. So, you know, the camera skill now has two methods that any other skill can use rather than having to re-implement their own camera functionality. They can just call open camera app to open the camera live view mode and take a single photo to take a photo with a five second countdown on it. So, you know, this is brand new to Minecraft, but it's really powerful feature actually. So, we'll look at it in a future video of how we use that, but this provides a really quick way so that you can take a look at a skill. You know, you're just thinking, I want to do something with the weather skill. No, I want to do something with weather. I wonder what I can get from the weather skill through its API. And so, this will give you a quick view of that rather than having to troll through the code of each skill to see what it may or may not provide you. It's kind of like reading the doc strings of Python methods in an IDE or whatever. It gives you that nice kind of snapshot. Bingo. And that's exactly where this content comes from, is the doc strings or the methods. So, big proponent of quality doc strings. See all of our previous videos. Yes. Please document your code. So, that was a quick trip through the Minecraft CLI. You'll become very familiar with this if you're doing any kind of dev work. I pretty much live in the CLI mostly because I don't actually talk to Minecraft while I'm dev'ing. I actually find that really annoying. Unless I'm actually testing to see what it catch, like whether it's catching my wake words or not, or something similar. I'm usually typing specific things because I find that a lot more convenient to the way that my brain works through the workflow. So, some really good things there, especially the colon skills where you can see the skill list and everything like that. And for the skills that are coming online that enable the API listing, that will be a really handy thing in the future to be able to just call up the APIs and what they provide for each skill. So, yeah, I don't know if there's anything you want to add to that or whether you're kind of happy with that. No, I think that's great. Yeah, so as we said, the main way that you bring up the CLI is that microsoft-cli-client command. You can also do microsoft-start space debug, which what that does is it starts microsoft and runs the CLI at the same time. However, the two are in the same process. So, if you exit the CLI it will also kill microsoft. So that can be really useful if you just want to check something quickly and then when you exit the CLI you want the whole thing to be killed and not running on your computer. But most of the time I think people want to start microsoft and then open the CLI. So just a thing to watch out for there. Yeah, so another useful tool in the tool chain and I hope that people are getting a lot of value out of these microsoft soundbites. We're trying to make them short and tight and if you have any suggestions for things that you'd like to see, if we've got it planned we'll bump it up the list and if not we'll look into seeing how viable that is for us to put on the docket. So, until next time. Until next time. Ciao.