- Notifications
You must be signed in to change notification settings - Fork257
A CLI for interacting with Tekton!
License
tektoncd/cli
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
TheTekton Pipelines CLI project provides a command-line interface (CLI) for interacting withTekton, an open-source framework for Continuous Integration and Delivery (CI/CD) systems.
Download the latest binary executable for your operating system.
- UseHomebrew
brew install tektoncd-cli
# Get the tar.xzcurl -LO https://github.com/tektoncd/cli/releases/download/v0.40.0/tkn_0.40.0_Darwin_all.tar.gz# Extract tkn to your PATH (e.g. /usr/local/bin)sudo tar xvzf tkn_0.40.0_Darwin_all.tar.gz -C /usr/local/bin tkn
- UseChocolatey
choco install tektoncd-cli --confirm
- UseScoop
scoop install tektoncd-cli
#Create directoryNew-Item-Path"$HOME/tektoncd/cli"-Type Directory# Download fileStart-BitsTransfer-Source https://github.com/tektoncd/cli/releases/download/v0.40.0/tkn_0.40.0_Windows_x86_64.zip-Destination"$HOME/tektoncd/cli/."# Uncompress zip fileExpand-Archive$HOME/tektoncd/cli/*.zip-DestinationPath C:\Users\Developer\tektoncd\cli\.#Add to Windows `Environment Variables`[Environment]::SetEnvironmentVariable("Path",$($env:Path+";$Home\tektoncd\cli"),'User')
# Get the tar.xzcurl -LO https://github.com/tektoncd/cli/releases/download/v0.40.0/tkn_0.40.0_Linux_x86_64.tar.gz# Extract tkn to your PATH (e.g. /usr/local/bin)sudo tar xvzf tkn_0.40.0_Linux_x86_64.tar.gz -C /usr/local/bin/ tkn
# Get the tar.xzcurl -LO https://github.com/tektoncd/cli/releases/download/v0.40.0/tkn_0.40.0_Linux_aarch64.tar.gz# Extract tkn to your PATH (e.g. /usr/local/bin)sudo tar xvzf tkn_0.40.0_Linux_aarch64.tar.gz -C /usr/local/bin/ tkn
# Get the tar.gzcurl -LO https://github.com/tektoncd/cli/releases/download/v0.40.0/tkn_0.40.0_Linux_s390x.tar.gz# Extract tkn to your PATH (e.g. /usr/local/bin)sudo tar xvzf tkn_0.40.0_Linux_s390x.tar.gz -C /usr/local/bin/ tkn
# Get the tar.gzcurl -LO https://github.com/tektoncd/cli/releases/download/v0.40.0/tkn_0.40.0_Linux_ppc64le.tar.gz# Extract tkn to your PATH (e.g. /usr/local/bin)sudo tar xvzf tkn_0.40.0_Linux_ppc64le.tar.gz -C /usr/local/bin/ tkn
If you are running on any of the following rpm based distros:
- Latest Fedora and the two versions behind.
- Centos Stream
- EPEL
- Latest RHEL
you would be able to use@chmouel's unofficial copr packagerepository by running the following commands:
dnf coprenable chmouel/tektoncd-clidnf install tektoncd-cli
On any other RPM based distros, you can install the rpm directly:
rpm -Uvh https://github.com/tektoncd/cli/releases/download/v0.40.0/tektoncd-cli-0.40.0_Linux-64bit.rpm
If you are running on the latest rolling Ubuntu or Debian, you can use the TektonCD CLI PPA:
sudo apt update;sudo apt install -y gnupgsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3EFE0E0A2F2F60AAecho"deb http://ppa.launchpad.net/tektoncd/cli/ubuntu oracular main"|sudo tee /etc/apt/sources.list.d/tektoncd-ubuntu-cli.listsudo apt update&& sudo apt install -y tektoncd-cli
The PPA may work with older releases, but that hasn't been tested.
On any other Debian or Ubuntu based distro, you can simply install the binary package directly withdpkg
:
curl -LO https://github.com/tektoncd/cli/releases/download/v0.40.0/tektoncd-cli-0.40.0_Linux-64bit.debdpkg -i tektoncd-cli-0.40.0_Linux-64bit.deb
You can installtektoncd-cli
fromnixpkgs on any system that supports thenix
package manager.
nix-env --install tektoncd-cli
You can installtekton-cli
from the official arch package repository :
pacman -S tekton-cli
You can install the latest tektoncd-cli if you are usingHomebrew on Linux as for the osx version you need to simply do :
brew install tektoncd-cli
If you havego installed and you want to compile the CLI from source, you can checkout theGit repository and run the following commands:
make bin/tkn
This will output thetkn
binary inbin/tkn
kubectl
will find any binary namedkubectl-*
on your PATH and consider it as a plugin.After installing tkn, create a link as kubectl-tkn
ln -s /usr/local/bin/tkn /usr/local/bin/kubectl-tkn
For Mac OS X with Homebrew
ln -s$(brew --prefix)/opt/tektoncd-cli/bin/tkn /usr/local/bin/kubectl-tkn
Run the following to confirm tkn is available as a plugin:
kubectl plugin list
You should see the following after running kubectl plugin list if tkn is available as a plugin:
/usr/local/bin/kubectl-tkn
If the output above is shown, run kubectl-tkn to see the list of available tkn commands to run.
The following commands help you understand and effectively use the Tekton CLI:
tkn help:
Displays a list of the commands with helpful information.tkn bundle:
Manage Tektonbundlestkn clustertask:
Parent command of the ClusterTask command group.tkn clustertriggerbinding:
Parent command of the ClusterTriggerBinding command group.tkn completion:
Outputs a BASH, ZSH, Fish or PowerShell completion script fortkn
to allow command completion with Tab.tkn customrun:
Parent command of the Customrun command group.tkn eventlistener:
Parent command of the Eventlistener command group.tkn hub:
Search and install Tekton Resources fromHubtkn pipeline:
Parent command of the Pipeline command group.tkn pipelinerun:
Parent command of the Pipelinerun command group.tkn task:
Parent command of the Task command group.tkn taskrun:
Parent command of the Taskrun command group.tkn triggerbinding:
Parent command of the Triggerbinding command group.tkn triggertemplate:
Parent command of the Triggertemplate command group.tkn version:
Outputs the cli version.
For everytkn
command, you can use-h
or--help
flags to display specific help for that command.
For manytkn
commands, color and emojis by default will appear in commandoutput.
It will only shows if you are in interactive shell with astandardinputattached. If you pipe the tkn command or run it in a non interactive way (ie:from tekton itself in a Task) the coloring and emojis willalways be disabled.
tkn
offers two approaches for disabling color and emojis from command output.
To remove the color and emojis from alltkn
command output, set the environment variableNO_COLOR
, such as shown below:
export NO_COLOR=""
More information onNO_COLOR
can be found in theNO_COLOR
documentation.
To remove color and emojis from the output of a single command execution, the--no-color
option can be used with any command,such as in the example below:
tkn taskrun describe --no-color
We are so excited to have you!
- SeeCONTRIBUTING.md for an overview of our processes
- SeeDEVELOPMENT.md for how to get started
- SeeROADMAP.md for the current roadmap
- See [releases.md][releases.md] for our release cadence and processes
- Look at ourgood first issuesand ourhelp wanted issues
About
A CLI for interacting with Tekton!