Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drafted a basic doc for tkn-plugins to resolve issue #1273 #2255

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/tkn-plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Overview

The Tekton Command-Line Interface (CLI) `tkn` supports the usage of plugins, which extend its functionality beyond the built-in commands.

## Naming convention

Plugins for the Tekton Command-Line Interface (CLI) should adhere to the naming convention where their names have the prefix `tkn-`. This prefix helps distinguish plugins from regular commands within the CLI environment.

## Location

These plugins reside in specific directories on the user's system. By default, the Tekton CLI looks for plugins in the directory `~/.config/tkn/plugins`. However, users can customize the location of plugin directories by setting the `TKN_PLUGINS_DIR` environment variable. Additionally, the CLI respects the `XDG_CONFIG_HOME` environment variable, which specifies the base directory for user-specific configuration files. If set, the CLI will look for plugins in the directory ` $XDG_CONFIG_HOME/tkn/plugins`.

## Running

Running Tekton CLI plugins is straightforward. Once the plugins are installed in the designated plugin directory, users can invoke them just like any other Tekton CLI command. For example, to run a plugin named `tkn-myplugin`, users can simply type `tkn myplugin` in the terminal. The CLI will search for the plugin binary in the plugin directories and execute it if found. If the plugin is not found in the plugin directories, the CLI will fall back to executing the core Tekton CLI commands.

Loading