Skip to main content

Creating a plugin marketplace for GitHub Copilot CLI

Puede hacer que los complementos de la CLI que haya creado sean fáciles de instalar si los agrega a un marketplace.

Introduction

Plugin marketplaces are registries of plugins for Copilot CLI. They can be located on GitHub.com, in any other online Git hosting service, or on your local or shared file system. By creating a marketplace and adding your plugins to it, you can make it easy for other users to find and install your plugins.

Nota:

You can find help on using plugins by entering copilot plugin [SUBCOMMAND] --help in the terminal.

Prerequisite

You have created one or more plugins that you want to share. See Creating a plugin for GitHub Copilot CLI.

Creating a plugin marketplace

  1. Create a marketplace.json file that provides metadata about your marketplace and lists the plugins that are available in the marketplace.

    Nota:

    The marketplace.json file is the only required component of a plugin marketplace. Adding it to a repository allows Copilot CLI to recognize the repository as a plugin marketplace, and provides an easy way for users to install plugins.

    Example marketplace.json file

    JSON
    {
      "name": "my-marketplace",
      "owner": {
        "name": "Your Organization",
        "email": "plugins@example.com"
      },
      "metadata": {
        "description": "Curated plugins for our team",
        "version": "1.0.0"
      },
      "plugins": [
        {
          "name": "frontend-design",
          "description": "Create a professional-looking GUI ...",
          "version": "2.1.0",
          "source": "./plugins/frontend-design"
        },
        {
          "name": "security-checks",
          "description": "Check for potential security vulnerabilities ...",
          "version": "1.3.0",
          "source": "./plugins/security-checks"
        }
      ]
    }
    

    Online examples:

    The top-level plugins field is an array of plugin objects, each containing metadata about a plugin, including its name, description, version, and source.

    The value of the source field for each plugin is the path to the plugin's directory, relative to the root of the repository. It is not necessary to use ./ at the start of the path. For example, "./plugins/plugin-name" and "plugins/plugin-name" resolve to the same directory.

    For details of the full set of fields you can include in this file, see GitHub Copilot CLI plugin reference.

  2. Add the marketplace.json file to the .github/plugin directory of a repository.

    Nota:

    Copilot CLI also looks for the marketplace.json file in the .claude-plugin/ directory.

  3. For each plugin defined in the marketplace.json file, add the relevant plugin directory to the appropriate location in the repository.

    For example, if your marketplace.json file includes a plugin with "source": "./plugins/frontend-design", add the frontend-design plugin directory to the plugins directory at the root of your repository.

  4. Share the repository with your intended users, and provide them with instructions to add the marketplace to Copilot CLI. For example, if your repository is hosted on GitHub in the octo-org/octo-repo repository, instruct users to enter:

    Shell
    copilot plugin marketplace add octo-org/octo-repo
    

Further reading