Mycroft Community Forum

New script to list skills, intents and vocabs

Hi,

About a year ago, I wrote a short bash script to easily list skills, intents and vocabs.

By using symbolic links, one script can do all three tasks:

pi@raspberrypi:/usr/local/sbin$ ls -l
total 8
-rwxr-xr-x 1 pi pi 6610 Jan 17 10:12 lsintent
lrwxrwxrwx 1 pi pi    8 Jan 17 10:13 lsskills -> lsintent
lrwxrwxrwx 1 pi pi    8 Jan 17 10:13 lsvocab -> lsintent

Here’s an example of using them:

pi@raspberrypi:/usr/local/sbin$ lsskills | head -7
INFO - building SkillEntry objects for all skills
INFO - building SkillEntry objects for all skills
INFO - invalidating skills cache
mycroft-singing [installed]
mycroft-weather [installed]
fallback-unknown        [installed]
mycroft-speak   [installed]
mycroft-naptime [installed]
mycroft-configuration   [installed]
mycroft-spelling        [installed]
pi@raspberrypi:/usr/local/sbin$ lsintent | head -7
 "3 day forecast"
 "add an alarm daily for 11 a.m."
 "are there 11 a.m alarms"
 "are we going to have clear skies tonight"
 "cancel all my alarms"
 "cancel all timers"
 "cancel all timers"
pi@raspberrypi:/usr/local/sbin$ lsvocab | head -14








#
##
###
####
%
1

(Hmm, looks like lsvocab is getting some empty lines …)

Maybe this would be useful to the community?

I’m still learning github, but believe I have it up there. I named it ‘mycroft-tools’. So you should be able to do something like this to pull the code down:

$ cd /srv
$ sudo mkdir git
$ sudo chown pi.pi git
$ cd git
git clone https://github.com/mike99mac/mycroft-tools

Then I copied the script and the two symlinks to /usr/local/sbin/ which is in my PATH:

$ cd mycroft-tools/usr/local/sbin
$ sudo cp ls* /usr/local/sbin

If anyone gets them working, feedback would be appreciated. And of course, contributions are welcome.

-Mike M