Skip to content
This repository was archived by the owner on Oct 31, 2019. It is now read-only.

Plugins

chris edited this page Aug 25, 2018 · 6 revisions

Install, uninstall, update and list plugins

To manage a plugin, use the appropriate commands:

# install, uninstall and update a plugin
project plugins [install|uninstall|update] VENDOR/REPOSITORY

VENDOR/REPOSITORY is basically the Github URI to the according repository. If you want to manage external Git repositories, then use the complete URL instead of just the URI. For example:

project plugins install https://github.com/chriha/pro-cli-jenkins.git

List installed plugins

To list all your installed plugins:

project plugins show -i

List and search available plugins

To list all available plugins:

project plugins show -a

To search available plugins:

project plugins search [YOUR_SEARCH]

Writing a plugin

You can write your own plugin for pro-cli.

Plugins are included after initialisation and will / can overwrite existing commands!

Plugins need to have at least the plugin.sh to get included:

.
│── plugins
│   └── YOUR_PLUGIN
│       ├── help.sh
│       └── plugin.sh

The help.sh file will be included to show available commands:

#!/usr/bin/env bash

printf "YOUR PLUGIN COMMANDS:\n"
printf "    ${BLUE}lorem${NORMAL}${HELP_SPACE:5}Run an example command.\n"

Look into bootstrap.sh to see which variables are available.

Plugin Order

If you like to change the order of when your plugin should be included, you can use numbers in the beginning of your plugin directory like 10_lorem. Keep in mind, that you have to update the plugins manually by changing into their directory and pull the latest version via git pull.

Available Plugins

For a full list of plugins see pro-cli/plugins

Clone this wiki locally