Skip to main content

Creating a plugin marketplace for GitHub Copilot 명령 줄 인터페이스 (CLI)

You can make CLI plugins that you've created easy to install by adding them to a marketplace.

이 문서의 내용

Introduction

Plugin marketplaces are registries of plugins for 부조종사 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.

참고 항목

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.

    참고 항목

    The marketplace.json file is the only required component of a plugin marketplace. Adding it to a repository allows 부조종사 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.

    참고 항목

    부조종사 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 부조종사 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