rpk plugin

List, download, update, and remove rpk plugins.

Plugins augment rpk with new commands.

For a plugin to be used, it must be in $HOME/.local/bin or somewhere discoverable by rpk in your $PATH. All plugins follow a defined naming scheme:

.rpk-<name> .rpk.ac-<name>.

All plugins are prefixed with either .rpk- or .rpk.ac-. When rpk starts up, it searches all directories in your $PATH for any executable binary that begins with either of those prefixes. For any binary it finds, rpk adds a command for that name to the rpk command space itself.

No plugin name can shadow an existing rpk command, and only one plugin can exist under a given name at once. Plugins are added to the rpk command space on a first-seen basis. If you have two plugins` rpk-foo`, and the second is discovered later on in the $PATH directories, then only the first will be used. The second will be ignored.

Plugins that have an .rpk.ac- prefix indicate that they support the --help-autocomplete flag. If rpk sees this, rpk will exec the plugin with that flag when rpk starts up, and the plugin will return all commands it supports as well as short and long help test for each command. rpk uses this return to build a shadow command space within rpk itself so that it looks as if the plugin exists within rpk. This is particularly useful if you enable autocompletion.

The expected return for plugins from --help-autocomplete is an array of the following:

type pluginHelp struct { Path string json:"path,omitempty" Short string json:"short,omitempty" Long string json:"long,omitempty" Example string json:"example,omitempty" Args []string json:"args,omitempty" }.

where path is an underscore delimited argument path to a command. For example, "foo_bar_baz" corresponds to the command rpk foo bar baz.

Usage

rpk plugin [flags]

Subcommands

Command Description

rpk plugin install

Install an rpk plugin. An rpk plugin must be saved in $HOME/.local/bin or in a directory that is in your $PATH.

rpk plugin list

List all available plugins. By default, this command fetches the remote manifest and prints plugins available for download.

rpk plugin uninstall

Uninstall / remove an existing local plugin. This command lists locally installed plugins and removes the first plugin that matches the requested removal.

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.