code: def manage_plugins(command, plugin_names=None):
       
      if plugin_names is None:
          plugin_names = []
      active_plugins = config.get("plugin", [])
      plugins = init_plugins()
      if command == "enable":
          for name in plugin_names:
              if name not in plugins:
                  raise ValueError("Unknown plugin: {}".format(name))
              if name not in active_plugins:
                  active_plugins.append(name)
      elif command == "disable":
          for name in plugin_names:
              if name in active_plugins:
                  active_plugins.remove(name)
      elif command == "list":
          print("{:20}{}".format("plugin", "enabled"))
          for plugin in sorted(plugins):
              print("{:20}{}".format(plugin, {False:"", True:"*"}[plugin in active_plugins]))
      else:
          raise ValueError("Invalid plugin command")
      config["plugin"] = active_plugins
      config.save()
  
      if command in ["enable", "disable"]:
          print("Enabled plugins: {}".format(", ".join(sorted(active_plugins))))
docs: Enable or disable plugins.