Public repository for community created CF CLI plugins.
Switch branches/tags
Nothing to show
Clone or download
tjvman Serialize deploys of cli-plugin-repo
We noticed build failures that were caused by multiple PRs being merged
in quick succession and trying to redeploy the plugin repo app. Multiple
deploys running at the same time caused deploy failures. We are
serializing the deploy job to avoid this problem in future.
Latest commit 01f000a Nov 26, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Use tedsuo/rata and jessevdk/go-flags Apr 19, 2016
ci Serialize deploys of cli-plugin-repo Nov 26, 2018
docs updated cli-plugin-repo github path Nov 3, 2017
fixtures Update test for main to use real fixture, actual html file Apr 25, 2016
pluginrunner test to validate plugin names Apr 25, 2018
sort switch to using Nov 27, 2017
ui add "use at your own risk" text to plugin sidebar Dec 19, 2017
vendor don't use a regex, use semver Apr 19, 2018
web test to validate platform values in index yaml Jun 24, 2016
.cfignore clipr is now a cf app Feb 5, 2015
.gitallowed Update to provided go buildpack on PWS Jun 1, 2016
.gitignore Fix tests Apr 8, 2016
.travis.yml bump Mar 20, 2018
Gopkg.lock test to validate plugin names Apr 25, 2018
Gopkg.toml don't use a regex, use semver Apr 19, 2018
LICENSE replace with canonical version (from… Jan 11, 2017
NOTICE updated per Chip's instructions Oct 26, 2016
Procfile Force SSL for non HTTP requests Apr 21, 2016 require versioned URLs for download links Jun 5, 2018
clipr.go switch to using Nov 27, 2017
main.go Reorganize package locations Apr 19, 2016
main_suite_test.go switch to using Nov 27, 2017
main_test.go Update test for main to use real fixture, actual html file Apr 25, 2016
manifest.yml manifest uses routes and Nov 27, 2017
repo-index.yml Merge pull request #269 from ArthurHlt/patch-1 Nov 26, 2018
repo_index_test.go Remove plugins that do not have versioned URLs Jul 17, 2018
routes.go Fix routing Apr 25, 2016

Cloud Foundry CLI Plugin Repository (CLIPR)Build Status

This is a public repository for community created CF CLI plugins. To submit your plugin approval, please submit a pull request according to the guidelines below.

Submitting Plugins

  1. You need to have git installed
  2. Clone this repo git clone
  3. Include your plugin information in repo-index.yml, here is an example of a new plugin entry
- authors:
  - contact:
    name: Sample-Author
  - checksum: 2a087d5cddcfb057fbda91e611c33f46
    platform: osx
  - checksum: b4550d6594a3358563b9dcb81e40fd66
    platform: win64
  - checksum: f6540d6594a9684563b9lfa81e23id93
    platform: linux32
  created: 2015-01-31T00:00:00Z
  description: new_plugin to be made available for the CF community
  name: new_plugin
  updated: 2015-01-31T00:00:00Z
  version: 1.0.0

Please make sure the spacing and colons are correct and that the fields are alphabetized in the entry. The following describes each field's usage.

Field Description
authors Fields to detail the authors of the plugin
name: name of author
homepage: Optional link to the homepage of the author
contact: Optional ways to contact author, email, twitter, phone etc ...
binaries This section has fields detailing the various binary versions of your plugin. To reach as large an audience as possible, we encourage contributors to cross-compile their plugins on as many platforms as possible. Go provides everything you need to cross-compile for different platforms
platform: The os for this binary. Supports osx, linux32, linux64, win32, win64
url: A versioned HTTPS link to the binary file itself
checksum: SHA-1 of the binary file for verification
Use a unique URL that includes the release version for each release of your plugin, as each binary will have a unique checksum.
company Optional field detailing company or organization that created the plugin
created date of first submission of the plugin, in iso 8601 combined date and time with timezone format
description describe your plugin in a line or two. this description will show up when your plugin is listed on the command line
homepage Link to the homepage where the source code is hosted. Currently we only support open source plugins
name name of your plugin, must not conflict with other existing plugins in the repo. It must also match the name your plugin returns.
updated Date of last update of the plugin, in ISO 8601 Combined Date and Time with Timezone Format
version version number of your plugin, in [major].[minor].[build] form
  1. run go run sort/main.go repo-index.yml. This will sort your additions to the file.

  2. After making the changes, fork the repository

  3. Add your fork as a remote

    cd $GOPATH/src/
    git remote add your_name
  4. Push the changes to your fork and submit a Pull Request

Releasing Plugins

Cross-compile to the 3 different operating systems

Golang supports cross compilation to several systems and architectures. Theres an in-depth article by Dave Cheney here explaining how to do it and how it works. You can also find a list of supported systems and architectures here under the $GOOS and $GOARCH section.

The CF cli supports 5 combinations:

  • linux/386 (known as linux32)
  • linux/amd64 (known as linux64)
  • windows/386 (known as win32)
  • windows/amd64 (known as win64)
  • darwin /amd64 (known as osx)

And at a minimum we want plugins to support linux64, win64 and osx.

So, with all that, you can generate those binaries for your plugin with the following snippet:


GOOS=linux GOARCH=amd64 go build -o ${PLUGIN_NAME}.linux64
GOOS=linux GOARCH=386 go build -o ${PLUGIN_NAME}.linux32
GOOS=windows GOARCH=amd64 go build -o ${PLUGIN_NAME}.win64
GOOS=windows GOARCH=386 go build -o ${PLUGIN_NAME}.win32
GOOS=darwin GOARCH=amd64 go build -o ${PLUGIN_NAME}.osx

Sign Windows binaries

By signing the plugin binary, you can assure recipients that it did indeed come from you.
Although an optional step, unsigned binaries often cannot be used in locked-down machines common in organizations with stricter security policies. Signing the binary allows system admins to whitelist the plugin by signature or publisher.

The cf CLI binary is signed using a Cloud Foundry Foundation certificate. This certificate cannot be used to sign third-party plugins; plugin authors need to procure their own code-signing certificate.

You’ll need a code-signing certificate compatible with Microsoft Authenticode issued by a Microsoft-authorized certificate authority such as Thawte, Comodo, Symantec, or Digicert. A standard code signing certificate is sufficient - extended validation (EV) is not required. Buying direct from these CAs can be expensive. There are many resellers of certificates that pass on savings they get from volume discounts; you can shop around for a good price or support but fundamentally they’re all selling the same thing. You should expect an average price of between USD 80 and USD 150 for a one-year cert.

Once the certificate is obtained, refer to the following steps to sign your plugin binary.


mkdir signed-binaries
osslsigncode sign \
  -pkcs12 $CERT_LOCATION \
  -pass $CERT_PASSWORD \
  -t \
  -h sha256 \
  -out signed-binaries/${PLUGIN_BINARY_NAME}


Checksums in the repo-index.yml file are used to verify the integrity of the binaries, to prevent corrupted downloads from being installed. We use the sha-1 checksum algorithm, you can compute it with: shasum -a 1 <myfile>

So continuing the above snipped you'd do:

shasum -a 1 ${PLUGIN_NAME}.linux64
shasum -a 1 ${PLUGIN_NAME}.linux32
shasum -a 1 ${PLUGIN_NAME}.win64
shasum -a 1 ${PLUGIN_NAME}.win32
shasum -a 1 ${PLUGIN_NAME}.osx

Take note of those so that you can put them on repo-index.yml later when you have uploaded the binaries.

Release the binary publicly

You could use whatever file hosting you like here, the easiest and recommended one is GitHub releases, given that your plugin's code is already hosted on GitHub it might be the easiest solution too.

You can read more about GitHub Releases here but for the purposes of releasing your plugin you should upload those five binaries generated above on the same release.

You should then copy the resulting links for the uploaded binaries from the release page and put them on the repo-index.yml file.

This process can get a little tedious if you do it manually every time, that's why some plugin developers have automated it. You can probably put together scripts based on the snippets above to automate compiling, generating checksums and uploading the release to GitHub. There are tools available to manage GitHub releases such as this one.

Running your own Plugin Repo Server

Included as part of this repository is the CLI Plugin Repo (CLIPR), a reference implementation of a repo server. For information on how to run CLIPR or how to write your own, please see the CLIPR documentation here.