A simple OVOS skill for running shell scripts and other commands. The commands execute quietly without requiring confirmation from OVOS.
- Run shell scripts or commands by speaking human-readable phrases.
- Configure aliases for easy-to-remember commands.
- Optionally run commands under a specific user's privileges.
Trigger commands using phrases like:
- "Hey Mycroft, launch command echo TEST"
- "Hey Mycroft, run script generate report"
The skill can be configured to map spoken phrases to scripts or commands in the settings.json
file. For example:
{
"alias": {
"generate report": "/home/forslund/scripts/generate_report.sh"
}
}
- User says: "Run script generate report"
- The skill executes:
/home/forslund/scripts/generate_report.sh
-
user
(optional): Specify a username to run commands under their privileges. Example:{ "user": "ovos" }
-
shell
(optional): Determines whether commands are executed via a shell. Defaults totrue
. Example:{ "shell": false }
{
"user": "ovos",
"alias": {
"generate report": "/home/forslund/scripts/generate_report.sh",
"update system": "sudo apt update && sudo apt upgrade -y",
"reboot device": "sudo reboot"
},
"shell": true
}
-
Shell Commands:
- By default, commands are executed via the shell, which allows complex operations but may expose security risks. If your commands don’t require shell features, set
shell
tofalse
.
- By default, commands are executed via the shell, which allows complex operations but may expose security risks. If your commands don’t require shell features, set
-
User Permissions:
- Commands can run under a specific user by configuring the
user
field. Ensure that the user has appropriate permissions to execute the commands.
- Commands can run under a specific user by configuring the
-
Validation:
- Avoid configuring dangerous commands like
rm -rf
without additional safeguards.
- Avoid configuring dangerous commands like