Installing tkn-pac CLI
This guide covers multiple ways to install the tkn-pac CLI on your system.
Prerequisites
Before installing tkn-pac, ensure you have:
- Kubernetes cluster access (kubectl configured)
- Tekton Pipelines installed on your cluster (v0.50.0+)
Installation Methods
brew install openshift-pipelines/pipelines-as-code/tektoncd-pac
Homebrew (macOS/Linux)
The easiest way to install on macOS or Linux with Homebrew:
brew install openshift-pipelines/pipelines-as-code/tektoncd-pac
Upgrade to latest version:
brew upgrade openshift-pipelines/pipelines-as-code/tektoncd-pac
Binary Downloads
Download pre-built binaries from the releases page.
Available platforms:
- Linux: x86_64, ARM64 (tarballs, RPM, Debian packages)
- macOS: x86_64 (Intel), ARM64 (Apple Silicon)
- Windows: x86_64, ARM64
Linux (Debian/Ubuntu)
# Download .deb package
curl -LO https://github.com/openshift-pipelines/pipelines-as-code/releases/latest/download/tkn-pac_linux_amd64.deb
# Install
sudo dpkg -i tkn-pac_linux_amd64.deb
Linux (RHEL/Fedora/CentOS)
# Download .rpm package
curl -LO https://github.com/openshift-pipelines/pipelines-as-code/releases/latest/download/tkn-pac_linux_amd64.rpm
# Install
sudo rpm -i tkn-pac_linux_amd64.rpm
Windows
PowerShell:
# Download latest release
Invoke-WebRequest -Uri "https://github.com/openshift-pipelines/pipelines-as-code/releases/latest/download/tkn-pac-windows-amd64.exe" -OutFile "tkn-pac.exe"
# Move to PATH location
Move-Item tkn-pac.exe C:\Windows\System32\tkn-pac.exe
On Windows, tkn-pac looks for the Kubernetes config in %USERPROFILE%\.kube\config.
Container Image
Run tkn-pac directly from a container:
# Using Podman
podman run -e KUBECONFIG=/tmp/kube/config \
-v ${HOME}/.kube:/tmp/kube \
-it ghcr.io/openshift-pipelines/pipelines-as-code/tkn-pac:stable tkn-pac version
# Using Docker
docker run -e KUBECONFIG=/tmp/kube/config \
-v ${HOME}/.kube:/tmp/kube \
-it ghcr.io/openshift-pipelines/pipelines-as-code/tkn-pac:stable tkn-pac version
Available tags:
stable - Latest stable release
latest - Development build
v0.x.x - Specific version
Go Install
Install from source using Go:
go install github.com/openshift-pipelines/pipelines-as-code/cmd/tkn-pac@latest
Ensure $GOPATH/bin is in your PATH.
Arch Linux (AUR)
Install from the Arch User Repository:
Or with any other AUR helper:
Verification
Verify the installation:
Expected output:
Pipelines-as-Code version: v0.x.x
Shell Completion
Enable shell completion for better CLI experience:
# Generate completion script
tkn pac completion bash > /etc/bash_completion.d/tkn-pac
# Or for current user
tkn pac completion bash > ~/.tkn-pac-completion
echo 'source ~/.tkn-pac-completion' >> ~/.bashrc
Using as Tekton CLI Plugin
If you have the Tekton CLI (tkn) installed, tkn-pac can be used as a plugin:
# Both of these work identically
tkn pac list
tkn-pac list
The tkn CLI automatically discovers plugins named tkn-* in your PATH.
Updating
Homebrew
brew upgrade openshift-pipelines/pipelines-as-code/tektoncd-pac
Binary
Download and replace the binary with the latest version from the releases page.
go install github.com/openshift-pipelines/pipelines-as-code/cmd/tkn-pac@latest
Container
Pull the latest image:
podman pull ghcr.io/openshift-pipelines/pipelines-as-code/tkn-pac:stable
Uninstalling
Homebrew
brew uninstall tektoncd-pac
Binary
sudo rm /usr/local/bin/tkn-pac
Debian Package
RPM Package
Troubleshooting
Command Not Found
If you get “command not found” after installation:
-
Ensure the binary is in your
PATH:
-
Check if the binary is executable:
-
Try specifying the full path:
/usr/local/bin/tkn-pac version
Permission Denied
If you get permission errors:
# Make the binary executable
chmod +x tkn-pac
Kubeconfig Issues
If the CLI can’t connect to your cluster:
# Verify kubectl works
kubectl cluster-info
# Check kubeconfig location
echo $KUBECONFIG
# Specify kubeconfig explicitly
tkn pac --kubeconfig ~/.kube/config version
Next Steps
CLI Overview
Learn about available commands
Bootstrap
Set up your first installation