CLI

stagesetctl previews, renders, and drives StageSets without waiting for the next reconcile. It speaks to the cluster with your own kubeconfig — nothing about it runs in-cluster.

Installed on your PATH as kubectl-stageset, it also works as a kubectl plugin: kubectl stageset <command> is equivalent to stagesetctl <command>.

Installation

stagesetctl ships as a standalone binary attached to every GitHub release as stagesetctl_<version>_<os>_<arch>.tar.gz (.zip on Windows), for linux, darwin, and windows on amd64 and arm64. The binary inside the archive is named stagesetctl_v<version>.

Download the archive for your platform, extract it, and install the binary onto your PATH:

tar -xzf stagesetctl_<version>_<os>_<arch>.tar.gz
install -m 0755 stagesetctl_v<version> /usr/local/bin/stagesetctl

To use it as a kubectl plugin, expose it on your PATH as kubectl-stageset:

ln -s "$(command -v stagesetctl)" /usr/local/bin/kubectl-stageset

After that, kubectl stageset <command> works.

CommandPurpose
getPrint a StageSet’s status, or list StageSets.
buildRender a StageSet’s manifests to stdout.
diffPreview what a reconcile would change; usable as a CI gate.
planPreview what a reconcile would do — which actions run, skip, or re-run; usable as a CI gate.
applyServer-side-apply a StageSet’s rendered manifests directly.
reconcileForce an out-of-band reconcile.
lint-migrationsValidate a migration ladder before publishing it to a source.
baselineAssert a once-per-lifetime action already completed, or export a ledger’s completions.
reset-ledgerForget a StageLedger completion so its once-per-lifetime action runs again.

Global flags

Every command accepts the standard kubectl connection flags (genericclioptions.ConfigFlags): --kubeconfig, --context, -n/--namespace, --as, --as-group, --server, --token, --request-timeout, and the rest. --version prints the binary version and commit (<version> (commit <commit>)). With no -n/--namespace, the command uses the namespace from your current kubeconfig context, falling back to default.

Exit codes

Every command shares the same baseline:

CodeMeaning
0Success.
2Usage or flag error.
3Runtime error.

Two commands exit 1 for their own reason, so they can gate a CI pipeline: diff when it finds changes (the diff(1) convention), and lint-migrations when it finds a validation problem in a migration ladder.