CLIPR is a server that the CloudFoundry CLI can interact with to browse and install plugins. This documentation covers how to run CLIPR itself, as well as how to create your own implementation if desired.
git clone
orgo get
this repo
- To Git clone, you need to have git installed
Clone this repo
git clone https://github.com/cloudfoundry/cli-plugin-repo
- Push CLIPR to your instance of Cloud Foundry by doing
cf push
at the root of CLIPR
- Install Go
- Ensure your $GOPATH is set correctly
- Use
go build
to build the binary, here is an example in OSX/Linux which produces an executable calledclipr
$ go build -o clipr ./
- Invoke the binary
./clipr
with the following options
-n
: IP Address for the server to listen on, default is0.0.0.0
-p
: Port number for the server to listen on, default is8080
Once you have a CLIPR server running, either as a Cloud Foundry app or a stand alone server
- Add the running server to your CLI via the
add-plugin-repo
command, for example,cf add-plugin-repo local-repo http://localhost:8080
- Browse & install plugins from CLI. Alternatively, you can point your browser at the server address, for example,
http://localhost:8080
to see a listing of plugins
- Install Go
- Ensure your $GOPATH is set correctly
- Get the CLIPR source code:
go get code.cloudfoundry.org/cli-plugin-repo
- Fork the repository
- Add your fork as a remote:
cd $GOPATH/src/code.cloudfoundry.org/cli-plugin-repo
git remote add your_name https://github.com/your_name/cli-plugin-repo
Alternatively, you can create your own plugin repo implementation. The server must meet the requirements:
- server must have a
/list
endpoint which returns a JSON object that lists the plugin info in the correct form
{"plugins": [
{
"name":"echo",
"description":"echo repeats input back to the terminal",
"version":"0.1.4",
"date":"0001-01-01T00:00:00Z",
"company":"",
"author":"",
"contact":"feedback@email.com",
"homepage":"https://github.com/johndoe/plugin-repo",
"binaries": [
{
"platform":"osx",
"url":"https://github.com/johndoe/plugin-repo/raw/main/bin/osx/echo",
"checksum":"2a087d5cddcfb057fbda91e611c33f46"
},
{
"platform":"win64",
"url":"https://github.com/johndoe/plugin-repo/raw/main/bin/windows64/echo.exe",
"checksum":"b4550d6594a3358563b9dcb81e40fd66"
}
]
}
]}
- To see a live example of the JSON object, browse to http://plugins.cloudfoundry.org/list