New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mycroft-config tool to manage config files #2290
Conversation
|
this should reduce support requests by 70%! most of the time "mycroft is broken" it's a bad comma messing json, probably in core config file.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the switch to underscores in functions should be made to ensure it's portable between bash implementations / variants.
The new mycroft-config utility simplifies management of the the various configuration files that control Mycroft. Commands include: edit, show, get, set, reload. * mycroft-config edit (default|remote|system|user) Open the requested file in an editor (nano by default), performing JSON validation warnings to minimize accidental edit errors. * mycroft-config show (default|remote|system|user) Dump the selected file with nice highlighting using jq * mycroft-config get <var> Load the mycroft.conf stack, outputting the effective value(s). The <var> is specified using jq-style specifiers. For example: mycroft-config get enclosure.platform mycroft-config get location mycroft-config get * mycroft-config set <var> <value> Set the given variable in the "user" configuration file. Examples: mycroft-config set lang "es-es" mycroft-config set tts.mimic.voice "ap" * mycroft-config reload Sends a signal on the messagebus to tell services to reload configs. This automatically occurs after a 'set' or 'edit' command.
Many versions of Linux (most Debian-based versions) support a mechanimsm based on a link called "sensible-editor", which is configured to invoke the user's preferred editing tool. To get colorization help, the temp file is now named with a ".json" extension. Most editors can colorize appropriately based on that.
909a4dc
to
fea3133
Compare
|
Rebased and added a warning for when opening in view mode instead of the expected edit mode. Merging now. |
The new mycroft-config utility simplifies management of the the
various configuration files that control Mycroft. Commands include:
edit, show, get, set, reload.
mycroft-config edit (default|remote|system|user)Open the requested file in an editor (nano by default), performing
JSON validation warnings to minimize accidental edit errors.
mycroft-config show (default|remote|system|user)Dump the selected file with nice highlighting using jq
mycroft-config get <var>Load the mycroft.conf stack, outputting the effective value(s). The
is specified using jq-style specifiers. For example:
mycroft-config get enclosure.platform
mycroft-config get location
mycroft-config get
mycroft-config set <var> <value>Set the given variable in the "user" configuration file. Examples:
mycroft-config set lang "es-es"
mycroft-config set tts.mimic.voice "ap"
mycroft-config reloadSends a signal on the messagebus to tell services to reload configs.
This automatically occurs after a 'set' or 'edit' command.