Using cf CLI Plugins
Page last updated:
Warning: VMware Tanzu Application Service for VMs (TAS for VMs) v2.9 is no longer supported because it has reached the End of General Support (EOGS) phase as defined by the Support Lifecycle Policy. To stay up to date with the latest software and security updates, upgrade to a supported version.
This topic describes using Cloud Foundry Command Line Interface (cf CLI) plugins.
The cf CLI includes plugin functionality. These plugins enable developers to add custom commands to the cf CLI.
You can install and use plugins that Cloud Foundry developers and third-party developers create. For a current list of community-supported plugins, see the Cloud Foundry Community CLI Plugin page. For information about submitting your own plugin, see the Cloud Foundry CLI Plugin Repository (CLIPR) repository on GitHub.
Warning: Plugins are not vetted in any way, including for security or functionality. Use plugins at your own risk.
The cf CLI identifies a plugin by its binary filename, its developer-defined plugin name, and the commands that the plugin provides. You use the binary filename only to install a plugin. You use the plugin name or a command for any other action.
Note: The cf CLI uses case-sensitive commands, but plugin management commands accept plugin and repository names irrespective of their casing.
By default, the cf CLI stores plugins on your workstation in
$CF_HOME/.cf/plugins, which defaults to
To change the root directory of this path from
$CF_HOME, you must set the
CF_PLUGIN_HOME environment variable.
The cf CLI appends
.cf/plugins to the
CF_PLUGIN_HOME path that you specify and stores plugins in that location. For example, if you set
/my-folder, cf CLI stores plugins in
To install a plugin:
Download a binary or the source code for a plugin from a trusted provider.
Note: The cf CLI requires a binary file compiled from source code written in Go. If you download source code, you must compile the code to create a binary.
cf install-plugin BINARY-FILENAME
BINARY-FILENAMEis the path to and name of your binary file.
Note: You cannot install a plugin that has the same name or that uses the same command as an existing plugin. If you attempt to do so, you are prompted to uninstall the existing plugin.
Note: The cf CLI prohibits you from implementing any plugin that uses a native cf CLI command name or alias. For example, if you attempt to install a third-party plugin that includes the
cf pushcommand, the cf CLI halts the installation.
For more information, see install-plugin in the Cloud Foundry CLI Reference Guide.
Use the contents of the
cf help CLI plugin management and Commands offered by installed plugins sections to manage plugins and run plugin commands.
To manage plugins and run plugin commands:
List all installed plugins and all commands that the plugins provide by running:
Execute a plugin command by running:
PLUGIN-COMMANDis the plugin command you want to execute.
To check all registered plugin repositories for newer versions of currently installed plugins:
cf plugins --outdated
See the output of the above command, as in the example below:
$ cf plugins --outdated Searching CF-Community, company-repo for newer versions of installed plugins... plugin version latest version coffeemaker 1.1.2 1.2.0 Use 'cf install-plugin' to update a plugin to the latest version.
For more information about the
cf plugins command, see cf plugins in the Cloud Foundry CLI Reference Guide.
To uninstall a plugin:
View the names of all installed plugins by running:
cf uninstall-plugin PLUGIN-NAME
PLUGIN-NAMEis the name of the plugin you want to uninstall.
Note: You must use the name of the plugin to uninstall it, not the binary filename.
For more information, see uninstall-plugin in the Cloud Foundry CLI Reference Guide.
To add a plugin repository:
cf add-plugin-repo REPOSITORY-NAME-URL
REPOSITORY-NAME-URLis the URL of the plugin repository you want to add.
For more information, see add-plugin-repo in the Cloud Foundry CLI Reference Guide.
To view your available plugin repositories:
For more information, see list-plugin-repos in the Cloud Foundry CLI Reference Guide.
To show all plugins from all available repositories:
For more information, see repo-plugins in the Cloud Foundry CLI Reference Guide.
The cf CLI provides the error messages described below to help you troubleshoot installation and usage issues. Third-party plugins can provide their own error messages.
If you receive a
permission denied error message, you lack required permissions to the plugin. You must have
execute permissions to the plugin binary file.
Plugin names and commands must be unique. The CLI displays an error message if you attempt to install a plugin with a non-unique name or command.
If the plugin has the same name or command as a currently installed plugin, you must first uninstall the existing plugin to install the new plugin.
If the plugin has a command with the same name as a native cf CLI command or alias, you cannot install the plugin.