diff --git a/shopdb/plugins/__init__.py b/shopdb/plugins/__init__.py index 0e35dd73..b96c664d 100644 --- a/shopdb/plugins/__init__.py +++ b/shopdb/plugins/__init__.py @@ -468,10 +468,13 @@ class PluginManager: return True def enable_plugin(self, name: str) -> bool: - """Enable a disabled plugin.""" + """Enable a disabled plugin. Auto-installs if available but not installed.""" + # Auto-install if available but not installed (UX: enabling should just work) if not self.registry.is_installed(name): - logger.error(f"Plugin {name} is not installed") - return False + logger.info(f"Plugin {name} not installed, installing first") + if not self.install_plugin(name): + logger.error(f"Failed to install plugin {name}") + return False if self.registry.is_enabled(name): logger.info(f"Plugin {name} is already enabled")