@Override
  public void main(@NotNull List<String> args) {
    if (args.size() == 1) {
      printUsageHint();
      System.exit(0);
    }

    try {
      var pluginIds = new LinkedHashSet<PluginId>();
      var customRepositories = new LinkedHashSet<String>();
      var projectPaths = new ArrayList<Path>();

      for (int i = 1; i < args.size(); i++) {
        var arg = args.get(i);
        if ("-h".equals(arg) || "--help".equals(arg)) {
          printUsageHint();
        }
        else if (arg.startsWith("--for-project=")) {
          projectPaths.add(Path.of(arg.replace("--for-project=", "")));
        }
        else if (arg.contains(URLUtil.SCHEME_SEPARATOR)) {
          customRepositories.add(arg);
        }
        else {
          pluginIds.add(PluginId.getId(arg));
        }
      }

      collectProjectRequiredPlugins(pluginIds, projectPaths);

      if (!customRepositories.isEmpty()) {
        RepositoryHelper.amendPluginHostsProperty(customRepositories);
      }
      logInfo("plugin repositories: " + RepositoryHelper.getPluginHosts());

      var installed = installPlugins(pluginIds);
      System.exit(installed.size() == pluginIds.size() ? 0 : 1);
    }
    catch (Throwable t) {
      LOG.error(t);
      System.exit(1);
    }
  }
@Override
  public void main(@NotNull List<String> args)