Skip to main content

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

CommandDescription
bootstrapBootstrap Pipelines-as-Code installation
createCreate a new Repository CRD
generateGenerate PipelineRun templates
listList Repository CRDs
describeDescribe a Repository and its runs
logsShow PipelineRun logs
resolveResolve PipelineRuns locally
webhookManage webhook configuration
versionDisplay CLI version

Installation

See the Installation Guide for detailed instructions on installing tkn-pac.

Usage Pattern

Most commands follow this pattern:
tkn pac <command> [subcommand] [flags] [arguments]

Examples

tkn pac list

Global Flags

Most commands support these common flags:
-n, --namespace
string
Kubernetes namespace to use (defaults to current context namespace)
-C, --no-color
boolean
Disable colored output
--kubeconfig
string
Path to kubeconfig file (defaults to ~/.kube/config)

Getting Help

You can get help for any command by adding --help or -h:
tkn pac --help
tkn pac create --help
tkn pac bootstrap github-app --help

Configuration

Kubeconfig

The CLI looks for Kubernetes configuration in:
  • Linux/macOS: $HOME/.kube/config
  • Windows: %USERPROFILE%\.kube\config
You can override this with the --kubeconfig flag or KUBECONFIG environment variable.

Environment Variables

VariableDescription
KUBECONFIGPath to kubeconfig file
PAC_PROVIDER_TOKENProvider token for resolve command
PAC_TEKTON_DASHBOARD_URLTekton Dashboard URL for logs command
TEKTON_DASHBOARD_URLAlternative 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

Build docs developers (and LLMs) love