// Module included in the following assemblies:
//
// * cli_reference/cli_manager/cli-manager-install.adoc

:_mod-docs-content-type: PROCEDURE
[id="cli-manager-adding-plugin-yamls_{context}"]
= Adding a plugin to the {cli-manager}

[role="_abstract"]
You can add a CLI plugin to the {cli-manager} by creating a new plugin resource in the {product-title} web console's YAML view.

.Prerequisites

* You are logged in to {product-title} as a user with the `cluster-admin` role.
* The {cli-manager} is installed.

.Procedure

. Log in to the {product-title} web console.

. Navigate to *Ecosystem* -> *Installed Operators*.

. From the list, select *{cli-manager}*.

. Select the *CLI Plugin* tab.

. Click *Create Plugin*.

. In the text box, enter the information for the plugin you are installing. See the following example YAML file.
+
.Example YAML file to add a plugin

[source,yaml]
----
apiVersion: config.openshift.io/v1alpha1
kind: Plugin
metadata:
  name: <plugin_name>
spec:
  description: <description_of_plugin>
  homepage: <plugin_homepage>
  platforms:
  - bin:
    files:
    - from: <plugin_file_path>
      to: .
    image: <plugin_image>
    imagePullSecret:
    platform: <platform>
  shortDescription: <short_description_of_plugin>
  version: <version>
----
+
where:
+
--
`<plugin_name>`:: Specifies the name of the plugin you plan to use in commands.
`bin`:: Specifies the path to the plugin executable.
`imagePullSecret`:: Optional field if the registry is not public to add a pull secret to access your plugin image.
`<platform>`:: Add the architecture for your system; for example, `linux/amd64`, `darwin/arm64`, `windows/amd64`, or another architecture.
`<version>`:: The version must be in v0.0.0 format.
--

. Click *Save*.

.Verification

* Enter the following command to see if the plugin is listed and has been added successfully:

[source,terminal]
----
$ oc get plugin/<plugin_name> -o yaml
----

* Example output:

[source,terminal]
----
<plugin_name> ready to be served.
----
