You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: plugins.rb
    path of file: ./repos/bridgetown/bridgetown-core/lib/bridgetown-core/commands
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Bridgetown
  module Commands
    class Plugins < Thor
      include Thor::Actions
      include ConfigurationOverridable
      include GitHelpers

      Registrations.register do
        desc "plugins <command>", "List installed plugins or access plugin content"
        subcommand "plugins", Plugins
      end

      desc "list", "List information about installed plugins"
      option :verbose,
             type: :boolean,
             desc: "Print the source path of each plugin"
      def list
        config_options = configuration_with_overrides(options)
        config_options.run_initializers! context: :static
        site = Bridgetown::Site.new(config_options)
        site.reset
        Bridgetown::Hooks.trigger :site, :pre_read, site

        plugins_list = config_options.initializers.values.sort_by(&:name)

        pm = site.plugin_manager

        plugins_list += pm.class.registered_plugins.reject do |plugin|
          plugin.to_s.end_with? "site_builder.rb"
        end

        Bridgetown.logger.info("Registered Plugins:", plugins_list.length.to_s.yellow.bold)

        plugins_list.each do |plugin|
          plugin_desc = plugin.to_s
          next if plugin_desc.ends_with?("site_builder.rb") || plugin_desc == "init (Initializer)"

          if plugin.is_a?(Bridgetown::Configuration::Initializer)
            Bridgetown.logger.info("", plugin_desc)
            Bridgetown.logger.debug(
              "", "PATH: " + plugin.block.source_location[0]
            )
          elsif plugin.is_a?(Bundler::StubSpecification) || plugin.is_a?(Gem::Specification)
            Bridgetown.logger.info("", "#{plugin.name} (Rubygem)")
            Bridgetown.logger.debug(
              "", "PATH: " + plugin.full_gem_path
            )
          else
            Bridgetown.logger.info("", plugin_desc.sub(site.in_root_dir("/"), ""))
          end

          Bridgetown.logger.debug("")
        end

        unless site.config.source_manifests.empty?
          Bridgetown.logger.info("Source Manifests:", "----")
        end

        site.config.
    
      def new(name)
        folder_name = name.underscore
        module_name = folder_name.camelize

        run "git clone https://github.com/bridgetownrb/bridgetown-sample-plugin #{name}"
        new_gemspec = "#{folder_name}.gemspec"

        inside name do # rubocop:todo Metrics/BlockLength
          destroy_existing_repo
          initialize_new_repo

          FileUtils.mv "sample_plugin.gemspec", new_gemspec
          gsub_file new_gemspec, "https://github.com/bridgetownrb/bridgetown-sample-plugin", "https://github.com/username/#{name}"
          gsub_file new_gemspec, "bridgetown-sample-plugin", name
          gsub_file new_gemspec, "sample_plugin", folder_name
          gsub_file new_gemspec, "SamplePlugin", module_name

          gsub_file "package.json", "https://github.com/bridgetownrb/bridgetown-sample-plugin", "https://github.com/username/#{name}"
          gsub_file "package.json", "bridgetown-sample-plugin", name
          gsub_file "package.json", "sample_plugin", folder_name

          FileUtils.mv "lib/sample_plugin.rb", "lib/#{folder_name}.rb"
          gsub_file "lib/#{folder_name}.rb", "sample_plugin", folder_name
          gsub_file "lib/#{folder_name}.rb", "SamplePlugin", module_name

          FileUtils.mv "lib/sample_plugin", "lib/#{folder_name}"
          gsub_file "lib/#{folder_name}/builder.rb", "SamplePlugin", module_name
          gsub_file "lib/#{folder_name}/builder.rb", "sample_plugin", folder_name
          gsub_file "lib/#{folder_name}/version.rb", "SamplePlugin", module_name

          FileUtils.mv "test/test_sample_plugin.rb", "test/test_#{folder_name}.rb"
          gsub_file "test/test_#{folder_name}.rb", "SamplePlugin", module_name
          gsub_file "test/test_#{folder_name}.rb", "sample plugin", module_name
          gsub_file "test/helper.rb", "sample_plugin", folder_name
          gsub_file "test/fixtures/src/index.html", "sample_plugin", folder_name
          gsub_file "test/fixtures/config/initializers.rb", "sample_plugin", folder_name

          FileUtils.mv "components/sample_plugin", "components/#{folder_name}"
          FileUtils.mv "content/sample_plugin", "content/#{folder_name}"
          FileUtils.mv "layouts/sample_plugin", "layouts/#{folder_name}"

          gsub_file "layouts/#{folder_name}/layout.html", "sample_plugin", folder_name
          gsub_file "content/#{folder_name}/example_page.md", "sample_plugin", folder_name
          gsub_file "components/#{folder_name}/layout_help.liquid", "sample_plugin", folder_name

          gsub_file "components/#{folder_name}/plugin_component.rb", "SamplePlugin", module_name

          gsub_file "frontend/javascript/index.js", "sample_plugin", folder_name
          gsub_file "frontend/javascript/index.js", "SamplePlugin", module_name
          gsub_file "frontend/styles/index.css", "sample_plugin", folder_name
        end
        say ""
        say_status "Done!", "Have fun writing your new #{name} plugin :)"
        say_status "Remember:", "Don't forget to rename the SamplePlugin" \
                                " code identifiers and paths to your own" \
                                " identifier, as well as update your README" \
                                " and CHANGELOG files as necessary."
      end