Publish JFrog CLI Plugins to a Registry

Publish a JFrog CLI plugin to the JFrog CLI Plugins Registry. You run this command from the plugin's directory.

📘

Before you begin

The Go programming language must be installed and on your PATH. The publish command compiles your plugin source into binaries during upload. A JFrog CLI server configuration must exist for your target registry. Run jf config show to confirm. For a private registry, add one with jf config add. Your plugin project must follow the Plugin Developer Guide structure as a Go binary with specific entry points. The JFROG_CLI_PLUGINS_SERVER environment variable is required for this command. There is no default publish target. You must explicitly specify the destination server.

Synopsis

jf plugin publish <plugin-name> <plugin-version> [options]

Aliases: plugin p

Arguments

The following table lists jf plugin publish arguments.

ArgumentRequiredDescription
<plugin-name>YesName of the plugin to publish
<plugin-version>YesVersion of the plugin to publish. Must exactly match the version string declared in your plugin's App.Version field, including any v prefix (for example, v1.2.0)

Options

The following table lists jf plugin publish options.

FlagShortDefaultDescription
--formatOutput format. Available from JFrog CLI 2.105.0. Only json is supported (table is not accepted). With --format json the command emits {"status_code":N,"message":"..."}. Passing --format alone returns Incorrect Usage: flag needs an argument: -format; passing an unsupported value (for example, --format=table) returns [🚨Error] only the following output formats are supported: json.

Environment Variables

The following table lists environment variables for jf plugin publish.

VariableDefaultRequiredDescription
JFROG_CLI_PLUGINS_SERVERNoneYesConfigured JFrog Artifactory server identifier to publish the plugin to. Use jf config show to list servers.
JFROG_CLI_PLUGINS_REPOjfrog-cli-pluginsNoRepository name on the target server. Use with JFROG_CLI_PLUGINS_SERVER for a custom registry.

Examples

Show Help

To show publish command help:

  • Run the following command.

    jf plugin publish --help

Publish a Plugin

To publish a plugin to your configured registry:

  1. Set the target server ID and change to your plugin root directory.

  2. Run:

    export JFROG_CLI_PLUGINS_SERVER=<server-id>
    cd <plugin-root-directory>
    jf plugin publish <plugin-name> <plugin-version>

    Where:

    • <server-id> — JFrog CLI server identifier for the JFrog Artifactory instance that hosts the plugins repository.
    • <plugin-root-directory> — Path to the root of your plugin source tree.
    • <plugin-name> — Plugin name. This value must match your project.
    • <plugin-version> — Version string matching App.Version, such as v1.2.0.

    For example:

    export JFROG_CLI_PLUGINS_SERVER=my-server
    cd /path/to/my-awesome-plugin
    jf plugin publish my-awesome-plugin v1.2.0

Expected output:

[Info] Verifying version uniqueness...
[Info] Building plugin for: <os>-<arch>...
[Info] Verifying versions matching...
[Info] Publishing my-awesome-plugin:v1.2.0 to my-server...

Publish to Custom Registry

To publish using a non-default repository name:

  1. Set both environment variables, then publish from the plugin root:

    export JFROG_CLI_PLUGINS_SERVER=<server-id>
    export JFROG_CLI_PLUGINS_REPO=<repository-name>
    cd <plugin-root-directory>
    jf plugin publish <plugin-name> <plugin-version>

    Where:

    • <server-id> — JFrog CLI server identifier.
    • <repository-name> — Local generic repository name for plugins on that server.
    • <plugin-root-directory> — Path to your plugin source root.
    • <plugin-name> — Plugin name.
    • <plugin-version> — Version to publish.

    For example:

    export JFROG_CLI_PLUGINS_SERVER=my-server
    export JFROG_CLI_PLUGINS_REPO=my-plugins-repo
    cd /path/to/my-awesome-plugin
    jf plugin publish my-awesome-plugin v1.2.0

When to Use

Use jf plugin publish when you have developed a JFrog CLI plugin and want to share it through the plugins registry or your organization's private registry.

Important Notes

  • Run this command from the root directory of your plugin source code.
  • Go is required. JFrog CLI compiles your plugin source into binaries for each target platform during publish. Ensure the go command is installed and on your PATH.
  • JFROG_CLI_PLUGINS_SERVER is mandatory. The command fails immediately if this environment variable is not set.
  • Version must match exactly. The <plugin-version> argument must exactly match the version string declared in your plugin's App.Version field, including any v prefix. When your plugin declares app.Version = "v1.2.0", pass v1.2.0, not 1.2.0.
  • The plugin must conform to the JFrog CLI plugin structure as a Go binary with specific entry points. For requirements, see the Plugin Developer Guide.
  • Publishing to the official registry requires the plugin to be accepted into the jfrog-cli-plugins-reg repository.
  • For private registries, set both JFROG_CLI_PLUGINS_SERVER and JFROG_CLI_PLUGINS_REPO.
  • After publishing, verify the plugin works by installing it. For more information, see jf plugin install.

What’s Next

To verify the installation, see Install JFrog CLI Plugins.

Did this page help you?