JFrog CLI plugins enhance the functionality of JFrog CLI to meet specific user and organization needs. The source code of a plugin is maintained as an open-source Go project on GitHub. All public plugins are registered in JFrog CLI's Plugins Registry. We encourage developers to create plugins and share them publicly with the community. When a plugin is included in the registry, it becomes publicly available and can be installed using JFrog CLI.
Installing Plugins
A plugin which is included JFrog CLI's Plugins Registry can be installed using the following command.
$ jf plugin install the-plugin-name
This command will install the plugin from the official public registry by default. You can also install a plugin from a private JFrog CLI Plugin registry, as described in thePrivate Plugins Registriessection.
Private Plugins Registries
In addition to the public official JFrog CLI Plugins Registry, JFrog CLI supports publishing and installing plugins to and from private registries. A private registry can be hosted on any Artifactory server and uses a local generic Artifactory repository for storing the plugins.
To create your own private plugins registry:
On your Artifactory server, create a local generic repository named
jfrog-cli-plugins.Verify that your Artifactory server is configured in JFrog CLI by running the
jf c showcommand.If needed, configure your Artifactory instance using the
jf c addcommand.Set the ID of the configured server as the value of the
JFROG_CLI_PLUGINS_SERVERenvironment variable.To use a repository name other than
jfrog-cli-plugins, set the custom name as the value of theJFROG_CLI_PLUGINS_REPOenvironment variable.
The jf plugin install command will now install plugins stored in your private registry.
To publish a plugin to your private registry, run the following command from the root directory of the plugin's source code. This command builds the plugin's source for all supported operating systems, and all binaries will be uploaded to the configured private registry.
jf plugin publish the-plugin-name the-plugin-version