| name | enable-plugin |
| description | Enables or disables a registered plugin in a marketplace's config template. Use when a plugin is registered in marketplace.json but not active, or when toggling a plugin on or off for a setup. |
enable-plugin
Populates the enabledPlugins map in cli-config.template.json so ZCode
knows which plugins to activate.
How plugin enabling works
ZCode's cli/config.json has:
{
"plugins": {
"enabled": true,
"enabledPlugins": {
"plugin-name@marketplace-name": true
}
}
}
plugins.enabled (bool) — master switch for the plugin system. Must be
true (the default in every marketplace template).
plugins.enabledPlugins (object) — per-plugin enable map. The key format is
<plugin-name>@<marketplace-name>. Value true = enabled, false =
explicitly disabled. Absent = not enabled.
If enabledPlugins is {} (empty), no plugins are active even if they are
registered in marketplace.json. That is appropriate only for a deliberately
plugin-free profile. A marketplace that advertises bundled plugin capability
must explicitly enable the intended plugin keys; nddev-builder therefore
ships with core@nddev-builder: true.
Worked example: to enable the core plugin in the nddev-builder
marketplace:
{
"plugins": {
"enabled": true,
"enabledPlugins": {
"core@nddev-builder": true
}
}
}
Procedure
-
Ask the user for:
- The marketplace name.
- The plugin name to enable (or disable).
- Action: enable or disable.
-
Read marketplace.json and confirm the plugin is registered:
python3 -m json.tool \
zcode_tools/marketplaces/<mp>/marketplace.json
If the plugin is not in the list, tell the user to add it first (follow the
add-plugin skill).
-
Read cli-config.template.json and locate plugins.enabledPlugins.
-
Set the key <plugin-name>@<marketplace-name>:
- Enable: set to
true.
- Disable: set to
false (or remove the key entirely).
-
Write the updated JSON (preserve _comment, indent=2, trailing newline).
-
Validate:
python3 -m json.tool \
zcode_tools/marketplaces/<mp>/cli-config.template.json
cli-tools/scripts/install.sh install --marketplace <mp> --platform macos --plan
Rules
- The key format is
plugin-name@marketplace-name (NOT plugin-name alone).
plugins.enabled must remain true — do not disable the master switch.
- Preserve the
_comment field and all other keys in the template.
- English only.