CLI Overview
Pipelines-as-Code provides a powerful CLI designed to work as a plug-in to the Tekton CLI (tkn).What is tkn-pac?
tkn-pac (or tkn pac when used as a plugin) is the command-line interface for Pipelines-as-Code. It provides a comprehensive set of commands to manage your CI/CD pipelines, repositories, and infrastructure.
Key Features
- Bootstrap installations: Quickly set up Pipelines-as-Code on your cluster
- Repository management: Create, list, describe, and delete Repository CRDs
- Pipeline generation: Generate PipelineRun templates with language detection
- Logs and debugging: View logs and describe PipelineRun status
- Webhook management: Configure webhooks and tokens for Git providers
- Local testing: Resolve and test pipelines locally before pushing
Available Commands
| Command | Description |
|---|---|
bootstrap | Bootstrap Pipelines-as-Code installation |
create | Create a new Repository CRD |
generate | Generate PipelineRun templates |
list | List Repository CRDs |
describe | Describe a Repository and its runs |
logs | Show PipelineRun logs |
resolve | Resolve PipelineRuns locally |
webhook | Manage webhook configuration |
version | Display CLI version |
Installation
See the Installation Guide for detailed instructions on installingtkn-pac.
Usage Pattern
Most commands follow this pattern:Examples
Global Flags
Most commands support these common flags:Kubernetes namespace to use (defaults to current context namespace)
Disable colored output
Path to kubeconfig file (defaults to
~/.kube/config)Getting Help
You can get help for any command by adding--help or -h:
Configuration
Kubeconfig
The CLI looks for Kubernetes configuration in:- Linux/macOS:
$HOME/.kube/config - Windows:
%USERPROFILE%\.kube\config
--kubeconfig flag or KUBECONFIG environment variable.
Environment Variables
| Variable | Description |
|---|---|
KUBECONFIG | Path to kubeconfig file |
PAC_PROVIDER_TOKEN | Provider token for resolve command |
PAC_TEKTON_DASHBOARD_URL | Tekton Dashboard URL for logs command |
TEKTON_DASHBOARD_URL | Alternative Tekton Dashboard URL |
Next Steps
Install CLI
Get started by installing tkn-pac
Bootstrap Setup
Bootstrap your first installation
Create Repository
Create your first Repository CRD
Generate Pipeline
Generate a PipelineRun template