Command reference

Every piceli command with its options and its contract: what it reads and writes, whether it contacts a cluster, whether it needs approval and whether it is safe to retry. The same data is available as JSON from piceli help-json (or piceli --help-json).

Conventions

  • stdout is for machine output: one JSON object (JSON lines for streaming commands; render prints YAML manifests unless --format json).

  • stderr is for human text: summaries and hints.

  • A refusal prints {"state": "rejected", "reason": "<code>", "message": "<text>"} and exits 2; see Error codes or run piceli explain <code>.

  • Output contract conforms means the command follows these rules exactly; partial (no command since 0.5.1) means it prints JSON but its refusals do not yet use the rejection shape above.

Exit code

Meaning

0

success

1

the operation ran but did not succeed (not ready, drift, build failed)

2

rejected before any change (stdout: the rejection object)

3

approval required; nothing was executed

75

builder serve: the controller runs another Piceli version; install it and start again (nothing was claimed)

Commands

Command

Summary

Cluster

Approval

piceli access

Forward the app’s declared ports to 127.0.0.1 and keep them healthy.

reads

no

piceli access stop

Stop Piceli’s stale forwards and servers for the app; never another process.

none

no

piceli access ui

Open the UI that piceli cluster init installed: forward it and print its URL.

reads

no

piceli artifacts build

Assemble an OCI image layout from a plan without running code.

none

no

piceli artifacts build-spec preview

Preview a containerized build and its plan hash.

none

no

piceli artifacts build-spec run

Run an approved containerized build and write a receipt.

none

yes

piceli artifacts copy

Copy an image by digest (index, every platform, SBOM, provenance, signatures) to another registry.

none

yes

piceli artifacts copy-job-run

What the in-cluster copy Job runs: copy the mounted set, record each result.

none

no

piceli artifacts deliver

Deliver a digest-approved image to a registry or node.

reads

yes

piceli artifacts execute-command

Run a pinned external build command under an approved plan.

none

yes

piceli artifacts fetch-file

Download one published file (a blob) by its digest and check it.

none

no

piceli artifacts import-local

Import an OCI layout into the local Docker daemon.

none

yes

piceli artifacts inspect

Recheck an OCI layout and print its summary.

none

no

piceli artifacts pin

Pin one public source file by digest.

none

no

piceli artifacts preview

Preview a deterministic OCI build plan (no tools run).

none

no

piceli artifacts preview-command

Preview a pinned external build command.

none

no

piceli artifacts publish

Publish a build’s images (every platform in one index) to a registry.

none

yes

piceli artifacts publish-files

Publish local files as one OCI artifact (each file one layer, by its sha256).

none

yes

piceli artifacts retention

Report which registry manifests the last releases, pins and live workloads keep, and delete the rest.

reads

yes

piceli build job

Build at a commit as a Job on a builder node (plan, then –approve HASH).

writes

yes

piceli build job-run

Inside the build Job: build and push; print the receipt line.

none

no

piceli builder install

Run builder serve as a service on this machine (systemd or launchd).

reads

no

piceli builder serve

Take the builds the controller publishes, build and deliver them, answer it.

writes

no

piceli builder status

List the build hosts the controller heard from and what each last did.

reads

no

piceli builder uninstall

Stop, disable and remove the build host service builder install wrote.

none

no

piceli bundle

Package the app for a cluster Piceli never accesses (kustomize, prepare.sh, images; or a Helm chart).

none

yes

piceli cache prune

Remove what no release, rollback or resume needs: stale temporary directories and partial files, runs beyond –keep-last, unused delivery receipts, and (over –budget) build outputs and logs.

none

no

piceli cache status

Show the disk used per state directory and category, and Piceli’s temporary directories. Read-only.

none

no

piceli chart manifests

Print (or write) plain manifests with a values file applied; no Helm needed.

none

no

piceli chart package

Write the chart archive -.tgz (byte-identical per chart).

none

no

piceli chart publish

Push the chart to an OCI registry as helm push does (needs –approve DIGEST).

none

yes

piceli chart render

Write the app as a Helm chart directory (Chart.yaml, values, schema, templates).

none

no

piceli cluster init

Set the cluster up: node labels, registry and mirrors, controller, UI (plan first; –approve HASH applies).

writes

yes

piceli cluster status

Nodes, registry and mirrors, controller, UI and Git Secret of a declared cluster (read-only).

reads

no

piceli codegen crd

Generate pydantic models for one CRD version, from a file or a cluster.

reads

no

piceli cycle report

Push to running and checked per target: p50, p90, count, slowest phase and slowest cycle, from the controller’s history and local records.

reads

no

piceli deploy

Deploy a pipeline: inputs → build → deliver → plan → apply → checks.

writes

yes

piceli dev cache clear

Empty free lineages’ cargo targets (a corrupted cache); busy ones are skipped.

writes

no

piceli dev cancel

Cancel a queued or running run (its Job and pod are deleted).

writes

no

piceli dev hosts

Each declared build host: up or down (why), platforms, slots, runs and queue; a docker or native host’s cache and lineages.

reads

no

piceli dev logs

A run’s output (stdout): live, or the recorded tail of a finished run.

reads

no

piceli dev nix build

Build a flake output on a Nix build host; with –publish, sign and push it.

none

yes

piceli dev nix gc

Remove builds of old commits from a Nix cache: plan, then –approve.

none

yes

piceli dev release-host

Clear a build host’s health events: it is no longer quarantined (0.22.0).

none

no

piceli dev run

Run COMMAND on the builder for a commit (–ref) or a working tree (default: here).

writes

no

piceli dev schedule

Run the queue yourself (a cluster without the GitOps controller, which runs it).

writes

no

piceli dev status

Slots, running and queued runs (with their position), recent runs and cache use.

reads

no

piceli doctor

Check this runner: free disk and memory against what the next build needs (estimated from the last build receipts), and the tools the pipeline uses (docker, docker buildx, kubectl). Exit 1 on a warning.

none

no

piceli env down

Delete BRANCH’s environment: its claims, namespace and volumes (never main’s).

writes

yes

piceli env push

Record a laptop-built digest for a branch environment (plan, then –approve HASH).

writes

yes

piceli env seed

Restore main’s latest restore point into BRANCH’s claims (replaces their content).

writes

yes

piceli env start

Ask the GitOps controller to start named environment ENV again.

writes

no

piceli env stop

Ask the GitOps controller to stop named environment ENV (no replicas, claims kept).

writes

no

piceli env up

Deploy BRANCH into its namespace (created when absent), isolated.

writes

yes

piceli envs

List every environment: branch, namespace, commit, deploy state, health, age.

reads

no

piceli explain

Explain an error code: cause, fix and whether a retry can succeed.

none

no

piceli gitops alarms

The controller’s alarms: failed or waiting environments, failed Nix releases, a composition that does not import, a new version. With –follow, each new one also as a desktop notification.

reads

no

piceli gitops approve

Approve the pending plan of ENV; the controller applies it on its next poll.

writes

yes

piceli gitops build

Ask the controller to build NAME now: a NixRelease plans –ref, an environment rebuilds its images; the same gate, plan and approval apply.

writes

no

piceli gitops builds

List every build the controller knows (NixRelease publishes, image builds, train handoffs): trigger, commit, host, stage, step times, log tail, targets.

reads

no

piceli gitops cache clear

Ask the controller to empty its build cache (a corrupted cargo cache).

writes

no

piceli gitops cancel

Cancel NAME’s queued or running build: unclaimed it is dropped, claimed the build host stops at its next stage.

writes

no

piceli gitops candidate list

Each candidate the controller holds, newest first, and its state.

reads

no

piceli gitops candidate release

Mark the ready candidate of COMMIT released: it stays, with its digests.

writes

no

piceli gitops candidate request

Prepare the candidate of COMMIT now: no quiet time to wait for.

writes

no

piceli gitops compare

Two runs side by side: commits, changed images, objects, time windows.

reads

no

piceli gitops disable

Remove the controller (plan first; –approve HASH removes). Never an environment.

writes

yes

piceli gitops enable

Install the GitOps controller (plan first; –approve HASH installs).

writes

yes

piceli gitops history

Each environment’s deploy runs, newest first, with their time windows.

reads

no

piceli gitops hosts

The health events, quarantine, source blocks and container-engine backoff the controller recorded per build host, and (0.89.0) whether its in-cluster fallback waits for each host (busy, live, upgrading, stale).

reads

no

piceli gitops rebuild

Ask the controller to rebuild the images a host built and deploy them.

writes

no

piceli gitops release-host

Ask the controller to forget a build host’s health events (end its quarantine).

writes

no

piceli gitops run

Run the controller loop (the Deployment’s entrypoint); –once for one poll.

writes

no

piceli gitops show

One deploy run: outcome, commits, digests, checks, stages, failure.

reads

no

piceli gitops status

Controller health, repository, last poll and every branch’s state.

reads

no

piceli gitops suspects

List the deployed images a build host (or node) built, in every environment.

reads

no

piceli gitops sync

Ask the controller to deploy ENV now at its revision (–component: rebuild one).

writes

no

piceli gitops wait

Wait until ENV runs COMMIT: deployed, failed (stage, cause) or timed out.

reads

no

piceli heavy run

Run COMMAND once the lock is free; exit with its exit code.

none

no

piceli heavy status

Show who holds the lock and the most recent receipts.

none

no

piceli help-json

Print the whole CLI tree (commands, options, contracts) as JSON.

none

no

piceli host module

Render the NixOS module that installs the host agent (commit it, import it).

none

no

piceli host pin

Deploy a tag’s build (an older one too) and hold it: no newer build until unpin.

none

no

piceli host rollback

Switch back to the previous system (in the store) and hold it until unpin.

none

no

piceli host secrets

Put the host’s age identity where sops-nix reads it, and the cache’s read keys (Piceli’s or yours) where the agent reads them: plan, then –approve.

none

yes

piceli host status

Read the host agent’s status over SSH (current build, last attempt, checks).

none

no

piceli host unpin

Drop a pin or rollback hold: the host follows its declared ref again.

none

no

piceli host wait

Wait until the host runs REV with its checks passed (exit 1: failed or timeout).

none

no

piceli import live

Generate a typed module from the objects of a live namespace (read-only).

reads

no

piceli import yaml

Generate a typed module from a directory of manifests (no cluster).

none

no

piceli infra apply

Apply the plan whose hash is –approve (without it: plan, exit 3).

none

yes

piceli infra destroy

Destroy what Piceli created for it, with approval of the destroy plan’s hash.

none

yes

piceli infra install

Run the server’s install hook (its rendered command, approved by digest).

none

yes

piceli infra plan

Plan the declared machines with OpenTofu; print the changes, estimate and plan hash.

none

no

piceli infra register

Wait for the server’s k3s and register it as its Cluster, or pin its SSH host keys (approved by digest).

reads

yes

piceli infra replace

Replace a server: destroyed, then created on its port with its current user data.

none

yes

piceli infra status

Servers, addresses, installs, cluster registrations and cost (read-only).

none

no

piceli inputs record

Capture each declared source (or the --only ones) and write a lock.

none

no

piceli inputs verify

Recapture the sources and compare them with the lock (exit 1 on drift).

none

no

piceli login

Store a credential profile outside the repository (mode 0600).

none

no

piceli logout

Delete a stored profile (never the kubeconfig file it points at).

none

no

piceli logs

Print one workload’s logs in an environment (kubectl, explicit context).

reads

no

piceli observe forward-command

Print a JSON argv array for one explicit loopback-only port forward.

none

no

piceli observe forward-list

List a user’s saved port-forward preferences without starting a process.

none

no

piceli observe forward-run

Run one saved loopback-only port forward until the caller interrupts it.

reads

no

piceli observe forward-save

Persist one harmless port-forward preference for a local user.

none

no

piceli observe forwards apply

Start every declared forward and supervise it in the foreground.

reads

no

piceli observe forwards status

Probe each declared forward’s loopback endpoint once and print JSON.

none

no

piceli observe logs-command

Print JSON argv for a bounded, explicit workload-log request.

none

no

piceli observe logs-run

Run a bounded workload-log request in the caller’s foreground terminal.

reads

no

piceli observe serve

Open the local operations dashboard and optionally restore saved forwards.

reads

no

piceli observe status

Print declared resources, live state, and objects absent from the archive.

reads

no

piceli operator approve

Record an explicit operator approval for a pull request rollout.

none

yes

piceli operator backup

Create a verified, mode-restricted backup archive of operator state.

none

no

piceli operator promote

Promote an existing built digest to a new tag without rebuilding.

none

no

piceli operator restore

Safely verify and restore operator state into empty destination.

none

no

piceli operator serve

Launch the Piceli Operator dashboard and unified REST API.

reads

no

piceli operator status

Print classified operator inventory: managed, unmanaged, unknown, and releases.

reads

no

piceli profiles

List the stored credential profiles (references only, never secrets).

none

no

piceli promote

Ask the GitOps controller to deploy BRANCH@SHA to main, or to environment ENV; with –from, pin a verified commit in a NixRelease’s flake and tag it.

writes

yes

piceli publish

Push the rendered manifests as a Flux OCI artifact (needs –approve DIGEST).

none

yes

piceli registry forward

Keep a loopback port-forward to the registry open for pushes from here.

reads

no

piceli registry install

Install the in-cluster registry and its node mirror (plan first; –approve HASH installs).

writes

yes

piceli registry status

Registry pod, mirror readiness on every node and storage use (read-only).

reads

no

piceli registry uninstall

Remove the registry and its node mirrors (plan first; –approve HASH removes).

writes

yes

piceli release apply

Execute an approved plan (--approve HASH), or plan and confirm.

writes

yes

piceli release check

Run the spec’s [[checks]] now against a release; changes nothing.

reads

no

piceli release diff

Show what plan would change, field by field (read-only, nothing stored).

reads

no

piceli release orphans

List the objects that carry the app’s ownership labels but no current release owns.

writes

yes

piceli release plan

Capture live discovery and persist an approvable plan (prints its hash).

reads

no

piceli release preview

Alias of plan.

reads

no

piceli release resume

Resume an interrupted apply of a created release (same grant and ids).

writes

no

piceli release retention

Retire releases beyond keep_releases, with their secret versions.

none

no

piceli release rollback

Re-plan and re-apply an earlier release against current cluster state.

writes

yes

piceli release secret show

Show a secret’s metadata, and its value with –reveal (never logged).

none

no

piceli release status

Show catalogued releases, their executions and history (no cluster access).

none

no

piceli release stop

Cancel the latest execution of a release (exact owner only).

reads

no

piceli render

Print the manifests of a typed app, composition or pipeline. Never contacts a cluster.

none

no

piceli restore

Put a restore point back into its claims (plan, then –approve HASH).

writes

yes

piceli restore-points

List a pipeline’s restore points, newest first (read-only, offline).

none

no

piceli runs

List the deploy runs of a pipeline, newest first, with their state, release, duration and summary files. Read-only (with shared state it reads the local working copy: run piceli state pull first).

none

no

piceli secrets age

A host’s age identity for sops-nix: generate or import it; print its public key.

none

no

piceli secrets backup

Write the whole secret store, encrypted with age, to one file (never printed).

none

no

piceli secrets backup-key

Create the offline age key for backups: prints only its age1… recipient.

none

no

piceli secrets cluster

Store another cluster’s credentials for the GitOps controller (never printed).

writes

no

piceli secrets delete

Delete a stored credential (a spent bootstrap key, an old token); never printed.

none

yes

piceli secrets git

Store the Git token the controller and cluster builds use (read from stdin, never printed).

writes

no

piceli secrets git-ssh-key

Store a read-only deploy key a build host fetches private git+ssh flake inputs with.

none

no

piceli secrets git-token

Store a Git token a build host fetches private flake inputs with (never printed).

none

no

piceli secrets nix-cache

A Nix binary cache’s signing key: generate or import it; print its public key.

none

no

piceli secrets provider

Store a provider’s API credential, part by part (never printed).

none

no

piceli secrets restore

Restore the secret store from an encrypted backup (plans first when not empty).

none

yes

piceli secrets s3

Store a bucket’s S3 access keys, part by part (never printed).

none

no

piceli secrets setup

Walk through the missing secrets of a declaration, in order.

none

no

piceli secrets signing-key

A release signing key: generate or import it; print its public key.

none

no

piceli secrets state-key

Store the passphrase that encrypts an infrastructure’s OpenTofu state.

none

no

piceli secrets status

Every secret a declaration needs: present or missing, who creates it, the next command.

none

no

piceli secrets user-data

Store a server’s user data (a cloud-config, a script or a bootstrap key).

none

no

piceli sign-file

Write FILE.sig for each file, as ssh-keygen -Y sign -n file would.

none

no

piceli state export

Write the release’s state to one file (secret material excluded unless asked).

reads

no

piceli state import

Replace the release’s state with an export (needs –approve DIGEST).

writes

yes

piceli state pull

Refresh the local working copy from the shared state (reads the cluster).

reads

no

piceli state show

Show where the state lives, its generation and who holds the release lock.

reads

no

piceli status

Say whether the app is up and how to reach it. Read-only.

reads

no

piceli support-bundle

Collect a read-only, redacted snapshot of a namespace (no Secrets, no env values).

reads

no

piceli targets

Every environment and NixHost: commit or tag, pinned product commit, checks, state.

reads

no

piceli train

Merge branches onto the base one tested merge at a time; eject failures.

none

yes

piceli train-init

Write a starting train spec, from a shell script or as a template.

none

no

piceli train-prune

Bound what a train keeps: worktrees, cargo targets, the content store, runs.

none

no

piceli train-queue

A train’s queue: waiting requests with their flags; cancel one, or serve them.

none

no

piceli train-wait

Wait until a train run ends; exit with its verdict.

none

no

piceli trains

The trains: the run in progress, recent runs, step trends, flaky tests, deployed by which run.

reads

no

piceli ui backup

Back up an offline UI control store and its release journal.

none

no

piceli ui cluster-observe

Serve OIDC-scoped cluster observation and configured delivery.

writes

yes

piceli ui cluster-serve

Serve OIDC-scoped cluster observation and configured delivery.

writes

yes

piceli ui connect

Bind a laptop port for an authenticated cluster UI ticket.

reads

no

piceli ui forward-serve

Serve the composition UI in its pod, reached only through piceli access ui.

writes

no

piceli ui restore

Restore UI control state before starting a single new server.

none

no

piceli ui serve

Register an existing definition or inventory scope and serve the bundled UI.

writes

yes

piceli watch

Follow a deploy run until it settles: every stage change and progress line, then the outcome. Read-only; reads the local run journal (with shared state run piceli state pull first), never the cluster.

none

no

piceli access

Forward the app’s declared ports to 127.0.0.1 and keep them healthy.

Option

Type

Default

Description

TARGET

text

required

--only

text (repeatable)

Supervise only this forward id (repeatable)

--json

boolean

False

Print JSON lines: started, status, stopped

--kubectl

text

kubectl

kubectl executable

--poll

float

1.0

Status report cadence (seconds)

--dashboard

integer

Also serve the local dashboard on this loopback port, with these forwards as its shortcuts

--ui-config

path

env PICELI__UI_CONFIG

Optional dashboard TOML (badges, tiers, extra shortcuts)

--pipeline

text

env PICELI_PIPELINE

With a branch name as TARGET: the pipeline declaring envs=EnvConfig(…) (MODULE:ATTR; default $PICELI_PIPELINE). A branch’s forwards get free local ports

--cluster

text

With an environment name as TARGET: the composition’s Cluster (infra.py:ATTR). Forwards the environment’s declared forwards and every other Service port of it on free local ports, with the cluster’s credentials profile

--ui

boolean

False

With –cluster: also forward the in-cluster UI (127.0.0.1:8790) and print its launch URL, as piceli access ui does

--forward

boolean

False

Port-forward every service, also those the environment exposes on the tailnet (Access(tailnet=True))

--all-ports

boolean

False

With –cluster: also forward the Service ports the app declares no forward for (internal ports: OTLP, databases); by default only the declared forwards, when the app declares any

Contract

  • Reads: release.toml or module:attr, kubeconfig, kubectl

  • Writes: loopback ports (kubectl port-forward processes it owns)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Refuses (access-port-conflict) when a declared local port is held by another process and names its pid (another process’s command line is never printed); when the holder is Piceli’s own stale process for this app it says so and suggests piceli access stop --stale TARGET. Never takes a port over. Stops every forward it started on Ctrl-C/SIGTERM/SIGHUP. Exit 1 only when every forward gave up. piceli access BRANCH --pipeline MODULE:ATTR forwards that branch environment’s declared ports on free local ports.

piceli access stop

Stop Piceli’s stale forwards and servers for the app; never another process.

Option

Type

Default

Description

TARGET

text

--stale

boolean

False

Stop Piceli’s own processes for this app that hold its ports (required: the only mode)

--port

integer (repeatable)

Also check this loopback port (a dashboard, observe serve or operator serve port); repeatable

--cluster

text

Instead of TARGET: the Cluster (MODULE:ATTR) whose piceli access ui forward to stop

--profile

text

Instead of TARGET: the credential profile whose piceli access ui forward to stop

Contract

  • Reads: release.toml or module:attr, local process table

  • Writes: signals Piceli’s own processes for this app (SIGTERM)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Only with –stale. Checks the app’s declared forward ports and each –port; stops a port’s holder only when it is Piceli’s own process for this target (its kubectl port-forward, orphaned or supervised, or piceli access / observe serve / operator serve with the same target), never another process, which is reported by pid only. Local only: never contacts the cluster.

piceli access ui

Open the UI that piceli cluster init installed: forward it and print its URL.

Option

Type

Default

Description

--cluster

text

The composition’s Cluster (MODULE:ATTR); its credentials profile is used

--profile

text

A piceli login credential profile of the cluster

--json

boolean

False

Print JSON lines: started, status, stopped

--kubectl

text

kubectl

kubectl executable

--poll

float

1.0

Status report cadence (seconds)

Contract

  • Reads: –cluster MODULE:ATTR or –profile NAME, kubeconfig, the UI’s Service and launch Secret, kubectl

  • Writes: loopback port 8790 (a kubectl port-forward it owns)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only on the cluster. Prints the one URL with the launch token (stdout, or the started JSON line with –json); the token is never logged elsewhere. Refuses (access-port-conflict) when 127.0.0.1:8790 is held. Stops the forward on Ctrl-C/SIGTERM/SIGHUP; exit 1 only when the forward gave up.

piceli artifacts build

Assemble an OCI image layout from a plan without running code.

Option

Type

Default

Description

--plan

path

required

--source-root

path

required

--output

path

required

Contract

  • Reads: plan JSON, source root

  • Writes: –output layout

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts build-spec preview

Preview a containerized build and its plan hash.

Option

Type

Default

Description

--spec

path

required

--inputs

path

--platform

text

host-build.toml only: build for this platform (repeat for a multi-platform image); default the spec’s build.platforms

--cache-dir

path

host-build.toml only: the shared stage/target/blob directory

Contract

  • Reads: build.toml, inputs.toml, build contexts

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts build-spec run

Run an approved containerized build and write a receipt.

Option

Type

Default

Description

--spec

path

required

--inputs

path

--platform

text

host-build.toml only: build for this platform (repeat for a multi-platform image); default the spec’s build.platforms

--cache-dir

path

host-build.toml only: the shared stage/target/blob directory

--lock

path

--approve-builder

text

build.toml: the builder digest to run (required)

--approve-plan

text

--allow-network

boolean

False

--out

path

required

--output-dir

path

--docker

path

--docker-sha256

text

--log

path

--progress

text

steps

stderr during the build: one line per step (default), plus the raw build output (plain), or nothing (quiet)

--max-seconds

float

7200.0

Contract

  • Reads: build.toml, inputs, build contexts, docker

  • Writes: –out receipt, –output-dir, local Docker image store

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts copy

Copy an image by digest (index, every platform, SBOM, provenance, signatures) to another registry.

Option

Type

Default

Description

--from

text

oci://host[:port]/repository@sha256:

--to

text

oci://host[:port]/repository[:tag]

--set

path

a JSON or TOML list of {from, to} copies, instead of –from and –to; one plan digest approves them all

--no-referrers

boolean

False

copy only the image, not its SBOM, provenance and signatures

--move-tag

boolean

False

--approve

text

the plan digest printed without –approve

--scan-policy

path

a TOML file with a [scan] table (enabled, ignore = waivers) for the vulnerability scan of the source

--no-scan

boolean

False

do not scan the source for known vulnerabilities (recorded in the plan)

--from-credentials

path

--from-docker-config

path

--from-ca-file

path

--credentials

path

--docker-config

path

--ca-file

path

--out

path

write the copy receipt here

--timeout

float

1800

seconds one copy may take (with –in-cluster: the Job’s deadline)

--attempts

integer

5

tries of a whole copy that failed for a transient reason (a dropped connection, HTTP 429/502/503/504), with a growing pause

--ledger

text

a name that records each copy as done or failed; the same name again continues at the first copy not done

--ledger-dir

path

where the ledger files are (default: the user’s state directory)

--in-cluster

boolean

False

run the copy as a Job in the cluster (it reaches the cluster registry by its Service name; no port-forward); needs –kubeconfig and –context

--namespace

text

piceli-system

--kubeconfig

path

--context

text

--credentials-secret

text

with –in-cluster: a Secret with keys source-username, source-password, source-token and the same for target

--image

text

with –in-cluster: the Job’s image (default: the controller’s)

Mutually exclusive: no_scan / scan_policy; from_credentials / from_docker_config; credentials / docker_config.

Contract

  • Reads: source OCI registry (manifests, blobs, referrers), credentials files or Docker configs

  • Writes: target OCI registry (blobs, manifests, index, referrers, tag), –out receipt

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: 0.74.0. Without –approve it prints the plan and its digest (exit 3) and contacts nothing. Every digest is preserved: the index, each platform manifest and each referrer (the referrers API, else the sha256- fallback tag). The tag moves last; one that names another digest is refused unless –move-tag. Never prints a credential. 0.83.0: –attempts retries a whole copy on transient reasons; –set FILE copies a list under one plan digest; –ledger NAME resumes at the first copy not done; –in-cluster runs the copy as a Job next to the registry.

piceli artifacts copy-job-run

What the in-cluster copy Job runs: copy the mounted set, record each result.

Option

Type

Default

Description

--dir

path

required

--ledger

text

required

--attempts

integer

5

Contract

  • Reads: the mounted set (ConfigMap), registry credentials (environment)

  • Writes: the target OCI registry

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.83.0. Prints PICELI-COPY-LEDGER and PICELI-COPY-RESULT lines (gzip and base64) that the client reads from the pod log.

piceli artifacts deliver

Deliver a digest-approved image to a registry or node.

Option

Type

Default

Description

--image

text

--archive

path

--to

text

required

--approve-digest

text

required

--ref

text

--docker

path

--docker-sha256

text

--docker-socket

path

--ssh

path

--ssh-sha256

text

--ssh-agent-socket

path

--timeout

float

600

--receipt

path

--journal

path

--node-registry

text

--credentials

path

--ca-file

path

--via-forward

text

--namespace

text

--kubeconfig

path

--context

text

--forward-remote-port

integer

5000

--kubectl

path

--kubectl-sha256

text

Mutually exclusive: archive / image.

Contract

  • Reads: docker image or archive, credentials file, kubeconfig

  • Writes: registry or node image store, –receipt, –journal

  • Cluster: reads

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Registry pushes are content-addressed and idempotent. Contacts the cluster only for –via-forward (port-forward).

piceli artifacts execute-command

Run a pinned external build command under an approved plan.

Option

Type

Default

Description

--spec

path

required

--source-root

path

required

--approve-plan

text

required

--allow-code-execution

boolean

False

--allow-network

boolean

False

--timeout

float

60

Contract

  • Reads: command spec, source root, pinned tool

  • Writes: tool outputs

  • Cluster: none

  • Approval required: yes

  • Safe to retry: no

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts fetch-file

Download one published file (a blob) by its digest and check it.

Option

Type

Default

Description

--from

text

required

oci://host/repository

--digest

text

required

sha256: of the file

--out

path

required

where to write it

--credentials

path

--docker-config

path

--ca-file

path

Mutually exclusive: credentials / docker_config.

Contract

  • Reads: OCI registry (one blob), credentials file or Docker config

  • Writes: –out PATH (only when the digest matches)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.32.0. Anonymous unless –credentials or –docker-config: a public repository’s anonymous pull token is fetched as the registry asks. blob-digest-mismatch leaves –out untouched.

piceli artifacts import-local

Import an OCI layout into the local Docker daemon.

Option

Type

Default

Description

--layout

path

required

--docker

path

required

--docker-sha256

text

required

--socket

path

required

--approve-digest

text

required

Contract

  • Reads: OCI layout, docker

  • Writes: local Docker image store

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts inspect

Recheck an OCI layout and print its summary.

Option

Type

Default

Description

--layout

path

required

Contract

  • Reads: OCI layout

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts pin

Pin one public source file by digest.

Option

Type

Default

Description

--source-root

path

required

--public-file

text

required

Contract

  • Reads: source file

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts preview

Preview a deterministic OCI build plan (no tools run).

Option

Type

Default

Description

--plan

path

required

Contract

  • Reads: plan JSON

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts preview-command

Preview a pinned external build command.

Option

Type

Default

Description

--spec

path

required

Contract

  • Reads: command spec

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli artifacts publish

Publish a build’s images (every platform in one index) to a registry.

Option

Type

Default

Description

--receipt

path

required

--output-dir

path

the build’s output directory (default: the receipt’s directory)

--to

text

required

oci://host[:port]/prefix

--tag

text

required

the version tag, e.g. 1.4.0

--image

text

publish only this image

--no-attestations

boolean

False

do not attach the SBOM and provenance

--move-tag

boolean

False

--approve

text

the plan digest printed without –approve

--credentials

path

--docker-config

path

--ca-file

path

--docker

path

--docker-sha256

text

--docker-socket

path

--out

path

write the publish receipt here

--values-out

path

write the Helm values fragment (images..repository/tag/digest)

--sign-key

path

sign with cosign and this private key file (cosign generate-key-pair)

--cosign

path

--cosign-sha256

text

--timeout

float

1800

Mutually exclusive: credentials / docker_config.

Contract

  • Reads: build receipt and its outputs, credentials file or Docker config, docker (Docker builds only)

  • Writes: OCI registry (blobs, manifests, index, attestations, tag), –out receipt, –values-out

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve it prints the plan and its digest (exit 3) and contacts nothing. Pushes are content-addressed; a version tag that names another image is refused unless –move-tag.

piceli artifacts publish-files

Publish local files as one OCI artifact (each file one layer, by its sha256).

Option

Type

Default

Description

FILES

path

--receipt

path

publish the [[output.files]] a host build receipt lists (0.39)

--output-dir

path

where the receipt’s files are (default: the receipt’s directory)

--to

text

required

oci://host[:port]/repository

--tag

text

required

the artifact’s tag

--artifact-type

text

required

the manifest’s artifactType, e.g. application/vnd.example.downloads.v1

--move-tag

boolean

False

--approve

text

the plan digest printed without –approve

--credentials

path

--docker-config

path

--ca-file

path

--out

path

write the receipt here

--timeout

float

1800

Mutually exclusive: credentials / docker_config.

Contract

  • Reads: the files, or a host build receipt’s files (–receipt), credentials file or Docker config

  • Writes: OCI registry (blobs, manifest, tag), –out receipt

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: 0.32.0. Without –approve it prints the plan (every file’s name, size and digest, the manifest digest) and its digest (exit 3) and contacts nothing. Each file is stored as it is, so its blob digest is its sha256; a file changed since the plan is refused (publish-input-changed). A tag that names another manifest is refused unless –move-tag. Never prints a credential. 0.39: –receipt publishes the [[output.files]] of a host build receipt (each must still match the receipt’s sha256 and size).

piceli artifacts retention

Report which registry manifests the last releases, pins and live workloads keep, and delete the rest.

Option

Type

Default

Description

--cluster

text

the in-cluster registry: MODULE:ATTR of a piceli.infra.Cluster (or a composition module infra.py, a Pipeline delivering to Registry.in_cluster, or that value); derives –to, the forward and the cluster read, and lists every stored manifest

--env

text

with –cluster: the pipeline’s environment

--to

text

oci://host[:port]/prefix to inspect (unless –cluster)

--receipts

path

publish or delivery receipts, JSON Lines journals or directories of them

--keep

integer

releases kept (minimum; default 3, with –cluster 0); 0 keeps only what is live, a rollback target or pinned (needs the cluster read)

--budget

text

keep more releases, newest first, up to e.g. 10GiB

--pin

text

a digest to keep

--pin-file

path

digests to keep, one per line

--collect-unledgered

boolean

False

also collect tagged manifests no receipt mentions

--repository

text

a repository to inspect (registries without a catalog)

--kubeconfig

path

reads live pods; with –context

--context

text

--live-namespace

text

default: all namespaces

--live-file

path

digests in use, one per line or JSON

--via-forward

text

service/NAME, deployment/NAME or pod/NAME

--namespace

text

namespace of the forward target

--forward-remote-port

integer

5000

--kubectl

path

--kubectl-sha256

text

--allow-exec

boolean

False

allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

expected sha256: of the exec plugin

--transport

text

https

https, or loopback-http for a local test API

--delete

boolean

False

--approve

text

the plan hash printed without –approve

--credentials

path

--docker-config

path

--ca-file

path

--out

path

write the report or receipt here

--timeout

float

120

Mutually exclusive: credentials / docker_config.

Contract

  • Reads: publish and delivery receipts, credentials file or Docker config, kubeconfig (live pods, workload templates, environment records, with –context), –cluster MODULE:ATTR (Cluster, composition, pipeline or Registry.in_cluster), credential profile (with –cluster), in-cluster registry storage (read-only find over pods/exec, with –cluster), kubectl (port-forward, with –cluster or –via-forward)

  • Writes: OCI registry (manifest deletes, only with –delete –approve), –out

  • Cluster: reads

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –delete it only reads. –delete without –approve prints the plan and its hash (exit 3). A digest a running workload uses is never deleted, nor a workload’s rollback target; –keep 0 needs –kubeconfig and –context. –cluster REF derives the registry, forward and cluster read, defaults –keep to 0 and lists every stored manifest (digest-only ones too). Blobs are freed by the registry’s own garbage collection afterwards.

piceli build job

Build at a commit as a Job on a builder node (plan, then –approve HASH).

Option

Type

Default

Description

TARGET

text

required

--commit

text

required

Full Git commit id

--image

text

required

Builder image, name@sha256:…

--repo

text

required

Git remote URL (no credentials)

--cache-key

text

The branch (default: the commit)

--platform

text (repeatable)

linux/arm64, linux/amd64 (repeat)

--git-secret

text

piceli-build-git

Secret with keys username, password

--selector

text (repeatable)

Builder node label KEY=VALUE (repeat)

--namespace

text

--storage

text

20Gi

Cache claim size

--storage-class

text

--timeout

integer

3600

Job deadline in seconds

--registry-url

text

oci://host[:port]/prefix

--node-registry

text

--repo-root

path

--receipt-out

path

Where to write the receipt

--approve

text

The plan hash to execute

--env

text

Contract

  • Reads: pipeline module, kubeconfig, node facts

  • Writes: node facts cache (state_dir)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve it reads the node facts and prints the Job plan only. With –approve HASH it creates the cache claim (per branch and page size) if missing and one Job that fetches the commit (Git credentials from a Secret, never printed), builds for each –platform, pushes by digest to the node registry and prints the receipt; the Job is removed afterwards and the cache kept. Rejected: cluster-build-invalid; failed: cluster-build-failed.

piceli build job-run

Inside the build Job: build and push; print the receipt line.

Option

Type

Default

Description

--cache

path

required

--out

path

required

--registry-url

text

required

--source

path

--commit

text

--spec

text (repeatable)

host-build.toml (repeat)

--sources

path

A composition build: the directory holding each fetched source

--component

text (repeatable)

A composition build: {“component”,“source”,“digest”,“repository”} as JSON (repeat)

--platform

text (repeatable)

A composition build: linux/amd64 (repeat)

--image

text (repeatable)

A pipeline image build (with –sources and –spec SOURCE/PATH): {“image”,“repository”,“key”} as JSON (repeat)

--facts

text

A pipeline image build: declared node facts (JSON)

--node-registry

text

--timeout

integer

3600

--archives-only

boolean

False

Push nothing: list each image’s OCI archive per platform in the receipt (a build host delivers them, 0.21.0)

Contract

  • Reads: the checked-out source, PICELI_BUILD_FACTS

  • Writes: the build cache directory, the node registry

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: The command the Job runs; it prints one receipt line on stdout. The approval was the plan hash of build job. With –sources and –component it builds a composition’s components from their piceli.toml (the Job the composition controller runs).

piceli builder install

Run builder serve as a service on this machine (systemd or launchd).

Option

Type

Default

Description

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster whose controller to serve

--host

text

required

The declared build host this machine is (one service per name)

--publish

text (repeatable)

MODULE:ATTR of a piceli.infra.NixCache this host publishes to (repeat); its keys must be in this machine’s piceli secrets

--publish-only, --no-publish-only

boolean

Passed on to builder serve

--image

text

The builder image (passed on to builder serve)

--namespace

text

piceli-system

The controller’s namespace

--user

text

As root: the user the service runs as (a system service); without root the service runs as you (a user service)

--state-dir

path

builder serve’s state directory (Git mirrors; launchd’s builder.log); default ~/.cache/piceli/builder of the service user

--print

boolean

False

Write the unit (or property list) to stdout and change nothing

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=DevBuilds(hosts=[…])), credential profile, the controller’s status, MODULE:ATTR of each –publish NixCache and its keys from this machine’s credentials (checked, never written to the unit), PATH (docker, git, kubectl)

  • Writes: /etc/systemd/system or ~/.config/systemd/user/piceli-builder-HOST.service (Linux), /Library/LaunchDaemons or ~/Library/LaunchAgents/piceli.builder.HOST.plist (macOS), systemctl daemon-reload, enable, restart (launchctl bootstrap)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.28.0. Runs the same checks as builder serve –check first (the profile reaches the controller; every credential the host needs is present, else infra-credential-missing names it) and refuses when docker, git or kubectl is missing (builder-service-invalid). The unit runs the piceli program that ran install (absolute path, version in its description), in the directory install ran in, with Restart=on-failure, RestartSec=10 and KillSignal=SIGINT; it holds directories, never a secret. As root it needs –user USER (a system service); otherwise it is a user service. –print writes the unit to stdout and changes nothing; since 0.29.0 it checks nothing either (the unit is printed where the secrets are absent, for example for NixOS). A failing systemctl or launchctl is builder-service-failed.

piceli builder serve

Take the builds the controller publishes, build and deliver them, answer it.

Option

Type

Default

Description

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster whose controller to serve

--host

text

The docker build host to build on (DevBuilds(hosts=[…]); default: the first docker host); with –publish also a native host, which then only publishes (as any host with –publish-only)

--publish

text (repeatable)

MODULE:ATTR of a piceli.infra.NixCache this host publishes NixReleases to (repeat); its signing key and S3 write keys must be in this machine’s piceli secrets (checked at start, never sent)

--publish-only, --no-publish-only

boolean

Claim only the –publish NixReleases, never an image build, whatever the host’s kind (a docker host that only publishes); default: on for a host declared runs=False, else off

--image

text

Override the builder image; default (0.33.0): the controller’s (controller.builder_image, followed when it changes), else the host’s, else DevBuilds(image=)

--namespace

text

piceli-system

The controller’s namespace

--once

boolean

False

Build at most one wanted build, then exit

--take-next

boolean

False

With –once: stand by for the next build this host may take (one waiting now, or the next one asked for), claim it before the in-cluster fallback, build it, then exit (0.29.0)

--timeout

float

1800.0

–take-next: seconds to stand by at most

--check

boolean

False

Claim nothing: git ls-remote every source of the controller, write into the scratch directory and build cache from inside the builder container, list the NixReleases this host publishes, how each fetches its private flake inputs (credentials host or controller) and whether this host holds each credential, then exit (1 when anything fails)

--args-file

path

Read more builder serve arguments from this file at start, one per line (# comments); for a fixed service unit (NixOS) whose image and flags change without rewriting the unit (0.29.0)

--poll

float

15.0

Seconds between looks when idle

--version-file

path

When the controller runs another Piceli version, write that version into this file before exiting 75, for the service to install it and start again (0.33.0)

--state-dir

path

Where Git mirrors live (default ~/.cache/piceli/builder)

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=DevBuilds(hosts=[…])), credential profile, the controller’s status, each source with this machine’s Git access, MODULE:ATTR of each –publish NixCache, and its signing key and S3 write keys from this machine’s credentials (0.25.0)

  • Writes: the controller’s requests (build-claim, built, build-failed, nix-published, build-host-version; 0.89.0: build-host-lease, an idle host’s lease), –version-file PATH: the controller’s Piceli version (0.33.0), the binary cache: closure, signed manifest, tag pointer (–publish), images in the cluster’s registry (through a port-forward), ~/.cache/piceli/builder (Git mirrors), the piceli-build-cache volume, the host’s health record (piceli-health-* volumes)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object), 75 builder serve: the controller runs another Piceli version; install it and start again (nothing was claimed)

  • Output contract: conforms

  • Notes: 0.21.0. Runs until Ctrl-C (–once: one build). The builder image must be the controller’s Piceli version. 0.22.0: each delivered image’s provenance is pushed as an OCI referrer when the registry takes it; a build showing a machine-health signature records a health event on the host, and a quarantined host claims nothing (quarantined in –once –json). 0.25.0: –publish MODULE:ATTR (repeatable) also takes the nix-publish builds of the NixReleases that name this host as builder, only for those caches; every key is read at start (infra-credential-missing, dev-nix-key-mismatch refuse it) and never leaves the host: a claim carries the cache key’s signature over it. A native host with –publish only publishes. The publish itself was approved by the release’s policy or gitops approve of its plan digest. 0.25.0: –publish-only (needs –publish, else dev-nix-invalid) claims only those publishes on any kind of host, never an image build (said once), and needs no cluster registry: a remote publisher is a docker host with an SSH context to itself, since a native host is the machine running Piceli. A host declared runs=False implies –publish-only and is refused without –publish or with –no-publish-only (dev-host-publish-only); without –host it is never the default. 0.26.0: before each publish the host fetches the plan’s private flake inputs into its own store (its own git-token or git-ssh-key, or for credentials=“controller” the controller’s token sealed to the claim’s one-time key), else build-failed with infra-nix-input-unreachable before any build; at start it warns per release of an input it holds no credential for, and –check claims nothing and prints piceli.builder-check.v1 (each release’s mode, inputs and credential states; exit 1 when one is missing). 0.29.0: –check also runs git ls-remote of every source the controller follows and writes into a scratch directory and the build cache from inside the builder image (sources and scratch in piceli.builder-check.v1; exit 1 when one fails). A host the composition does not declare claims nothing and says so. A failure before the build’s first command (a source it cannot fetch, an engine that cannot start the build) answers build-failed with early: the controller hands the build to another host or the in-cluster fallback and quarantines this host for that source until gitops release-host (0.75.0: for 24 hours at most; an engine failure, cause engine, quarantines no source but backs the host off 5 minutes, doubling, and blocks it after 3 in a row). –once –take-next stands by (build-standby) for the next build it may take, claims it before the fallback and exits (–timeout seconds, default 1800). –args-file PATH adds the arguments in PATH (one per line, # comments) at start. 0.33.0: it claims only while it runs the controller’s Piceli version; on a mismatch it claims nothing (the controller builds in the cluster), tells the controller its version (build-host-version; builder status, gitops hosts and the build-host-version alarm show it), writes the controller’s version into –version-file PATH when given and exits 75 (builder-version-mismatch), for its service to install that version and start it again. –check reports both versions (version in piceli.builder-check.v1; exit 1 on a mismatch). It builds in the controller’s builder image (controller.builder_image, pulled again when it changes; nothing claimed while it cannot be pulled); –image is an override, said once when it differs.

piceli builder status

List the build hosts the controller heard from and what each last did.

Option

Type

Default

Description

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster whose controller to serve

--namespace

text

piceli-system

The controller’s namespace

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=DevBuilds(hosts=[…])), credential profile, the controller’s status

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.28.0. Read-only (controller.build_hosts, builds_wanted and build_health in gitops status); piceli.builder-status.v1 under –json.

piceli builder uninstall

Stop, disable and remove the build host service builder install wrote.

Option

Type

Default

Description

--host

text

required

The build host’s service

Contract

  • Reads: the unit or property list of –host

  • Writes: the unit or property list (removed); systemctl disable –now (launchctl bootout)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.28.0. state absent when none is installed (nothing runs).

piceli bundle

Package the app for a cluster Piceli never accesses (kustomize, prepare.sh, images; or a Helm chart).

Option

Type

Default

Description

TARGET

text

required

--out

path

Bundle (or, with –helm, chart) directory to write (absent or empty)

--env

text

Render this environment (e.g. client)

--receipt

path

Build receipt (piceli artifacts build-spec run) holding the app’s build images; their archives go into images/

--output-dir

path

Directory the receipt’s paths are relative to (default: its directory)

--platform

text (repeatable)

Platform to put in the archives (repeatable; default linux/amd64)

--all-platforms

boolean

False

Every platform the receipt holds (multi-arch)

--name

text

Bundle name and part-of label (default: the render’s part-of label)

--version

text

0.1.0

Bundle version (X.Y.Z)

--storage-class

text

storageClassName of every claim, in the overlay

--helm

boolean

False

Write a Helm chart (Chart.yaml, values.yaml, templates/) instead of the kustomize bundle and prepare.sh

--app-version

text

With –helm: appVersion of Chart.yaml (default: –version)

--push

text

With –helm: oci://host[:port]/path; the chart goes to path/: (needs –approve DIGEST)

--approve

text

With –push: the digest printed without –approve; pushes it

--credentials

path

With –push: private JSON file, {“username”, “password”} or {“token”}

--ca-file

path

With –push: CA bundle for a TLS registry

--input-prefix

text

PICELI_INPUT_

Prefix of the input variables prepare.sh reads (=path)

--tool-name

text

piceli bundle

The tool named in the generated comments (written by NAME)

--annotation-domain

text

piceli.io

Domain of the annotation and label keys the bundle writes (DOMAIN/bundle, DOMAIN/namespace, …)

Contract

  • Reads: module/app file, build receipt and its image archives (–receipt), credentials file (–helm –push)

  • Writes: –out bundle directory, OCI registry (–helm –push –approve DIGEST: chart blobs, manifest, version tag)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Approval applies to –helm –push only: without –approve it prints the chart’s deterministic digest and exits 3; –approve DIGEST pushes path/: as helm push does. –helm writes a Helm 3 chart (Chart.yaml, values.yaml, values.schema.json, templates/) instead of the kustomize bundle: settings, secret inputs and toggles are values; generated Secrets are made at install and kept across upgrades with lookup. Otherwise never contacts a cluster or registry and writes no secret value. Renders like piceli render --env; refuses objects that break a foreign-cluster safety rule (bundle-unsafe-, with every violation) unless the App waives it per object (app.safety_exception). Writes a kustomize base and overlays/dev, prepare.sh (the generated Secrets, made in the client’s cluster with kubectl and openssl), OCI image archives with SBOMs, INSTALL.md, UNINSTALL.md, bundle.json and SHA256SUMS. –out must be absent or empty; nothing is left behind on failure. –input-prefix, –tool-name and –annotation-domain choose the names the operator sees (the input variables of prepare.sh, the tool in generated comments, the domain of the annotation and label keys); the defaults give the same bundle as before.

piceli cache prune

Remove what no release, rollback or resume needs: stale temporary directories and partial files, runs beyond –keep-last, unused delivery receipts, and (over –budget) build outputs and logs.

Option

Type

Default

Description

TARGET

text

--env

text

Only this environment’s state (default: every environment)

--state-dir

path

A pipeline state directory, instead of a pipeline (default: ./.piceli-deploy)

--keep-last

integer

10

Runs to keep (at least 1)

--budget

text

Also free space until each state directory fits, e.g. 20GiB (default: the pipeline’s cache_budget)

--dry-run

boolean

False

List what would be removed; remove nothing

Contract

  • Reads: pipeline module or –state-dir, state_dir, temporary directory

  • Writes: state_dir (old runs, unused delivery receipts, build outputs and logs, stale partial files), stale piceli-* temporary directories

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never removes the release state (catalog, execution journal, secret store, approved plans, backups, history), build or mirror receipts, the latest run, a resumable run or the runs of the last –keep-last applied releases. Holds each state directory’s run lock (pipeline-locked while a deploy runs). With shared state (state=“cluster”) only machine-local files are pruned. –dry-run removes nothing. Exit 1 (cache-over-budget) when a state directory is still over the budget. Always prints one JSON object.

piceli cache status

Show the disk used per state directory and category, and Piceli’s temporary directories. Read-only.

Option

Type

Default

Description

TARGET

text

--env

text

Only this environment’s state (default: every environment)

--state-dir

path

A pipeline state directory, instead of a pipeline (default: ./.piceli-deploy)

--keep-last

integer

10

Runs a prune keeps (for reclaimable_bytes)

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: pipeline module or –state-dir, state_dir, temporary directory

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only; never contacts a cluster. Categories: builds (outputs and logs), toolchains, blobs, receipts, runs (journals and summaries), release (never pruned), other, temp (partial files). reclaimable_bytes is what cache prune with –keep-last would free.

piceli chart manifests

Print (or write) plain manifests with a values file applied; no Helm needed.

Option

Type

Default

Description

TARGET

text

--values, -f

path (repeatable)

YAML values file merged over the chart defaults (repeatable; later files win), as for helm install –values

--out

path

Write one YAML file per object (as render –out) instead of printing

--install-namespace

text

Namespace the manifests install into (default: the render’s)

--spec

path

release.toml, as for piceli render

--namespace

text

Namespace to render into; the chart installs into the release namespace (–namespace of helm) instead

--env

text

Render this environment of the App

--name

text

Chart name (default: the App name, its app.kubernetes.io/part-of label)

--version

text

0.1.0

Chart version (SemVer 2)

--app-version

text

appVersion of Chart.yaml (default: the chart version)

Contract

  • Reads: module/app file, release.toml (optional), local receipts, values files

  • Writes: –out directory

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts a cluster. Values merge over the chart defaults like Helm (null removes a key) and are validated against the chart schema (chart-values-invalid). Prints YAML, or with –out writes one file per object like render –out and prints one JSON object. Secrets are left out (provided by the client).

piceli chart package

Write the chart archive -.tgz (byte-identical per chart).

Option

Type

Default

Description

TARGET

text

--out

path

.

Directory for -.tgz (created if absent)

--spec

path

release.toml, as for piceli render

--namespace

text

Namespace to render into; the chart installs into the release namespace (–namespace of helm) instead

--env

text

Render this environment of the App

--name

text

Chart name (default: the App name, its app.kubernetes.io/part-of label)

--version

text

0.1.0

Chart version (SemVer 2)

--app-version

text

appVersion of Chart.yaml (default: the chart version)

Contract

  • Reads: module/app file, release.toml (optional), local receipts

  • Writes: –out directory (-.tgz)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts a cluster. The same render, name and version always give the same bytes and digest; an existing archive with other content is refused (bump –version).

piceli chart publish

Push the chart to an OCI registry as helm push does (needs –approve DIGEST).

Option

Type

Default

Description

TARGET

text

--to

text

oci://host[:port]/path; the chart goes to path/:

--spec

path

release.toml, as for piceli render

--namespace

text

Namespace to render into; the chart installs into the release namespace (–namespace of helm) instead

--env

text

Render this environment of the App

--name

text

Chart name (default: the App name, its app.kubernetes.io/part-of label)

--version

text

0.1.0

Chart version (SemVer 2)

--app-version

text

appVersion of Chart.yaml (default: the chart version)

--approve

text

The digest printed without –approve; pushes it

--credentials

path

Private JSON file: {“username”, “password”} or {“token”}

--ca-file

path

CA bundle for a TLS registry

Contract

  • Reads: module/app file, release.toml (optional), local receipts, credentials file

  • Writes: OCI registry (chart blobs, manifest, version tag)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Never contacts a cluster. –to oci://host[:port]/path pushes path/: (config application/vnd.cncf.helm.config.v1+json, layer application/vnd.cncf.helm.chart.content.v1.tar+gzip). Without –approve it prints the deterministic digest and exits 3; –approve DIGEST pushes by digest, then the tag, and reads both back. Credentials only from –credentials FILE, never printed.

piceli chart render

Write the app as a Helm chart directory (Chart.yaml, values, schema, templates).

Option

Type

Default

Description

TARGET

text

--out

path

Chart directory to write; absent, empty or a previous chart render

--spec

path

release.toml, as for piceli render

--namespace

text

Namespace to render into; the chart installs into the release namespace (–namespace of helm) instead

--env

text

Render this environment of the App

--name

text

Chart name (default: the App name, its app.kubernetes.io/part-of label)

--version

text

0.1.0

Chart version (SemVer 2)

--app-version

text

appVersion of Chart.yaml (default: the chart version)

Contract

  • Reads: module/app file, release.toml (optional), local receipts

  • Writes: –out chart directory

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts a cluster. Renders like piceli render; images, pull secrets, replicas, resources, node selectors, storage, hosts, ConfigMap keys and Secret names become values, documented and validated by values.schema.json. Secrets are never rendered: the chart reads existing Secrets by name. Objects holding redacted or apply-time secret values are refused. Deterministic. –out must be absent, empty or a previous chart render (.piceli-chart).

piceli cluster init

Set the cluster up: node labels, registry and mirrors, controller, UI (plan first; –approve HASH applies).

Option

Type

Default

Description

REF

text

required

--approve

text

The plan hash to execute

--wait

integer

120

Seconds to wait for the node mirrors to report after installing

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster), credential profile

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Reaches the cluster with the declaration’s credential profile (or –profile) and refuses one whose API server is not Cluster(api=) (cluster-api-mismatch). Without –approve prints the plan (Node label changes, objects) and its hash, exit 3. Idempotent: a re-run plans only changes (unchanged, exit 0). After applying it waits up to –wait seconds for the node mirrors and lists k3s nodes that need a k3s restart (restart_needed); it never restarts k3s. The controller’s configuration and Deployment come from piceli gitops enable.

piceli cluster status

Nodes, registry and mirrors, controller, UI and Git Secret of a declared cluster (read-only).

Option

Type

Default

Description

REF

text

required

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster), credential profile

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only. state: ready, degraded (problems lists why) or not-initialized. The Git Secret shows its key names only.

piceli codegen crd

Generate pydantic models for one CRD version, from a file or a cluster.

Option

Type

Default

Description

FILE

path

--crd

text

CRD name (plural.group) or kind; required with –from-cluster or when the file holds several CRDs

--version

text

CRD version to generate (default: the storage version)

--from-cluster

boolean

False

Read the CRD from a cluster (–kubeconfig, –context, –crd)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Explicit context (never current-context)

--transport

choice

https

https, or loopback-http for a local test API server only

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--out

path

Write the module here (stdout: a JSON summary)

--force

boolean

False

Overwrite an –out file that piceli did not generate

--json

boolean

False

Without –out: print one JSON object with the module

Contract

  • Reads: CRD file, kubeconfig (with –from-cluster)

  • Writes: –out file

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: A file never contacts a cluster; –from-cluster sends one GET of the CRD through an explicit –kubeconfig and –context (exec plugins only with –allow-exec). Deterministic: the same schema always generates the same module. –out replaces only a file piceli generated, unless –force.

piceli cycle report

Push to running and checked per target: p50, p90, count, slowest phase and slowest cycle, from the controller’s history and local records.

Option

Type

Default

Description

--since

text

Only cycles that ended in this window (24h, 30m, 7d) or after this ISO time; default: all that are kept

--target

text

Only this target (environment, host, train)

--json

boolean

False

Print one JSON object on stdout

--markdown

boolean

False

Print a Markdown table on stdout (to paste into docs)

--train-state-dir

path

Train state root (default $XDG_STATE_HOME/piceli/train)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir (optional), the controller’s status and history, local train run records, host switches piceli host wait kept

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.28.0. Read-only. –json prints piceli.cycle-report.v1; –markdown prints a Markdown table on stdout instead; –since (24h, 7d or an ISO time) and –target filter it (cycle-options-invalid). Without –kubeconfig/–context or –state-dir the controller is not read.

piceli deploy

Deploy a pipeline: inputs → build → deliver → plan → apply → checks.

Option

Type

Default

Description

TARGET

text

--plan

boolean

False

Plan every stage and print the combined hash; execute nothing

--until

text

checks

Stop after this stage: inputs, build, deliver, prerollout (only with a pre-rollout check), backup (with restore_points), plan, apply or checks

--resume

boolean

False

Continue the latest interrupted or failed run at its failed stage

--approve

text

Combined hash to execute (from –plan)

--auto-approve

boolean

False

Plan and execute without confirmation (CI)

--approve-if-policy

boolean

False

Execute without –approve only when every action of the plan is inside the pipeline’s auto_approve policy (declared by the owner); otherwise print the approval command and exit 3

--reapply

boolean

False

Apply even when the release is unchanged and already deployed

--json

boolean

False

Stream one JSON event per stage change on stdout

--ref

text (repeatable)

Build SOURCE from commit REV (branch, tag or SHA) in a temporary worktree instead of the working tree; repeatable. A bare REV pins every source when they are one repository

--out

path

With –plan: also write the portable plan file here (apply it on any runner with –apply FILE –approve HASH)

--apply

path

Apply the plan file written by –plan –out (needs –approve with its combined hash); re-plans and refuses any change

--otlp-endpoint

text

Send this run’s events (a trace with one span per stage and a result log record) to an OTLP/HTTP endpoint; the standard OTEL_EXPORTER_OTLP_* variables also enable it. Never fails a deploy

--env

text

Environment to deploy: the app’s overrides and the pipeline’s target for it (required when the pipeline has one target per environment); the combined hash covers its name and values

Contract

  • Reads: pipeline module, build specs and sources, git (source identity; –ref commits), docker, kubeconfig, state_dir, source registries of mirror= images (pull only), mirror_credentials files

  • Writes: state_dir (run journal, receipts, release catalog, secret store), shared state Secrets and release Lease (state=“cluster”), –out plan file, local Docker image store, registry or node image store, temporary git worktrees with –ref (removed on exit)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: –plan never changes the cluster, a registry or a node (it reads the namespace’s Deployments and the registry node for a NodeLoopbackRegistry); before the images exist it previews the release with placeholder images (never approvable, never sent to the cluster) and refuses with the blocking objects when it needs adoption or replacement; –approve HASH executes exactly the combined plan, including mirror= copies and a registry adopt=/replace=, and a release planned after delivery may not adopt, replace or delete more than the approved preview; –resume continues the latest interrupted run without a new approval. Unchanged stages are skipped. –ref [SOURCE=]REV builds the sources from commits in temporary worktrees; the combined hash covers the resolved SHAs, –approve needs the same –ref, and –resume reuses the run’s SHAs. –plan –out FILE writes a portable plan; –apply FILE –approve HASH applies it on any runner (it re-plans and refuses any difference; no build cache needed for images already delivered). With state=“cluster” every command holds the release’s Lease (pipeline-locked when another runner holds it; a stale lease is taken over) and –plan writes its state to the cluster too. –env NAME deploys one environment (the app’s overrides and the pipeline’s target for it, state under <state_dir>/environments/NAME); the combined hash covers the environment’s name and resolved values, so –approve, –resume and –plan –out/–apply need the same –env. –approve-if-policy plans and executes without a hash only when every action is inside the pipeline’s auto_approve policy (declared by the owner, part of the combined hash; never delete, replace or adopt); otherwise exit 3 with reason approval-policy-exceeded and the approval command. Every run that starts executing writes <state_dir>/runs//summary.json (schema docs/schemas/piceli-run-summary-v1.schema.json) and summary.md; the result names them (summary). With the pipeline’s cache_budget the state directory is pruned after the run (result: cache).

piceli dev cache clear

Empty free lineages’ cargo targets (a corrupted cache); busy ones are skipped.

Option

Type

Default

Description

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--lineage

text

KEY/N, KEY, or a root source name (every lineage of it); default: all

--crate

text (repeatable)

Only this crate’s artifacts and extracted sources (NAME: every version, or NAME-VERSION; repeat)

--registry-src

boolean

False

Only the crates cargo extracted into the cache’s cargo homes (registry/src; all, or –crate’s), no lineage’s target (0.77.0)

--host

text

A declared docker or native build host’s cache (0.20.0; default: the in-cluster builder’s)

--allow-exec

boolean

False

Allow the profile’s exec credential plugin

--exec-sha256

text

Pin the exec credential plugin’s sha256

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=), credential profile

  • Writes: a short Job in piceli-dev (deleted when it ends)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.19.0. A lineage a run holds is skipped and listed under busy. The next run on a cleared lineage is cold. Exit 1: dev-cache-clear-failed (the Job printed no result). 0.77.0: –crate also removes that crate’s directories under registry/src of the cache’s cargo homes (NAME: every version; NAME-VERSION: one), listed under sources; –registry-src removes only those (all, or –crate’s) and no target. Never registry/cache nor registry/index: cargo extracts them again on the next build. A cargo home a build still holds (cargo’s package cache lock, 60 s) is listed under sources_busy.

piceli dev cancel

Cancel a queued or running run (its Job and pod are deleted).

Option

Type

Default

Description

RUN_ID

text

required

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--allow-exec

boolean

False

Allow the profile’s exec credential plugin

--exec-sha256

text

Pin the exec credential plugin’s sha256

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=), credential profile

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Only your own runs (the run id dev run printed); the run ends as dev-run-cancelled. dev-run-unknown when it is not queued or running.

piceli dev hosts

Each declared build host: up or down (why), platforms, slots, runs and queue; a docker or native host’s cache and lineages.

Option

Type

Default

Description

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--allow-exec

boolean

False

Allow the profile’s exec credential plugin

--exec-sha256

text

Pin the exec credential plugin’s sha256

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=), each host’s container engine (docker hosts), the queue files (native hosts), the builder node (cluster host)

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.20.0. Read-only. A docker host is asked with its CLI (info, ps, volume ls), locally or over its ssh:// context. 0.22.0: each host’s health events and quarantine (health).

piceli dev logs

A run’s output (stdout): live, or the recorded tail of a finished run.

Option

Type

Default

Description

RUN_ID

text

required

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--follow

boolean

False

Stream until the run ends

--tail

integer

Only the last N lines

--allow-exec

boolean

False

Allow the profile’s exec credential plugin

--exec-sha256

text

Pin the exec credential plugin’s sha256

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=), credential profile

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only. The log on stdout; dev-run-unknown for a run that is neither live nor among the last 50 recorded.

piceli dev nix build

Build a flake output on a Nix build host; with –publish, sign and push it.

Option

Type

Default

Description

ATTR

text

required

--cluster, --dev

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of a piceli.infra.DevBuilds (no cluster needed), or of a Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--ref

text

Build this commit (required with –publish)

--worktree

path

Build this working tree (default: here)

--repo

path

.

The repository with –ref (default: here)

--name

text

The manifest’s name (default: HOST of nixosConfigurations.HOST, HOST-image with –image)

--profile

text

A Nix profile (default: the first nix=True)

--host

text

A docker or native build host (default: the first)

--image

boolean

False

The output is a disk image: copy its file back with its sha256

--publish

text

MODULE:ATTR of a piceli.infra.NixCache: sign and push the closure, upload the manifest (needs –approve)

--tag-pattern

text

With –publish: the pointer names the highest version tag at the commit matching this NixHost Tag pattern (web-v*), compared after its prefix (default: –ref when it is a tag, else the first tag at the commit)

--branch

text

With –publish: also point refs/heads/BRANCH at this build (default: –ref when it names a branch)

--approve

text

The publish plan’s digest

--release

text

With –publish: the host of a NixRelease with gate=Promotion(…) in –composition; the publish needs its promotion gate to pass

--composition

path

The composition module declaring the gated NixRelease (default: the –publish module; –release’s default: infra.py)

--kubeconfig

path

With –release: reach the controller with this kubeconfig (default: the composition’s cluster’s credential profile)

--context

text

With –kubeconfig: its context

--state-dir

path

With –release: a local controller’s state directory

--namespace

text

piceli-system

With –release: the controller’s namespace

--input

text (repeatable)

A private flake input to fetch on the build host before the build, NAME or NAME=CREDENTIAL (a git-token in this machine’s piceli secrets; default: git); repeat. The NixRelease of the composition that publishes this output adds its own

--artifact

text (repeatable)

A file of the built output to copy back: a path or glob under it (release.json, share/*.txt); repeat. The result lists each with its sha256; one that matches nothing fails the build

--artifacts-dir

path

piceli-dev-artifacts

Where an image or –artifact files land (RUN/)

--queue-timeout

integer

3600

Seconds to wait for a slot

--quiet

boolean

False

Do not stream the build’s log

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.DevBuilds, or a Cluster with dev=), MODULE:ATTR (piceli.infra.NixCache, –publish), the local Git repository, credentials (signing key, S3 keys; –publish after approval)

  • Writes: –artifacts-dir RUN/ and NAME.image.json (with –image), the build host’s Nix store, the binary cache and piceli/NAME/REV.json (–publish)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: 0.24.0. Without –publish it is a development run (no approval; covered like dev run). With –publish it prints the plan (commit, output, host, cache, key) and exits 3; –approve DIGEST builds, then a separate step on the same host receives the signing key and S3 keys on stdin only (never the build), pushes with nix copy and the client uploads the manifest. Prints the store path, the image’s sha256 and the public key, never a secret. Exit 1: the build failed, no output (dev-nix-no-output), dev-nix-publish-failed, dev-nix-manifest-failed. –tag-pattern GLOB (a NixHost’s Tag pattern) points the highest version tag of that pattern at the commit; a –ref tag of another pattern is refused (dev-nix-invalid). A publish of a gated host’s attribute to its cache (a NixRelease or NixHost with gate= in the –publish module or –composition MODULE; –release HOST names it) runs the promotion gate at plan time: the commit’s flake.lock must pin the gate’s input to a commit its environment ran with passed release checks (promotion-not-verified, promotion-input-missing); the history is read as gitops status reads it (–state-dir, –kubeconfig/–context, else the composition cluster’s profile) and an unreadable one refuses (promotion-history-unreachable). The plan, and the signed manifest, carry pinned.

piceli dev nix gc

Remove builds of old commits from a Nix cache: plan, then –approve.

Option

Type

Default

Description

--cache

text

required

MODULE:ATTR of the piceli.infra.NixCache

--repo

path

.

The repository whose tags and main count

--keep-tags

integer

5

Keep the builds of the newest N tags

--tag-pattern

text (repeatable)

Keep the newest –keep-tags versions of each NixHost Tag pattern (web-v*, compared after its prefix) instead of the newest tags by date; repeat it for each host of the repository

--main

text

main

The branch whose current commit stays

--grace

integer

3600

Seconds: younger objects stay (a publish in progress)

--approve

text

The gc plan’s digest

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.NixCache), the local Git repository (tags, main), the cache’s objects (write credentials)

  • Writes: the binary cache (deleted manifests, narinfos, NAR files)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: 0.24.0. Without –approve prints the keys it would delete and the plan digest (exit 3; 0 and state clean when nothing goes). A path a kept manifest’s closure reaches is never deleted; objects younger than –grace stay. –approve with another digest is refused (dev-nix-plan-changed); a failed delete exits 1 (dev-nix-gc-failed). –tag-pattern GLOB (repeatable, each host’s Tag pattern) keeps the newest –keep-tags versions of each pattern, compared after its prefix; the plan lists tag_patterns.

piceli dev release-host

Clear a build host’s health events: it is no longer quarantined (0.22.0).

Option

Type

Default

Description

NAME

text

required

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=)

  • Writes: the host’s health record (its piceli-health-* volumes on a docker host, health.json in a native host’s state_dir)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.22.0. Never contacts the cluster. The builder node’s health is the GitOps controller’s: piceli gitops release-host.

piceli dev run

Run COMMAND on the builder for a commit (–ref) or a working tree (default: here).

Option

Type

Default

Description

COMMAND

text

required

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--ref

text

Build this commit (branch, tag or sha) of the repository

--worktree

path

Build this working tree as it is on disk (uncommitted and new files; not Git’s ignored ones). The default without –ref: here

--repo

path

.

The root source’s repository with –ref (default: here)

--name

text

The root source’s name and lineage (default: the repository’s main checkout directory, shared by its worktrees)

--cwd

text

Where the command runs, inside the root source (default: your directory’s place in it)

--source

text (repeatable)

A sibling source NAME=PATH@REF (repeat); it sits next to the root, as …/NAME

--profile

text

A DevProfile name (default: the first)

--node

text

The builder node (must be the declared one)

--host

text

env PICELI_DEV_HOST

Run on this declared build host only (default: the first that is up, with a free slot first; the next one if it turns out down)

--platform

text

linux/amd64 or linux/arm64 (default: the host’s own; a docker host runs another one emulated, slower)

--priority

text

agent

round (integration rounds), agent or normal

--requester

text

Who asks (fair share; default PICELI_DEV_REQUESTER or user-host)

--artifact

text (repeatable)

Copy back files matching this glob (target/… is the target dir; repeat)

--artifacts-dir

path

piceli-dev-artifacts

Where artifacts land (under RUN/)

--env

text (repeatable)

NAME=VALUE, or NAME for its value here, over the profile’s env for this run (repeat; not for secrets: the run’s Job shows it)

--queue-timeout

integer

3600

Seconds to wait for a slot

--unschedulable-seconds

integer

60

Fail when the run’s pod finds no node for this long, with the scheduler’s reason (0.35.0)

--quiet

boolean

False

Do not stream the run’s log (the tail is still in the result)

--keep

boolean

False

Keep the run’s Job (debugging)

--allow-exec

boolean

False

Allow the profile’s exec credential plugin

--exec-sha256

text

Pin the exec credential plugin’s sha256

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=), credential profile, the local Git repositories of the sources

  • Writes: –artifacts-dir RUN/ (with –artifact), the build host’s health record (0.22.0, after a machine-health sign)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Safe for agents: the owner approved what runs may do when piceli cluster init applied Cluster(dev=DevBuilds(…)); each run is an isolated pod in piceli-dev (non-root, no token, no Secret, no cluster network) that only builds in the shared dev cache, never in release caches. Exit 0 the command passed; 1 it failed (dev-command-failed), timed out, ran out of memory, was cancelled or the run broke; 2 refused (dev-not-enabled, dev-ref-unknown, dev-source-invalid, dev-profile-unknown, dev-run-invalid). The run’s Job is removed on every outcome. 0.22.0: a quarantined build host is skipped (said on stderr); a run showing a machine-health sign records an event on its host (health and host_quarantined in the result).

piceli dev schedule

Run the queue yourself (a cluster without the GitOps controller, which runs it).

Option

Type

Default

Description

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--once

boolean

False

One tick, print the status, exit

--allow-exec

boolean

False

Allow the profile’s exec credential plugin

--exec-sha256

text

Pin the exec credential plugin’s sha256

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=), credential profile

  • Writes: ConfigMap piceli-dev-status in piceli-system

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Starts queued runs into the slots, records finished runs and deletes their Jobs. –once ticks once and prints the status. Only one queue should run: not next to a controller that runs it.

piceli dev status

Slots, running and queued runs (with their position), recent runs and cache use.

Option

Type

Default

Description

--cluster

text

env PICELI_DEV_CLUSTER

MODULE:ATTR of the piceli.infra.Cluster with dev=DevBuilds(…) (or PICELI_DEV_CLUSTER)

--allow-exec

boolean

False

Allow the profile’s exec credential plugin

--exec-sha256

text

Pin the exec credential plugin’s sha256

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Cluster with dev=), credential profile

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only. Reads the Jobs in piceli-dev and the scheduler’s ConfigMap piceli-dev-status (piceli-system).

piceli doctor

Check this runner: free disk and memory against what the next build needs (estimated from the last build receipts), and the tools the pipeline uses (docker, docker buildx, kubectl). Exit 1 on a warning.

Option

Type

Default

Description

TARGET

text

--env

text

Only this environment’s state (default: every environment)

--state-dir

path

A pipeline state directory, instead of a pipeline (default: ./.piceli-deploy)

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: pipeline module or –state-dir, build receipts, docker, docker buildx, kubectl (version only)

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only; never contacts a cluster. Exit 1 with a warning (runner-disk-low, runner-memory-low, runner-tool-missing); the need is estimated from the last build receipts.

piceli env down

Delete BRANCH’s environment: its claims, namespace and volumes (never main’s).

Option

Type

Default

Description

BRANCH

text

required

--pipeline

text

env PICELI_PIPELINE

The pipeline: MODULE:ATTR or path/to/file.py:ATTR naming a Pipeline that declares envs=EnvConfig(…) (default: $PICELI_PIPELINE)

--approve

text

The env_hash to execute (from the plan)

--approve-if-policy

boolean

False

Execute without –approve when the owner allows it: EnvConfig(auto_approve=True) for branch environments, or the pipeline’s auto_approve policy for the deploy (never for main’s teardown or seed)

--cluster

text

Ask the GitOps controller of this composition’s Cluster (infra.py:CLUSTER, its credentials profile) instead of –pipeline: a preview of the branch, now

--state-dir

path

With the controller: a local controller’s state directory

--namespace

text

piceli-system

With the controller: its namespace

--transport

text

https

https, or loopback-http for a local test API

--wait

boolean

False

With the controller: wait until the preview is removed

--timeout

text

10m

With the controller and –wait: give up after (10m, 1h)

--interval

float

2.0

With the controller and –wait: seconds between status reads

Contract

  • Reads: pipeline module (–pipeline or $PICELI_PIPELINE), kubeconfig, –cluster infra.py:CLUSTER (its credentials profile) or –state-dir

  • Writes: <state_dir>/branches/ (removed), –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Refuses the main branch and the main namespace always (env-main-protected) and a namespace without this app’s piceli.io/env-of label or of another branch (env-namespace-not-managed). The plan lists the claims and the volumes bound to them; with –approve HASH (or –approve-if-policy and EnvConfig(auto_approve=True)) it deletes the claims, the namespace and those volumes. An absent environment prints state absent (exit 0). 0.28.0: with –cluster (or –state-dir) it asks the GitOps controller to tear the branch’s preview down; it stays down until the branch’s next push. –wait waits until it is removed (exit 0), rejected (1) or timed out (2).

piceli env push

Record a laptop-built digest for a branch environment (plan, then –approve HASH).

Option

Type

Default

Description

BRANCH

text

required

TARGET

text

required

--receipt

path

A host-build receipt (JSON)

--digest

text (repeatable)

IMAGE=sha256:; repeat per image

--commit

text

The source commit of the build

--namespace

text

The environment’s namespace (default: from the pipeline’s envs)

--approve

text

The plan hash to execute

--env

text

The pipeline’s environment

Contract

  • Reads: pipeline module, kubeconfig, the receipt file

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Writes the ConfigMap piceli-env- (keys images, commit, pushed_at) in the branch environment’s namespace, creating the namespace when absent. It pushes no image and deploys nothing.

piceli env seed

Restore main’s latest restore point into BRANCH’s claims (replaces their content).

Option

Type

Default

Description

BRANCH

text

required

--pipeline

text

env PICELI_PIPELINE

The pipeline: MODULE:ATTR or path/to/file.py:ATTR naming a Pipeline that declares envs=EnvConfig(…) (default: $PICELI_PIPELINE)

--from

text

The branch whose latest restore point is restored (main)

--approve

text

The env_hash to execute (from the plan)

--approve-if-policy

boolean

False

Execute without –approve when the owner allows it: EnvConfig(auto_approve=True) for branch environments, or the pipeline’s auto_approve policy for the deploy (never for main’s teardown or seed)

Contract

  • Reads: pipeline module (–pipeline or $PICELI_PIPELINE), restore point directory, kubeconfig

  • Writes: restore point directory (restores/ receipts)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Uses the restore machinery of piceli restore: verifies the archives, stops the branch’s writers, empties and restores each claim, checks the content digest in the cluster and starts the writers again. Never reads or writes main’s claims (the archives are local). Refuses the main branch (env-main-protected).

piceli env start

Ask the GitOps controller to start named environment ENV again.

Option

Type

Default

Description

ENV

text

required

--cluster

text

The composition’s Cluster (infra.py:CLUSTER); its credentials profile reaches the controller

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: –cluster infra.py:CLUSTER (its credentials profile) or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Writes a start request; a deploy it needs asks for the usual approval. Refused (gitops-env-stop-declared) for an environment the composition declares Environment(stopped=True): the declaration wins.

piceli env stop

Ask the GitOps controller to stop named environment ENV (no replicas, claims kept).

Option

Type

Default

Description

ENV

text

required

--cluster

text

The composition’s Cluster (infra.py:CLUSTER); its credentials profile reaches the controller

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: –cluster infra.py:CLUSTER (its credentials profile) or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Writes a stop request to the ConfigMap piceli-gitops-requests; the controller scales the environment’s workloads to zero on its next poll and shows it stopped (reason requested) in gitops status. The owner’s command is the decision: no plan hash. piceli env start ENV ends it. An unknown environment is dropped (gitops-request-invalid in gitops status).

piceli env up

Deploy BRANCH into its namespace (created when absent), isolated.

Option

Type

Default

Description

BRANCH

text

required

--pipeline

text

env PICELI_PIPELINE

The pipeline: MODULE:ATTR or path/to/file.py:ATTR naming a Pipeline that declares envs=EnvConfig(…) (default: $PICELI_PIPELINE)

--commit

text

The commit deployed (recorded, shown)

--digest

text (repeatable)

The image of build NAME as repository@sha256:… (repeatable); branch environments never build

--receipt

path

A build receipt: JSON {“images”: {NAME: REF}}

--seed-from

text

Restore this branch’s latest restore point (main) into the environment’s claims after the deploy

--plan

boolean

False

Plan only; print the env_hash

--approve

text

The env_hash to execute (from the plan)

--approve-if-policy

boolean

False

Execute without –approve when the owner allows it: EnvConfig(auto_approve=True) for branch environments, or the pipeline’s auto_approve policy for the deploy (never for main’s teardown or seed)

--wait

boolean

False

With –pipeline: when the budget is full, refuse (env-budget-full) instead of stopping the least recently pushed environment. With the controller: wait until the preview is ready and print its URL (exit 0), failed (1) or timed out (2)

--cluster

text

Ask the GitOps controller of this composition’s Cluster (infra.py:CLUSTER, its credentials profile) instead of –pipeline: a preview of the branch, now

--state-dir

path

With the controller: a local controller’s state directory

--namespace

text

piceli-system

With the controller: its namespace

--transport

text

https

https, or loopback-http for a local test API

--timeout

text

10m

With the controller and –wait: give up after (10m, 1h)

--interval

float

2.0

With the controller and –wait: seconds between status reads

Contract

  • Reads: pipeline module (–pipeline or $PICELI_PIPELINE), kubeconfig, state_dir, build receipt (–receipt), –cluster infra.py:CLUSTER (its credentials profile) or –state-dir

  • Writes: <state_dir>/branches/ (journal, release state, secrets), –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: The branch’s namespace is (at most 63 characters, hash suffix when cut); main maps to the main namespace, which is never created. Branch environments never build: images come from –digest NAME=REF or –receipt. The app is isolated at render time (relative Service names, no NodePort, hostPort or hostPath, namespace-qualified cluster objects, its own generated Secrets) and gets a default-deny NetworkPolicy across namespaces and a ResourceQuota. The plan (–plan, or without an approval) lists the namespace to create, the environments the budget stops (max_envs, least recently pushed first; scaled to zero, kept), the deploy’s combined plan and the seed (–seed-from main). –approve-if-policy runs a branch when EnvConfig(auto_approve=True), or when the pipeline’s auto_approve policy allows the deploy and nothing is stopped; main only by the policy. –wait refuses with env-budget-full instead of stopping. 0.28.0: with –cluster infra.py:CLUSTER (or –state-dir) it asks a composition’s GitOps controller instead: a preview request in the ConfigMap piceli-gitops-requests, served within seconds (the controller wakes for it), taking the images a train offered for the branch’s head; a branch outside the rule’s patterns gets one on request. –wait then waits until the preview runs its head with its checks passed and prints its URL (Environment.per_branch(url=…)) once (exit 0), the failure or a rejected request (exit 1), or the timeout (gitops-wait-timeout, exit 2). The –pipeline options are refused there (gitops-request-invalid).

piceli envs

List every environment: branch, namespace, commit, deploy state, health, age.

Option

Type

Default

Description

--pipeline

text

env PICELI_PIPELINE

The pipeline: MODULE:ATTR or path/to/file.py:ATTR naming a Pipeline that declares envs=EnvConfig(…) (default: $PICELI_PIPELINE)

--json

boolean

False

Print one piceli.envs.v1 JSON object

Contract

  • Reads: pipeline module (–pipeline or $PICELI_PIPELINE), kubeconfig

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only. Human table on stderr; –json prints one piceli.envs.v1 object (envs[]: branch, namespace, main, state running|stopped|absent, health healthy|degraded|stopped|unknown, commit, build, deploy, created_at, pushed_at, age_seconds, workloads, gitops, fixed). Named environments are listed after main with fixed=true and their name as branch.

piceli explain

Explain an error code: cause, fix and whether a retry can succeed.

Option

Type

Default

Description

CODE

text

--json

boolean

False

Print the entry as one JSON object

--run

text

Explain a past execution instead (execution id, unique prefix or piceli deploy run id; needs –spec): same as piceli release status --run

--spec

text

With –run: path/to/release.toml or MODULE:ATTR of a Pipeline

--env

text

With –run: the pipeline’s environment

Contract

  • Reads: nothing

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --run ID --spec SPEC explains a past execution instead, from the local state (same as piceli release status --spec SPEC --run ID).

piceli gitops alarms

The controller’s alarms: failed or waiting environments, failed Nix releases, a composition that does not import, a new version. With –follow, each new one also as a desktop notification.

Option

Type

Default

Description

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--follow

boolean

False

Keep reading the status and raise each new alarm as a desktop notification (Ctrl-C stops)

--interval

float

30.0

Seconds between two status reads

--waiting-after

text

How long a wait for a build host or an approval may last (default: the controller’s Alarms(waiting_after=), else 10m)

--desktop, --no-desktop

boolean

True

With –follow: raise desktop notifications

--polls

integer

0

With –follow: stop after this many reads (0: never)

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, the controller’s status

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.28.0. Read-only. Each alarm is shown once per run of the command (a resolved one once more); –follow keeps reading every –interval seconds (–polls N stops after N reads). –json prints piceli.gitops-alarms.v1 with each alarm as piceli.alarm.v1. The controller itself sends to the ntfy and webhook targets of Controller(alarms=Alarms(…)).

piceli gitops approve

Approve the pending plan of ENV; the controller applies it on its next poll.

Option

Type

Default

Description

ENV

text

required

PLAN_HASH

text

required

--traceparent

text

A NixRelease: the W3C traceparent (00-<32 hex>-<16 hex>-<2 hex>) its publish and the hosts’ deploy join

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: This is the owner’s approval: run it only with the hash the owner approved. Writes a request to the ConfigMap piceli-gitops-requests; a hash the environment is no longer waiting for is dropped (gitops-approval-stale in gitops status). 0.25.0: ENV may name a NixRelease waiting in approval-required; the hash is its plan digest, and approving it lets a build host build, sign and publish that tag. 0.52.0: –traceparent (a W3C traceparent) replaces the release’s trace, outside its digest; the build host signs it into the ref pointer and the hosts’ deploy joins it (a bad one: gitops-traceparent-invalid).

piceli gitops build

Ask the controller to build NAME now: a NixRelease plans –ref, an environment rebuilds its images; the same gate, plan and approval apply.

Option

Type

Default

Description

NAME

text

required

--ref

text

A tag of the release, its branch or a full commit (default: the newest); an environment builds the commit it follows

--approve

text

Approve the plan in one go when its digest is this sha256:… (a NixRelease)

--by

text

Who asks (default: your user name)

--traceparent

text

A NixRelease: the W3C traceparent (00-<32 hex>-<16 hex>-<2 hex>) its publish and the hosts’ deploy join

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. Writes a build request; the controller plans it on its next poll, recorded as triggered by cli with the requester (–by, else the user name). A NixRelease waits in approval-required unless auto_approve or –approve names the plan’s digest. An environment rebuilds every image at the commit it follows (–ref may name it), since 0.29.0 also when that commit is already deployed. An unknown target or ref is dropped (gitops-request-invalid or gitops-build-ref-unknown in gitops status). 0.52.0: –traceparent (a W3C traceparent) is the trace a NixRelease’s publish and the hosts’ deploy join, kept outside the plan’s digest; without it the controller starts one (a bad one: gitops-traceparent-invalid).

piceli gitops builds

List every build the controller knows (NixRelease publishes, image builds, train handoffs): trigger, commit, host, stage, step times, log tail, targets.

Option

Type

Default

Description

--target

text

Only this target’s builds

--state

text

Only builds in this stage (queued, building, published, failed, …), or active for the unfinished ones

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, the controller’s status and history

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. Read-only. –json prints piceli.builds.v1; –target and –state (a stage, or active) filter it.

piceli gitops cache clear

Ask the controller to empty its build cache (a corrupted cargo cache).

Option

Type

Default

Description

--crate

text (repeatable)

Only this crate’s artifacts (repeat)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.19.0. Writes a request to the ConfigMap piceli-gitops-requests; the controller runs a short Job on the builder node between steps and records controller.cache_clear (at, crates, state) in gitops status. The next build is cold for what was cleared. A controller without –builder-image drops it (gitops-request-invalid).

piceli gitops cancel

Cancel NAME’s queued or running build: unclaimed it is dropped, claimed the build host stops at its next stage.

Option

Type

Default

Description

NAME

text

required

--by

text

Who asks (default: your user name)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. Unclaimed, the build is dropped; claimed, the build host stops at its next stage and its answer is refused. A cancelled image build fails its step until piceli gitops sync; a cancelled publish waits for a newer tag, a sync or a build. Nothing running: gitops-build-not-running in gitops status.

piceli gitops candidate list

Each candidate the controller holds, newest first, and its state.

Option

Type

Default

Description

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, the controller’s status

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.83.0. Read-only. –json prints piceli.gitops-candidates.v1 (candidates: commit, state, since, reason, detail, copies, released, run, passed_at, digests). The digests feed piceli artifacts retention –pin-file.

piceli gitops candidate release

Mark the ready candidate of COMMIT released: it stays, with its digests.

Option

Type

Default

Description

COMMIT

text

required

--env

text

The candidate’s environment (the controller has one)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.83.0. Writes a request to the ConfigMap piceli-gitops-requests; a candidate that is not ready is refused (gitops-request-invalid).

piceli gitops candidate request

Prepare the candidate of COMMIT now: no quiet time to wait for.

Option

Type

Default

Description

COMMIT

text

required

--env

text

The candidate’s environment (the controller has one)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.83.0. Writes a request to the ConfigMap piceli-gitops-requests; a candidate that is building or ready is left as it is, a failed or cancelled one starts again from its copy ledger. A commit that passed no run, or a controller without Controller(candidate=), drops it (gitops-request-invalid). The state shows in gitops status and gitops candidate list.

piceli gitops compare

Two runs side by side: commits, changed images, objects, time windows.

Option

Type

Default

Description

ENV

text

required

BEFORE

text

AFTER

text

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, the controller’s history

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.38.0. Read-only. –json prints piceli.gitops-compare.v1. Field values are not in the controller’s history (fields.available false); fewer than two runs: gitops-run-unknown.

piceli gitops disable

Remove the controller (plan first; –approve HASH removes). Never an environment.

Option

Type

Default

Description

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--delete-state

boolean

False

Also delete the state volume (Git mirror, receipts, last-seen commits)

--approve

text

The plan hash to execute

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Deletes the controller’s objects only; keeps the branch environments, the namespace and (without –delete-state) the state volume. Exit 3 with the plan hash until –approve. --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli gitops enable

Install the GitOps controller (plan first; –approve HASH installs).

Option

Type

Default

Description

PIPELINE

text

required

--image

text

required

The Piceli image the controller runs, pinned by digest (registry/repo@sha256:…); see docs/gitops.md to build one

--repo

text

Git URL the controller polls (https://, ssh://, git@host:path); no credentials in it. Required for a pipeline; for a composition, its own repository (default: the origin remote of –root), followed when an environment deploys a pipeline

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--branches

text

main

Comma-separated branch globs, e.g. ‘main,wp-*’

--poll

text

Poll interval: 60, 60s, 5m (default: a composition’s Controller(poll=), else 60s)

--credentials-secret

text

Secret in the controller’s namespace with the Git credentials (username/password or ssh-privatekey/known_hosts); mounted, never read

--namespace

text

piceli-system

The controller’s namespace

--env

text

The pipeline’s environment, if it has several

--main-branch

text

main

The branch that deploys on tags; for a composition, the branch of its own repository the controller follows

--tags

text

v*

Tag glob that deploys the main branch

--main-auto-approve

boolean

False

Owner’s opt-in: main deploys without a hash approval when the plan is inside the pipeline’s auto_approve policy

--storage

text

10Gi

Size of the state volume

--storage-class

text

StorageClass of the state volume

--cluster-rbac

boolean

False

Also allow ClusterRoles/ClusterRoleBindings (apps that declare them)

--delete-volumes

boolean

False

Let branch teardown delete the PersistentVolumes bound to the environment’s claims (cluster-wide delete on PersistentVolumes)

--platform

text (repeatable)

Build platform (repeatable), e.g. linux/arm64

--builder-image

text

Image of the cluster build Job, pinned by digest; without it branches deploy only images pushed with piceli env push

--build-git-secret

text

Secret (username/password) the build Job fetches the repository with (default piceli-build-git)

--builder-selector

text (repeatable)

key=value label of the builder node (repeatable; default piceli.io/builder=true on amd64)

--build-storage

text

20Gi

Size of a branch’s build cache

--build-registry

text

oci://host[:port]/prefix the build pushes to (default: the pipeline’s delivery)

--node-registry

text

host[:port] nodes pull from, when different

--root

path

.

The repository’s working tree: the pipeline’s named environments and idle_stop are read from it (when the file is there)

--approve

text

The plan hash to execute

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

--wait

boolean

False

After the install, wait until every environment runs its revision with its checks passed (exit 0), or report the first failure (exit 1) or the timeout (exit 2)

--timeout

text

15m

With –wait or –canary: give up after (15m, 1h)

--interval

float

10.0

With –wait or –canary: seconds between reads

--canary

boolean

False

With –approve, for a composition: before replacing the live controller, run the new image once as a Job that imports the composition and plans every environment without applying anything; a failure refuses the replacement (gitops-canary-failed)

--force

boolean

False

With –canary: replace the controller even if its canary failed

Contract

  • Reads: kubeconfig, the pipeline module under –root (if present)

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Reads the pipeline’s named environments and idle_stop from the working tree (–root, default .) into the controller config (gitops-pipeline-invalid when the file is there and does not load). Without –approve prints the install plan (Namespace, ServiceAccount, scoped Role/ClusterRole and bindings, state PersistentVolumeClaim, config ConfigMap, one-replica Deployment) and its hash, exit 3. –image must be pinned by digest (gitops-image-unpinned); –repo must carry no credentials (gitops-repo-invalid): they come from the Secret named by –credentials-secret, which is mounted and never read or printed. A changed plan is refused (gitops-plan-changed). Given a composition module (infra.py, no :ATTR) the controller config holds every source, component and environment of it instead (composition-invalid when it does not load); without –kubeconfig the composition’s Cluster credentials profile is used. 0.28.0, –wait: after the install, waits until every environment runs its revision with its checks passed (exit 0), reports the first failure (environment, stage, reason code, log tail; a composition that does not import; exit 1) or the timeout (gitops-wait-timeout, exit 2); progress lines on stderr, the result under wait in the JSON. 0.28.0, –canary (with –approve, a composition): before the plan replaces a running controller, runs the new image once as a Job (gitops canary: scratch state, its own ConfigMap, plan only) that imports the composition, resolves every environment, loads its builds and plans it; a failure refuses the replacement (gitops-canary-failed, exit 2) unless –force; the Job and its ConfigMap are removed when it ends; the result under canary in the JSON. --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli gitops history

Each environment’s deploy runs, newest first, with their time windows.

Option

Type

Default

Description

ENV

text

--limit

integer

20

Runs per environment (newest)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, the controller’s history

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.38.0. Read-only; the document the UI’s Deployment history reads. –json prints piceli.gitops-runs.v1 (each run is the piceli.gitops-history.v1 entry with window and release_window). No history yet: gitops-history-unavailable; an unknown ENV: gitops-run-unknown.

piceli gitops hosts

The health events, quarantine, source blocks and container-engine backoff the controller recorded per build host, and (0.89.0) whether its in-cluster fallback waits for each host (busy, live, upgrading, stale).

Option

Type

Default

Description

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, the controller’s status

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.22.0. Read-only (controller.build_health in gitops status). 0.75.0: also each source block (controller.source_quarantine, with its end) and container-engine backoff or block (controller.engine_backoff), with reason, cause and times; –json adds source_quarantine and engine_backoff.

piceli gitops rebuild

Ask the controller to rebuild the images a host built and deploy them.

Option

Type

Default

Description

--host

text

required

Rebuild every deployed image this host (or node) built

--since

text

Only images whose build ended at or after this ISO time (2026-10-01, 2026-10-01T12:00:00Z)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.22.0. Writes a request to the ConfigMap piceli-gitops-requests; the controller drops those images’ cached build results and deploys each environment that runs one with its usual approval and checks (trigger ‘sync rebuild HOST’; controller.last_rebuild in gitops status). No such image: gitops-request-invalid in gitops status.

piceli gitops release-host

Ask the controller to forget a build host’s health events (end its quarantine).

Option

Type

Default

Description

HOST

text

required

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.22.0. Writes a request to the ConfigMap piceli-gitops-requests. A docker or native host’s own record is cleared with piceli dev release-host.

piceli gitops run

Run the controller loop (the Deployment’s entrypoint); –once for one poll.

Option

Type

Default

Description

--config

path

required

The controller config (config.json of the ConfigMap)

--state-dir

path

required

The controller’s state directory (its volume)

--once

boolean

False

Poll once, print the status and exit

--service-account

boolean

False

Inside the controller’s pod: reach the API with the pod’s service account (an explicit kubeconfig is written for it)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

Publish status and read requests as ConfigMaps in this namespace (else files in –state-dir)

--credentials-dir

path

The mounted Git credentials Secret

--local-build

boolean

False

A composition controller run outside the cluster: build components on this machine (host builds) and push them through a port-forward to the in-cluster registry, instead of a build Job

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: –config, git remote, –credentials-dir

  • Writes: –state-dir (Git mirror, state, build receipts)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Deploys branch environments without a per-run approval: only inside the pipeline’s auto_approve policy, or a plan hash approved with gitops approve; main only on a new tag or a promotion, and only with an approved hash unless the owner enabled –main-auto-approve; a named environment by its own trigger (Branch, Tag, Promote) and with an approved hash unless it declares auto_approve=True. Scales a branch environment idle for EnvConfig(idle_stop=…) to zero. One step at a time, bounded retries with backoff; a failing branch never stops the others. Git output and credentials are never printed. A composition controller polls every source, builds only the components whose source digest changed (a build Job, or this machine with –local-build) and rolls only those.

piceli gitops show

One deploy run: outcome, commits, digests, checks, stages, failure.

Option

Type

Default

Description

RUN

text

required

--env

text

Look in this environment only

--logs

boolean

False

Also print the log tail the run kept

--artifacts

boolean

False

Print what the run built: commits, digests, images, layers

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, the controller’s history

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.38.0. Read-only. –json prints piceli.gitops-run.v1 (env, run; logs and logs_note with –logs). The controller keeps only the redacted log tail of a failed build. An unknown or ambiguous run: gitops-run-unknown.

piceli gitops status

Controller health, repository, last poll and every branch’s state.

Option

Type

Default

Description

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only. Reads the ConfigMap piceli-gitops-status and the controller Deployment (or a local –state-dir). Health: healthy, degraded (last poll failed), stale (no poll for 3 intervals), starting, down. gitops-not-installed without a controller. 0.25.0: nix_releases lists each NixRelease (latest tag, state, plan digest and approve_command, stages with times, the published manifest’s sha256, failure). A gated release shows pinned (input, commit, environment, verified_run, verified_at), or state rejected with its reason and refusal.

piceli gitops suspects

List the deployed images a build host (or node) built, in every environment.

Option

Type

Default

Description

--host

text

required

The build host or builder node whose images to list

--since

text

Only images whose build ended at or after this ISO time (2026-10-01, 2026-10-01T12:00:00Z)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, the controller’s status

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.22.0. Read-only. Each image names its environment (and cluster), component, pull reference, digest and provenance (host, node, builder image, commits, times).

piceli gitops sync

Ask the controller to deploy ENV now at its revision (–component: rebuild one).

Option

Type

Default

Description

ENV

text

--component

text

Also rebuild this component, even when its source did not change (a composition controller)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: –state-dir requests (local controller)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Writes a request to the ConfigMap piceli-gitops-requests; the controller deploys on its next poll with the environment’s usual approval (auto_approve or gitops approve of the plan hash). An unknown environment or component is dropped (gitops-request-invalid in gitops status); –component needs a composition controller. 0.25.0: ENV may name a NixRelease (its host): the controller publishes its newest tag now, with the release’s approval; a sync of every environment also retries failed releases.

piceli gitops wait

Wait until ENV runs COMMIT: deployed, failed (stage, cause) or timed out.

Option

Type

Default

Description

ENV

text

required

COMMIT

text

required

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--timeout

integer

1800

Give up after this many seconds

--interval

float

10.0

Seconds between two status reads

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Read-only; safe to run and to retry. Polls the status ConfigMap every –interval seconds (default 10) for at most –timeout seconds (default 1800). Retries of the controller are waited through. Exit 0 deployed, 1 failed, superseded, stopped or timed out, 3 approval-required (the plan hash is in the output). COMMIT is a commit of any source of the environment.

piceli heavy run

Run COMMAND once the lock is free; exit with its exit code.

Option

Type

Default

Description

COMMAND

text

--name

text

A label for the holder record and receipt

--wait

float

3600.0

Seconds to wait for the lock (0: do not wait)

Contract

  • Reads: the given command’s working directory, git (HEAD, status)

  • Writes: the per-user heavy state directory (lock, holder record, receipts, bounded)

  • Cluster: none

  • Approval required: no

  • Safe to retry: no

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Runs exactly the command given after –, without a shell and with the caller’s own authority (like time or flock); Piceli executes nothing else, so there is no plan or approval. The command’s exit code is the exit code (128+N for signal N), so 2 may also be the command’s own; stdout holds the receipt JSON only (the child’s stdout goes to stderr). Crash-safe OS lock (flock): a killed holder releases it. Receipts hold the redacted command, cwd, git commit, times, exit code and peak memory; never the environment. Rejected: heavy-lock-timeout after –wait.

piceli heavy status

Show who holds the lock and the most recent receipts.

Option

Type

Default

Description

--json

boolean

False

Print one JSON object on stdout

--limit

integer

10

Receipts to list

Contract

  • Reads: the per-user heavy state directory

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success

  • Output contract: conforms

  • Notes: Read-only; never contacts a cluster.

piceli help-json

Print the whole CLI tree (commands, options, contracts) as JSON.

No options.

Contract

  • Reads: nothing

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success

  • Output contract: conforms

piceli host module

Render the NixOS module that installs the host agent (commit it, import it).

Option

Type

Default

Description

REF

text

required

--output

path

Write the module to this file (default: print it on stdout)

Contract

  • Reads: MODULE:ATTR (piceli.infra.NixHost)

  • Writes: –output FILE (else the module on stdout)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. Never contacts the host or the cache. The module holds no secret (paths of root-only files only); commit it and import it from the host’s configuration. With –output prints one JSON object (path, sha256).

piceli host pin

Deploy a tag’s build (an older one too) and hold it: no newer build until unpin.

Option

Type

Default

Description

TARGET

text

required

TAG

text

required

--infra

text

MODULE (or MODULE:ATTR of its Infrastructure): the NixHosts it declares by name, its servers’ applied addresses and pinned host keys

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.NixHost) or an SSH target, –infra MODULE[:ATTR] (address, pinned host keys, host names)

  • Writes: the host’s system and /var/lib/piceli-host (ssh, as root)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. No approval digest: it only goes to a build that is signed, published and verified like every deploy, with checks and a rollback on failure. Runs piceli-host-agent pin TAG over SSH. Exit 1: the build failed its switch or checks and the host is back on its previous system; 2: refused before any change (host-pin-not-found, host-signature-invalid, host-busy). Reported to the OTLP collector as piceli.host.pin.

piceli host rollback

Switch back to the previous system (in the store) and hold it until unpin.

Option

Type

Default

Description

TARGET

text

required

--infra

text

MODULE (or MODULE:ATTR of its Infrastructure): the NixHosts it declares by name, its servers’ applied addresses and pinned host keys

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.NixHost) or an SSH target

  • Writes: the host’s system and /var/lib/piceli-host (ssh, as root)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. No approval digest: the previous system was verified when it was deployed. Runs the checks and switches forward again when one fails (exit 1). The hold keeps the next poll from deploying what was rolled away from. host-rollback-unavailable when no previous system is recorded or in the store. Reported as piceli.host.rollback.

piceli host secrets

Put the host’s age identity where sops-nix reads it, and the cache’s read keys (Piceli’s or yours) where the agent reads them: plan, then –approve.

Option

Type

Default

Description

TARGET

text

required

--infra

text

MODULE (or MODULE:ATTR of its Infrastructure): the NixHosts it declares by name, its servers’ applied addresses and pinned host keys

--replace

boolean

False

Replace a different age key the host has (what it decrypts with it changes)

--approve

text

The plan’s digest

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.NixHost with age_identity= or a cache with a read pair: the bucket’s S3Key(access=‘read’) or NixCache(read_credentials=)), $PICELI_CREDENTIALS_DIR/NAME.json (age-identity, s3-keys), the host’s key file and cache.env, by fingerprint only (ssh)

  • Writes: NixHost(age_key_file=) on the host, 0600 root (ssh stdin, atomic rename), /var/lib/piceli-host/cache.env, 0600 root (0.25.0)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: 0.24.0. The plan lists host, path, mode, owner, public key and whether the host has the same, a different or no key (exit 3 with the digest; 0 when it has the same). A different key is refused without –replace (host-secret-exists). The key travels on ssh’s stdin, never in an argument, log or state. After writing, the host re-runs switch-to-configuration switch so sops-nix decrypts. 0.25.0: with a bucket S3Key(access=‘read’) the plan’s cache lists the read pair (credential, short digest, same/different/absent); it is written without –replace and needs no activation (the agent reads it each poll). 0.25.3: an owner-made pair, NixCache(read_credentials=NAME), is planned, digested, compared and written the same way; missing, it is refused infra-credential-missing with the command that stores it (piceli secrets s3 NAME –prompt).

piceli host status

Read the host agent’s status over SSH (current build, last attempt, checks).

Option

Type

Default

Description

TARGET

text

required

--infra

text

MODULE (or MODULE:ATTR of its Infrastructure): the NixHosts it declares by name, its servers’ applied addresses and pinned host keys

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.NixHost), its name with –infra, or an SSH target, –infra MODULE[:ATTR] (declared hosts, applied address, pinned host keys), the host’s /var/lib/piceli-host/status.json (ssh)

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. Read-only; no cluster (works with every cluster down). ssh runs with BatchMode and strict host key checking (host-unreachable, host-status-missing).

piceli host unpin

Drop a pin or rollback hold: the host follows its declared ref again.

Option

Type

Default

Description

TARGET

text

required

--infra

text

MODULE (or MODULE:ATTR of its Infrastructure): the NixHosts it declares by name, its servers’ applied addresses and pinned host keys

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.NixHost) or an SSH target

  • Writes: /var/lib/piceli-host/state.json on the host (ssh, as root)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. Changes no system itself; the poll it starts deploys the newest build of the followed ref. Reported as piceli.host.unpin.

piceli host wait

Wait until the host runs REV with its checks passed (exit 1: failed or timeout).

Option

Type

Default

Description

TARGET

text

required

REV

text

required

--infra

text

MODULE (or MODULE:ATTR of its Infrastructure): the NixHosts it declares by name, its servers’ applied addresses and pinned host keys

--timeout

integer

1800

Seconds to wait

--interval

integer

10

Seconds between reads

--published-after

text

Judge only attempts of a publication at or after this published_at (from dev nix build –publish –json): an earlier failure of the same commit is not reported

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.NixHost) or an SSH target, the host’s status file (ssh, every –interval)

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. Read-only; no cluster. Exit 0: the host runs REV and its checks passed; 1: the attempt was refused or failed (host-deploy-failed), rolled back (host-rolled-back), or host-wait-timeout. The JSON carries the attempt’s stage times.

piceli import live

Generate a typed module from the objects of a live namespace (read-only).

Option

Type

Default

Description

--kubeconfig

path

required

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

required

Explicit context (never current-context)

--namespace

text

required

Namespace to import

--select

text (repeatable)

Kind/name or label=value; import only matching objects (repeatable)

--out

path

Write the module here (stdout: a JSON summary)

--force

boolean

False

Overwrite an existing –out file

--name

text

App name (default: the namespace)

--json

boolean

False

Without –out: print one JSON object with the module

--transport

choice

https

https, or loopback-http for a local test API server only

Contract

  • Reads: kubeconfig

  • Writes: –out file

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only on the cluster: lists ConfigMaps, Secrets, Services, PersistentVolumeClaims, Deployments, NetworkPolicies and Pods. Secret values are never written; –out refuses to overwrite without –force.

piceli import yaml

Generate a typed module from a directory of manifests (no cluster).

Option

Type

Default

Description

DIRECTORY

path

required

--namespace

text

Namespace to render into (default: the one the files name, else ‘default’)

--select

text (repeatable)

Kind/name or label=value; import only matching objects (repeatable)

--out

path

Write the module here (stdout: a JSON summary)

--force

boolean

False

Overwrite an existing –out file

--name

text

App name (default: the namespace)

--json

boolean

False

Without –out: print one JSON object with the module

Contract

  • Reads: manifest directory

  • Writes: –out file

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts a cluster. Secret values are never written; –out refuses to overwrite without –force.

piceli infra apply

Apply the plan whose hash is –approve (without it: plan, exit 3).

Option

Type

Default

Description

REF

text

required

--approve

text

The plan hash (or digest) to execute

--tofu

text

The tofu binary (default: $PICELI_TOFU, else tofu on PATH)

--verbose

boolean

False

When OpenTofu fails, print its whole output (redacted) on stderr

Contract

  • Reads: MODULE:ATTR (piceli.infra.Infrastructure), tofu binary, credentials (provider token, state passphrase)

  • Writes: resources at the provider (servers, IPs, firewalls, DNS records, images, bucket S3 key pairs), encrypted OpenTofu state, state directory records (inventory.json, s3-keys.json, images.json, image-upload-NAME.log), $PICELI_CREDENTIALS_DIR/NAME.json of each S3Key (s3-keys, 0600)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve it plans (exit 3). A hash that is not the fresh plan’s is refused (infra-plan-changed). A failed tofu apply exits 1 (infra-apply-failed); one that changed something first exits 1 whatever its code, with partially_applied, applied (address, action, id) and not_applied; plan again to continue. One command at a time per state (infra-state-locked). 0.25.3: an OpenStack Image is uploaded by Piceli (from the build host of an Image.from_build, else this machine), retried, its progress on stderr, verified and adopted (tofu import) before tofu apply; a failed upload deletes its image (infra-image-upload-failed, exit 1) and the log’s path is printed.

piceli infra destroy

Destroy what Piceli created for it, with approval of the destroy plan’s hash.

Option

Type

Default

Description

REF

text

required

--approve

text

The plan hash (or digest) to execute

--tofu

text

The tofu binary (default: $PICELI_TOFU, else tofu on PATH)

--verbose

boolean

False

When OpenTofu fails, print its whole output (redacted) on stderr

Contract

  • Reads: MODULE:ATTR (piceli.infra.Infrastructure), tofu binary, credentials (provider token, state passphrase)

  • Writes: resources at the provider (deleted), encrypted OpenTofu state

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve prints the destroy plan and its hash (exit 3). Only resources in Piceli’s ownership ledger that carry piceli.io/managed-by=piceli and piceli.io/infra= may be deleted; anything else refuses the whole plan (infra-foreign-resource). DNS zones are never deleted (Piceli manages record sets only). Credential profiles of registered clusters are left in place. A failure after some deletions exits 1 with partially_applied, as for apply.

piceli infra install

Run the server’s install hook (its rendered command, approved by digest).

Option

Type

Default

Description

REF

text

required

SERVER

text

required

--approve

text

The plan hash (or digest) to execute

Contract

  • Reads: MODULE:ATTR (piceli.infra.Infrastructure), state directory records

  • Writes: the server (whatever the owner’s command does), installs.json

  • Cluster: none

  • Approval required: yes

  • Safe to retry: no

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve prints the rendered argv and its digest (exit 3). Runs it without a shell, in the current directory, with the caller’s environment minus provider tokens and the state passphrase; its output goes to stderr. Piceli does not own the OS: the command is the owner’s.

piceli infra plan

Plan the declared machines with OpenTofu; print the changes, estimate and plan hash.

Option

Type

Default

Description

REF

text

required

--tofu

text

The tofu binary (default: $PICELI_TOFU, else tofu on PATH)

--verbose

boolean

False

When OpenTofu fails, print its whole output (redacted) on stderr

Contract

  • Reads: MODULE:ATTR (piceli.infra.Infrastructure), tofu binary, credentials (provider token, state passphrase), provider API (plan refresh, prices, Porkbun API access per domain)

  • Writes: state directory (configuration, lock file, providers)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Never changes a resource. Exit 3 with the plan and approve_command (piceli infra apply … –approve HASH); 0 and state unchanged when nothing changes. Refuses a plan that would change or delete a resource Piceli did not create (infra-foreign-resource). A plan that changes Porkbun records checks API access for each domain (infra-dns-api-disabled; infra-dns-check-failed when it cannot) and records it in checks. Tokens and the state passphrase reach tofu through its environment only; its output is redacted. 0.25.3: a Bucket(keys=[S3Key(…)]) at a provider that cannot create S3 keys (the Infomaniak preset) is refused before anything runs (infra-s3-keys-unsupported), with the commands that make and store each pair by hand.

piceli infra register

Wait for the server’s k3s and register it as its Cluster, or pin its SSH host keys (approved by digest).

Option

Type

Default

Description

REF

text

required

SERVER

text

required

--kubeconfig

path

The server’s k3s kubeconfig, given by the owner (default: read over SSH)

--context

text

Its context (when it has several)

--wait

integer

600

Seconds to wait for k3s to answer with a Ready node

--approve

text

The plan hash (or digest) to execute

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: MODULE:ATTR (piceli.infra.Infrastructure), the server over SSH (host keys, k3s kubeconfig) or –kubeconfig, the cluster’s API

  • Writes: $PICELI_CREDENTIALS_DIR/kubeconfigs/CLUSTER.yaml (mode 0600), credential profile Cluster(credentials=), known_hosts and registrations.json in the state directory

  • Cluster: reads

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve prints the cluster, profile and the SSH host-key fingerprints with a digest (exit 3); approving pins those keys (StrictHostKeyChecking against them only). The kubeconfig’s server is set to Cluster(api=); it is never printed or put in Git. Exit 1 (infra-k3s-not-ready) when k3s does not answer with a Ready node within –wait.

piceli infra replace

Replace a server: destroyed, then created on its port with its current user data.

Option

Type

Default

Description

REF

text

required

SERVER

text

required

--approve

text

The plan hash (or digest) to execute

--tofu

text

The tofu binary (default: $PICELI_TOFU, else tofu on PATH)

--verbose

boolean

False

When OpenTofu fails, print its whole output (redacted) on stderr

Contract

  • Reads: MODULE:ATTR (piceli.infra.Infrastructure), tofu binary, credentials (provider token, state passphrase, the server’s user data)

  • Writes: resources at the provider (the server destroyed and created; any other declared change), encrypted OpenTofu state, state directory records (inventory.json)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve it plans (exit 3) with replaced and approve_command (piceli infra replace … SERVER –approve HASH); the hash covers the replacement, so an infra apply approval never runs it. The server is destroyed first (its disk is gone), then created on its PrimaryIp port (same addresses) with its current UserData, which must be stored (infra-user-data-missing). An undeclared server is infra-server-unknown. Failures and partial applies as for infra apply.

piceli infra status

Servers, addresses, installs, cluster registrations and cost (read-only).

Option

Type

Default

Description

REF

text

required

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE:ATTR (piceli.infra.Infrastructure), state directory records

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only and offline: no tofu run, no credential, no network; it reads what the last apply, install and register recorded. –json prints piceli.infra.status.v1.

piceli inputs record

Capture each declared source (or the --only ones) and write a lock.

Option

Type

Default

Description

--spec

path

required

inputs.toml declaring the sources

--out

path

Write the lock here (default: stdout only)

--timeout

float

30.0

Seconds allowed for each git call

--only

text (repeatable)

Limit to this declared source (repeatable); same spec as the build

Contract

  • Reads: inputs.toml, git work trees

  • Writes: –out lock file

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli inputs verify

Recapture the sources and compare them with the lock (exit 1 on drift).

Option

Type

Default

Description

--spec

path

required

inputs.toml declaring the sources

--lock

path

required

Lock written by inputs record

--timeout

float

30.0

Seconds allowed for each git call

--only

text (repeatable)

Limit to this declared source (repeatable); same spec as the build

Contract

  • Reads: inputs.toml, lock, git work trees

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli login

Store a credential profile outside the repository (mode 0600).

Option

Type

Default

Description

NAME

text

required

--kubeconfig

path

required

Kubeconfig file the profile points at (a reference is stored, never its contents)

--context

text

Context in it (optional when the file defines exactly one; current-context is never used)

Contract

  • Reads: kubeconfig (only to check the context exists)

  • Writes: $PICELI_PROFILES_DIR/NAME.json (mode 0600)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts a cluster. Stores the absolute kubeconfig path and the context, never the kubeconfig contents or a token; the context is required unless the file defines exactly one (current-context is never used). Idempotent: logging in again replaces the profile.

piceli logout

Delete a stored profile (never the kubeconfig file it points at).

Option

Type

Default

Description

NAME

text

required

Contract

  • Reads: nothing

  • Writes: $PICELI_PROFILES_DIR/NAME.json (removed)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts a cluster. Prints {state: removed|absent, name}; removing an absent profile is not an error.

piceli logs

Print one workload’s logs in an environment (kubectl, explicit context).

Option

Type

Default

Description

ENV

text

required

WORKLOAD

text

required

--pipeline

text

env PICELI_PIPELINE

The pipeline: MODULE:ATTR or path/to/file.py:ATTR naming a Pipeline that declares envs=EnvConfig(…) (default: $PICELI_PIPELINE)

--previous

boolean

False

The previous container’s logs

--follow, -f

boolean

False

Stream new lines until Ctrl-C

--tail

integer

200

--container

text

--kubectl

text

kubectl

kubectl executable

Contract

  • Reads: pipeline module (–pipeline or $PICELI_PIPELINE), kubeconfig, kubectl

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: piceli logs BRANCH WORKLOAD [--previous] [-f] [--tail N]: after the checks, output and exit status are kubectl’s own (log lines on stdout); a refusal is the JSON rejection object. WORKLOAD is a Deployment, StatefulSet, DaemonSet or Job of the app (env-workload-unknown otherwise).

piceli observe forward-command

Print a JSON argv array for one explicit loopback-only port forward.

Option

Type

Default

Description

--user

text

required

--name

text

required

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--kubectl

text

kubectl

--preferences

path

Contract

  • Reads: preferences file

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required; the argv always carries it.

piceli observe forward-list

List a user’s saved port-forward preferences without starting a process.

Option

Type

Default

Description

--user

text

required

--preferences

path

Contract

  • Reads: preferences file

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli observe forward-run

Run one saved loopback-only port forward until the caller interrupts it.

Option

Type

Default

Description

--user

text

required

--name

text

required

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--kubectl

text

kubectl

--preferences

path

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

Contract

  • Reads: preferences file, kubeconfig

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256). After the checks, output and exit status are kubectl’s own.

piceli observe forward-save

Persist one harmless port-forward preference for a local user.

Option

Type

Default

Description

--user

text

required

--name

text

required

--namespace

text

required

--target

text

required

service/NAME, deployment/NAME or pod/NAME

--local-port

integer

required

--remote-port

integer

required

--preferences

path

--kubeconfig

path

With –context: the cluster this forward is for (needed for –restore-forwards)

--context

text

With –kubeconfig: the context this forward is for

Contract

  • Reads: preferences file, kubeconfig (with –context, for the scope)

  • Writes: preferences file

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli observe forwards apply

Start every declared forward and supervise it in the foreground.

Option

Type

Default

Description

--profile

path

required

Access profile: the –ui-config TOML format ([[shortcuts]] with optional [shortcuts.health] and [shortcuts.restart])

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--namespace

text

Namespace for shortcuts that pin none

--only

text (repeatable)

Supervise only these shortcut ids

--kubectl

text

kubectl

--poll

float

1.0

Status report cadence (seconds)

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

Contract

  • Reads: access profile, kubeconfig

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli observe forwards status

Probe each declared forward’s loopback endpoint once and print JSON.

Option

Type

Default

Description

--profile

path

required

--only

text (repeatable)

Check only these shortcut ids

Contract

  • Reads: access profile

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli observe logs-command

Print JSON argv for a bounded, explicit workload-log request.

Option

Type

Default

Description

--namespace

text

required

--target

text

required

pod/NAME, deployment/NAME, or another workload

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--tail

integer

200

--container

text

--previous, --no-previous

boolean

False

--kubectl

text

kubectl

Contract

  • Reads: nothing

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required; the argv always carries it.

piceli observe logs-run

Run a bounded workload-log request in the caller’s foreground terminal.

Option

Type

Default

Description

--namespace

text

required

--target

text

required

pod/NAME, deployment/NAME, or another workload

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--tail

integer

200

--container

text

--previous, --no-previous

boolean

False

--kubectl

text

kubectl

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

Contract

  • Reads: kubeconfig

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256). After the checks, output and exit status are kubectl’s own.

piceli observe serve

Open the local operations dashboard and optionally restore saved forwards.

Option

Type

Default

Description

--archive

path

required

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--namespace

text

Namespace for shortcuts and pods (default: the archive’s)

--preferences

path

--user

text

Local user whose saved forwards the dashboard manages

--restore-forwards

boolean

False

Start the user’s saved forwards that were saved for this cluster, context and namespace (off by default; forwards saved elsewhere or without a scope are never started)

--port

integer

9876

--ui-config

path

env PICELI__UI_CONFIG

TOML file with dashboard shortcuts, topology tiers, and badges (also $PICELI__UI_CONFIG)

--start-shortcuts, --no-start-shortcuts

boolean

False

Start and health-supervise every configured shortcut (port-conflict preflight first)

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

Contract

  • Reads: session archive, kubeconfig, preferences file

  • Writes: preferences file

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256). Saved forwards start only with –restore-forwards, and only those saved for this cluster, context and namespace.

piceli observe status

Print declared resources, live state, and objects absent from the archive.

Option

Type

Default

Description

--archive

path

required

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--include-common-types, --no-include-common-types

boolean

True

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

Contract

  • Reads: session archive, kubeconfig

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli operator approve

Record an explicit operator approval for a pull request rollout.

Option

Type

Default

Description

--state-dir

path

required

--pr-id

integer

required

--commit

text

required

--namespace

text

required

--approved-by

text

required

Contract

  • Reads: nothing

  • Writes: state_dir

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli operator backup

Create a verified, mode-restricted backup archive of operator state.

Option

Type

Default

Description

--state-dir

path

required

--output

path

required

Target .tar.gz archive path

Contract

  • Reads: state_dir

  • Writes: backup archive

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli operator promote

Promote an existing built digest to a new tag without rebuilding.

Option

Type

Default

Description

--catalog

path

required

--source

text

required

Source release name to promote

--target

text

required

Target tag/release name

Contract

  • Reads: catalog

  • Writes: catalog

  • Cluster: none

  • Approval required: no

  • Safe to retry: no

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli operator restore

Safely verify and restore operator state into empty destination.

Option

Type

Default

Description

--archive-file

path

required

--destination

path

required

Target directory to restore into

Contract

  • Reads: backup archive

  • Writes: destination directory

  • Cluster: none

  • Approval required: no

  • Safe to retry: no

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli operator serve

Launch the Piceli Operator dashboard and unified REST API.

Option

Type

Default

Description

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--namespace

text

default

--archive

path

--catalog

path

--preferences

path

--state-dir

path

--user

text

--port

integer

9876

--ui-config

path

env PICELI__UI_CONFIG

TOML file with dashboard shortcuts, topology tiers, and badges (also $PICELI__UI_CONFIG)

--access

text

release.toml or module:attr whose model access declarations become the dashboard shortcuts (–ui-config entries win by id)

--start-access, --no-start-access

boolean

True

With –access: start the model’s declared forwards at launch, like piceli access TARGET --dashboard

--restore-forwards

boolean

False

Start the user’s saved forwards that were saved for this cluster, context and namespace (off by default; forwards saved elsewhere or without a scope are never started)

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

Contract

  • Reads: kubeconfig, catalog, archive, preferences file

  • Writes: preferences file, state_dir

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256). –access starts the model’s declared forwards; saved forwards start only with –restore-forwards, and only those saved for this cluster, context and namespace.

piceli operator status

Print classified operator inventory: managed, unmanaged, unknown, and releases.

Option

Type

Default

Description

--kubeconfig

path

required

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--namespace

text

default

--archive

path

--catalog

path

--include-common-types, --no-include-common-types

boolean

True

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

Contract

  • Reads: kubeconfig, archive, catalog

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli profiles

List the stored credential profiles (references only, never secrets).

Option

Type

Default

Description

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: $PICELI_PROFILES_DIR

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts a cluster; prints references only, never secrets. –json prints {state, profiles: [{name, kubeconfig, context, kubeconfig_present}]}.

piceli promote

Ask the GitOps controller to deploy BRANCH@SHA to main, or to environment ENV; with –from, pin a verified commit in a NixRelease’s flake and tag it.

Option

Type

Default

Description

TARGET

text

required

SOURCE

text

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--from

text

0.25.0: TARGET is a NixRelease’s host; pin the newest commit this environment (its gate’s) ran with passed release checks in the flake’s flake.lock, commit, tag and push (plan, then –approve)

--composition, --infra

path

infra.py

With –from: the composition module declaring the NixRelease (–infra is an older name of this option, not the machines module)

--machines

text

With –from –wait (0.31.0): MODULE or MODULE:ATTR of the Infrastructure of the host’s server (its applied address and pinned host keys); default: the one the composition imports

--repo

path

.

With –from: the flake’s working copy

--bump

text

patch

With –from: major, minor or patch

--commit

text

With –from (0.83.0): pin this commit (7 to 40 hex characters) instead of the newest; refused unless the environment passed it with its release checks

--approve

text

With –from: the promotion plan’s digest

--wait

boolean

False

With –from –approve: wait until the host runs the new tag with its checks passed (exit 0), or report the first failure (exit 1) or the timeout (exit 2)

--timeout

text

15m

With –wait: give up after (15m, 1h)

--interval

float

10.0

With –wait: seconds between reads

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or –state-dir, with –from: the composition module (–composition; the NixRelease and its gate), the controller’s history (–state-dir, –kubeconfig/–context, or the composition cluster’s credential profile), the flake’s working copy (–repo) and its remote (git fetch), nix when on the PATH, else the input’s repository (git clone into a temporary directory)

  • Writes: –state-dir requests (local controller), with –from –approve: flake.lock, one commit and one annotated tag in the working copy; the branch and the tag on the remote, pushed atomically

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Writes a request; the controller accepts only a commit it saw on that branch (gitops-promote-unknown otherwise), a named environment only when it follows Promote() (gitops-promote-not-allowed), and the environment then waits for gitops approve of its plan hash. 0.25.0, promote HOST –from ENV: without –approve it prints the plan (pinned, the lock change old rev -> new rev, the commit message, the tag, the remote and branch) with its digest and exits 3. A lock that already pins the commit exits 0 with state current: with a tag of the pattern at HEAD there is nothing to do; without one the plan only tags HEAD and –approve tags and pushes the tag. –approve recomputes the plan (promote-plan-changed when it differs), commits flake.lock alone, tags and pushes with git push –atomic (promote-push-failed exits 1; the commit and tag stay local). 0.83.0: –commit SHA (7 to 40 hex characters) pins a commit ENV passed that is not the newest: refused (promotion-not-verified) unless it passed with its release checks; the plan’s pinned names its run and the digest covers the commit. 0.74.0: the digest covers what the promotion changes, not the run that verified the commit (a re-verification keeps the approval); after a failed push the same –approve command pushes the local commit and tag (resume, resumed); a fetch, push, ls-remote or clone that fails in transport is retried up to twice with a growing pause (git_retries). Refuses a dirty working copy (promote-dirty), one behind, ahead of or diverged from its upstream (promote-not-in-sync), an environment without a passed run (promotion-not-verified) and an unreadable history (promotion-history-unreachable). 0.28.0, –from –wait: after the push (or when the tag is current), waits until the host runs the tag with its checks passed (exit 0), reports the first failure (a failed publish of the tag in the controller’s status, or the host’s failed or rolled-back attempt over SSH; exit 1) or the timeout (gitops-wait-timeout, exit 2); progress lines on stderr, the result under wait in the JSON.

piceli publish

Push the rendered manifests as a Flux OCI artifact (needs –approve DIGEST).

Option

Type

Default

Description

TARGET

text

--to

text

oci://host[:port]/repository[:tag] to push to (the tag is optional)

--spec

path

release.toml, as for piceli render

--namespace

text

Namespace to render into

--env

text

Render this environment of the App

--secrets

choice

refuse

‘refuse’ a Secret object, or leave Secrets out because they are provided outside the artifact (‘external’)

--approve

text

The artifact digest printed without –approve; pushes it

--credentials

path

Private JSON file: {“username”, “password”} or {“token”}

--ca-file

path

CA bundle for a TLS registry

--source

text

org.opencontainers.image.source annotation (e.g. the Git URL)

--revision

text

org.opencontainers.image.revision annotation (e.g. main@sha1:)

Contract

  • Reads: module/app file, release.toml (optional), local receipts, credentials file

  • Writes: OCI registry (artifact blobs, manifest, tag)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Never contacts a cluster. Without –approve it prints the deterministic artifact digest and exits 3 (nothing is pushed); –approve DIGEST pushes by digest, then the tag, and reads both back. Layout of flux push artifact (config application/vnd.cncf.flux.config.v1+json, one layer application/vnd.cncf.flux.content.v1.tar+gzip). A Secret needs –secrets external; redacted values and placeholder images are refused. Credentials only from –credentials FILE, never printed.

piceli registry forward

Keep a loopback port-forward to the registry open for pushes from here.

Option

Type

Default

Description

REF

text

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--env

text

The pipeline’s environment, if it has several

--namespace

text

piceli-system

Namespace of the registry

--name

text

piceli-registry

Base name of its objects

--port

integer

5000

Registry and Service port

--local-port

integer

Loopback port (default: a free one)

Contract

  • Reads: kubeconfig, kubectl

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Prints one JSON object with the local push URL, then runs until interrupted. Pushes through it go by digest; nodes pull by the stable name. --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli registry install

Install the in-cluster registry and its node mirror (plan first; –approve HASH installs).

Option

Type

Default

Description

REF

text

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--env

text

The pipeline’s environment, if it has several

--on

text

Node (kubernetes.io/hostname) that runs the registry

--storage

text

20Gi

Size of the registry’s retained claim

--port

integer

5000

Registry and Service port

--namespace

text

piceli-system

Namespace of the registry

--name

text

piceli-registry

Base name of its objects

--node-port

integer

Also expose a fixed NodePort (30000-32767)

--storage-class

text

StorageClass of the claim

--mirror-dir

text

/etc/containerd/certs.d

The nodes’ containerd certs.d directory

--image

text

Registry image pinned by digest (repo@sha256:…)

--node-mirror

text

auto

auto (per node), k3s (registries.yaml) or containerd (certs.d)

--approve

text

The plan hash to execute

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or the Cluster’s credential profile, MODULE:ATTR or composition module (optional)

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve prints the plan (Namespace, ConfigMap, retained PersistentVolumeClaim, Service, registry Deployment pinned to the node, node agent DaemonSet that writes certs.d/..svc:/hosts.toml on each node) and its hash, exit 3. Idempotent: an installed registry plans unchanged. A changed plan is refused (cluster-registry-plan-changed). --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli registry status

Registry pod, mirror readiness on every node and storage use (read-only).

Option

Type

Default

Description

REF

text

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--env

text

The pipeline’s environment, if it has several

--namespace

text

piceli-system

Namespace of the registry

--name

text

piceli-registry

Base name of its objects

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: kubeconfig or the Cluster’s credential profile, MODULE:ATTR or composition module (optional)

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only. state: ready, degraded (registry or a node’s mirror not ready) or not-installed. Storage use is the claim’s: the kubelet’s volume stats when they are the claim’s own filesystem (needs nodes/proxy), else du in the registry pod (needs pods/exec), else null; storage.used_source says which, and storage.filesystem the shared filesystem’s use. --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli registry uninstall

Remove the registry and its node mirrors (plan first; –approve HASH removes).

Option

Type

Default

Description

REF

text

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--env

text

The pipeline’s environment, if it has several

--namespace

text

piceli-system

Namespace of the registry

--name

text

piceli-registry

Base name of its objects

--delete-storage

boolean

False

Also delete the claim with the images

--approve

text

The plan hash to execute

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: kubeconfig or the Cluster’s credential profile, MODULE:ATTR or composition module (optional)

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Keeps the namespace and (without –delete-storage) the claim with the images. The node agents remove their hosts.toml when they stop. Workloads that pull from the registry fail to start new pods afterwards. --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256).

piceli release apply

Execute an approved plan (--approve HASH), or plan and confirm.

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--approve

text

Plan hash to execute (from a previous plan/rollback output)

--auto-approve

boolean

False

Plan and execute without confirmation (CI)

--rotate

text (repeatable)

Regenerate this secret generator’s values in the new release (repeatable)

--adopt

text (repeatable)

Authorize adopting this existing object, as Kind/name or apiVersion/Kind/name (repeatable; adds to [release] adopt)

--replace

text (repeatable)

Authorize deleting this existing unmanaged object (or a managed Job or StatefulSet whose immutable fields change) and creating it from the release, after writing a restorable backup (repeatable; adds to [release] replace; never retained objects)

--adopt-all-desired

boolean

False

Authorize adopting every existing unmanaged object the composition declares (each is listed in the plan and bound to its hash)

--skip-checks

boolean

False

Do not run the spec’s [[checks]] after readiness (emergencies only; recorded in the release history)

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

--approve-if-policy

boolean

False

Plan and execute only when every action is inside the spec’s [release] auto_approve policy (declared by the owner); otherwise print the plan hash to approve and exit 3

--otlp-endpoint

text

Send this run’s events (a trace and a result log record) to an OTLP/HTTP endpoint; the standard OTEL_EXPORTER_OTLP_* variables also enable it. Never fails the command

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: state_dir (catalog, journal, secret store, check reports)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: no

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: After an interruption use release resume, not apply. Runs [[checks]] after readiness (exit 1 with release_state checks-failed); with rollback_on_failed_checks it re-applies the previous ready release without a further approval. –skip-checks is recorded. –approve-if-policy plans and applies only when every action is inside the spec’s [release] auto_approve policy (declared by the owner, part of the plan hash); otherwise exit 3 with reason approval-policy-exceeded and the hash to approve. With a pipeline, –env NAME selects one environment (its target, overrides and state).

piceli release check

Run the spec’s [[checks]] now against a release; changes nothing.

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--release

text

Release to check (default: the selected one)

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Writes no state and never rolls back. Checks open temporary loopback port forwards, may exec declared commands in pods and run declared Python check functions. Exit 1 when a check failed (state failed, reason check-failed).

piceli release diff

Show what plan would change, field by field (read-only, nothing stored).

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--adopt

text (repeatable)

Authorize adopting this existing object, as Kind/name or apiVersion/Kind/name (repeatable; adds to [release] adopt)

--replace

text (repeatable)

Authorize deleting this existing unmanaged object (or a managed Job or StatefulSet whose immutable fields change) and creating it from the release, after writing a restorable backup (repeatable; adds to [release] replace; never retained objects)

--adopt-all-desired

boolean

False

Authorize adopting every existing unmanaged object the composition declares (each is listed in the plan and bound to its hash)

--exit-code

boolean

False

Exit 1 when the release would change something

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only: stores no plan and no local state. Sends only reads and dryRun=All requests (server dry runs of the writes). Exit 1 with –exit-code when something would change (reason release-changes-pending).

piceli release orphans

List the objects that carry the app’s ownership labels but no current release owns.

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

--prune

boolean

False

Delete the prunable leftover objects after approval (exit 3 with the plan hash to approve; –approve HASH executes)

--approve

text

Plan hash to execute (from a previous plan/rollback output)

--include-claims

boolean

False

Also prune PersistentVolumeClaims (their data is deleted) and StatefulSets whose retention policy deletes their claims

--include-secrets

boolean

False

Also prune Secrets

--include-cluster-scoped

boolean

False

Also scan and prune this namespace’s ClusterRole/ClusterRoleBinding

--include-other-owners

boolean

False

Also prune objects of another owner that carry the app’s labels (another environment of the app)

--json

boolean

False

Print only the JSON object (no human summary on stderr)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Read-only without –prune. –prune prints the plan hash over the exact set (UIDs and resourceVersions) and exits 3; –prune –approve HASH deletes that set, or refuses when it changed (orphans-plan-changed); each deleted object is waited for until it is gone (outcome deleting when still terminating). Never prunes claims, Secrets, objects of another owner or cluster-scoped objects unless –include-claims, –include-secrets, –include-other-owners or –include-cluster-scoped; never an object without Piceli’s owner annotation. With a pipeline, –env NAME selects one environment (its target, overrides and state).

piceli release plan

Capture live discovery and persist an approvable plan (prints its hash).

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--rotate

text (repeatable)

Regenerate this secret generator’s values in the new release (repeatable)

--adopt

text (repeatable)

Authorize adopting this existing object, as Kind/name or apiVersion/Kind/name (repeatable; adds to [release] adopt)

--replace

text (repeatable)

Authorize deleting this existing unmanaged object (or a managed Job or StatefulSet whose immutable fields change) and creating it from the release, after writing a restorable backup (repeatable; adds to [release] replace; never retained objects)

--adopt-all-desired

boolean

False

Authorize adopting every existing unmanaged object the composition declares (each is listed in the plan and bound to its hash)

--out

path

Also write the full redacted plan JSON here

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: state_dir (pending plan, secret candidates), –out file

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never changes the cluster: reads plus dryRun=All requests (server dry runs of the writes). Prints the plan hash to approve. With a pipeline, –env NAME selects one environment (its target, overrides and state).

piceli release preview

Alias of plan.

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--rotate

text (repeatable)

Regenerate this secret generator’s values in the new release (repeatable)

--adopt

text (repeatable)

Authorize adopting this existing object, as Kind/name or apiVersion/Kind/name (repeatable; adds to [release] adopt)

--replace

text (repeatable)

Authorize deleting this existing unmanaged object (or a managed Job or StatefulSet whose immutable fields change) and creating it from the release, after writing a restorable backup (repeatable; adds to [release] replace; never retained objects)

--adopt-all-desired

boolean

False

Authorize adopting every existing unmanaged object the composition declares (each is listed in the plan and bound to its hash)

--out

path

Also write the full redacted plan JSON here

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: state_dir (pending plan, secret candidates), –out file

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

piceli release resume

Resume an interrupted apply of a created release (same grant and ids).

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--release

text

Release name (default: the latest execution)

--skip-checks

boolean

False

Do not run the spec’s [[checks]] after readiness (emergencies only; recorded in the release history)

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: state_dir (journal, check reports)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Continues an already approved execution; needs no new approval. Runs [[checks]] when it becomes ready, as apply does.

piceli release retention

Retire releases beyond keep_releases, with their secret versions.

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

--dry-run

boolean

False

Only list what retention would retire (releases, sessions, files, executions, secret versions); change nothing

--keep

integer

Releases to keep (default: [release] keep_releases of the spec)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), state_dir

  • Writes: state_dir (catalog, journal, secret store, release files)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts the cluster. –dry-run changes nothing and lists what would be retired. Keeps the newest releases, the selected one and any rollback target; never deletes replace backups. Secret versions nothing names go only on a later run after a grace period. Deferred while a plan is pending or an execution is running. Refuses with release-retention-off when neither keep_releases nor –keep is set. With a pipeline, –env NAME selects one environment (its target, overrides and state).

piceli release rollback

Re-plan and re-apply an earlier release against current cluster state.

Option

Type

Default

Description

TARGET

text

required

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--approve

text

Plan hash to execute (from a previous plan/rollback output)

--auto-approve

boolean

False

Plan and execute without confirmation (CI)

--adopt

text (repeatable)

Authorize adopting this existing object, as Kind/name or apiVersion/Kind/name (repeatable; adds to [release] adopt)

--replace

text (repeatable)

Authorize deleting this existing unmanaged object (or a managed Job or StatefulSet whose immutable fields change) and creating it from the release, after writing a restorable backup (repeatable; adds to [release] replace; never retained objects)

--adopt-all-desired

boolean

False

Authorize adopting every existing unmanaged object the composition declares (each is listed in the plan and bound to its hash)

--skip-checks

boolean

False

Do not run the spec’s [[checks]] after readiness (emergencies only; recorded in the release history)

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

--otlp-endpoint

text

Send this run’s events (a trace and a result log record) to an OTLP/HTTP endpoint; the standard OTEL_EXPORTER_OTLP_* variables also enable it. Never fails the command

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: state_dir (catalog, journal, check reports)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: no

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Runs [[checks]] after readiness, as apply does.

piceli release secret show

Show a secret’s metadata, and its value with –reveal (never logged).

Option

Type

Default

Description

NAME

text

required

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--key

text

One output, e.g. crt, key, ca.crt, cache.crt

--release

text

Release name (default: the latest execution)

--reveal

boolean

False

Print the value (otherwise asks on a terminal)

--json

boolean

False

Print JSON: metadata only unless –reveal

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), state_dir (secret store)

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Owner only. Never contacts the cluster; values print only with –reveal or a terminal confirmation.

piceli release status

Show catalogued releases, their executions and history (no cluster access).

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

--run

text

Show one past execution (an execution id, a unique prefix of at least 8 characters, or a piceli deploy run id): its state and the recorded causes of a failure (redacted log tails, events)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), state_dir

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: With state = “cluster” it first refreshes the working copy from the cluster (reads only, no lock). --run ID shows one past execution (an execution id or unique prefix, or a piceli deploy run id) with the causes recorded when it failed (pod reasons, exit codes, redacted log tails, events).

piceli release stop

Cancel the latest execution of a release (exact owner only).

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR (path/to/file.py:ATTR) naming a piceli Pipeline: the release piceli deploy manages

--release

text

Release name (default: the latest execution)

--env

text

Environment of a pipeline (–spec MODULE:ATTR): its app overrides, target and state (required when the pipeline has one target per environment)

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), composition, state_dir, kubeconfig

  • Writes: state_dir (journal)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Checks the cluster identity; records the cancellation locally.

piceli render

Print the manifests of a typed app, composition or pipeline. Never contacts a cluster.

Option

Type

Default

Description

TARGET

text

--spec

path

release.toml providing the namespace, images, secret inputs (as placeholders), [values] and declared nodes

--namespace

text

Namespace to render into (default: the spec’s, the pipeline target’s or the environment’s, else ‘default’)

--format

choice

yaml

Output format

--env

text

Render this environment of the App (app.environment(…)); a pipeline also uses its target for it

--diff-env

text

Print the typed difference between –env and this environment instead of manifests

--out

path

Write one YAML file per object into this directory (for Argo CD or Flux from Git) instead of printing; it must be absent, empty or written by a previous –out

--secrets

choice

refuse

With –out: ‘refuse’ a Secret object, or leave Secrets out because they are provided outside the files (‘external’: SOPS, ExternalSecret, by hand)

Contract

  • Reads: module/app file, release.toml (optional), local receipts

  • Writes: –out directory

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never contacts a cluster; secret values are placeholders. –out DIR writes one YAML file per object (a directory for Argo CD or Flux from Git; a Secret needs –secrets external, redacted values and placeholder images are refused) and prints one JSON object; DIR must be absent, empty or a previous –out. A Pipeline renders with its target’s namespace and declared nodes, build images as placeholders, and reads no kubeconfig, build spec or state. –env NAME renders one environment of the App (a pipeline’s target for it); –diff-env OTHER prints the typed difference between the two environments instead (JSON with –format json). stdout carries the manifests (YAML, or one JSON object with –format json); a refusal is always the JSON rejection object.

piceli restore

Put a restore point back into its claims (plan, then –approve HASH).

Option

Type

Default

Description

TARGET

text

required

--point

text

The restore point id (rp-…)

--claim

text (repeatable)

Only this claim (repeatable; default: all)

--env

text

The pipeline’s environment

--approve

text

Restore; HASH is the plan’s restore_hash

--image

text

Helper image pinned by digest (default: RestorePoints(image=) or each writer’s image)

--to-new-claim

boolean

False

Restore into scratch claims and run the app’s restore_verify checks; live claims and writers are not touched

--all

boolean

False

With –to-new-claim: every verified restore point

--keep

boolean

False

With –to-new-claim: keep the scratch claims afterwards

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: pipeline module, restore point directory, kubeconfig

  • Writes: restore point directory (restores/ and verifies/ receipts)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve it only reads: verifies the archives, checks the claims exist and lists the writers it would stop. With –approve HASH it plans again (restore-plan-changed on any difference), holds the pipeline’s state lock, scales the writers to zero and waits until their pods are gone, empties each claim and extracts its archive in a helper Job, checks the content digest in the cluster and scales the writers back. Every file in the claims is replaced; run it again after a failure. With –to-new-claim (and –all for every verified point) it touches no live claim and stops no writer: the plan (exit 3, verify_hash) names one scratch claim per restored claim; –approve HASH creates them, restores and checks each content digest, runs the app’s restore_verify command read-only with the workload’s image, writes a receipt with PASS or FAIL per claim (exit 1 on any FAIL), and deletes the scratch claims unless –keep.

piceli restore-points

List a pipeline’s restore points, newest first (read-only, offline).

Option

Type

Default

Description

TARGET

text

required

--env

text

The pipeline’s environment

--verify

boolean

False

Read every archive back and check its digests

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: pipeline module, restore point directory

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only and offline (never the cluster); prints ids, claims, sizes and digests, never file contents. With –verify, exit 1 when an archive does not match its SHA-256 or content digest (each claim’s check names the code).

piceli runs

List the deploy runs of a pipeline, newest first, with their state, release, duration and summary files. Read-only (with shared state it reads the local working copy: run piceli state pull first).

Option

Type

Default

Description

TARGET

text

--env

text

Only this environment’s state (default: every environment)

--state-dir

path

A pipeline state directory, instead of a pipeline (default: ./.piceli-deploy)

--limit

integer

20

Newest runs to list

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: pipeline module or –state-dir, state_dir

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only; newest first. With shared state it reads the local working copy (piceli state pull first). summary.json follows docs/schemas/piceli-run-summary-v1.schema.json.

piceli secrets age

A host’s age identity for sops-nix: generate or import it; print its public key.

Option

Type

Default

Description

NAME

text

required

--generate

boolean

False

Generate a new identity

--prompt

boolean

False

Read an existing identity (AGE-SECRET-KEY-1…) from stdin

--replace

boolean

False

Replace an existing identity (what was encrypted to the old one needs re-encrypting)

Contract

  • Reads: stdin (–prompt), $PICELI_CREDENTIALS_DIR/NAME.json

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600; –generate, –prompt)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. Prints the public key (age1…) for .sops.yaml, never the identity. Without –generate or –prompt it only reads. Refuses to replace an identity without –replace (infra-credential-exists).

piceli secrets backup

Write the whole secret store, encrypted with age, to one file (never printed).

Option

Type

Default

Description

--to

path

required

The encrypted archive to write (age format)

--recipient

text (repeatable)

An age (age1…), plugin (age1yubikey1…) or SSH public key; repeatable; remembered for later backups

--recipients-file

path

A file of recipients, one per line (age -R)

--force

boolean

False

Replace an existing backup file

--single-recipient

boolean

False

Allow one recipient (losing it loses the store and the backup together); recorded in the backup and its marker

--only

text (repeatable)

Only this credential (repeatable): a transfer to another machine, such as a build host; needs –recipient, allows one, and is not a backup of this store

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: \(PICELI_CREDENTIALS_DIR (every file), \)PICELI_PROFILES_DIR, –recipients-file

  • Writes: –to PATH (age ciphertext, mode 0600), .backup.json (recipients and the last backup’s marker; no values)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.25.0. Runs the age command (PICELI_AGE, else age on PATH; secrets-age-missing otherwise): the tar is streamed into age, no plaintext touches the disk. Refuses an existing file without –force (secrets-backup-exists). Prints names, kinds, the archive’s sha256 and the staleness, never a value. Exit 1 when age refuses (secrets-backup-failed). Needs two recipients: one is refused (secrets-backup-single-recipient) unless –single-recipient, which the manifest, the marker and the staleness record. –only NAME (repeatable) writes just those credentials for another machine (a build host): it needs –recipient (never the remembered ones), allows one, records only: true in the manifest, changes neither the marker nor the remembered recipients, and refuses an unknown name (secrets-backup-only-unknown).

piceli secrets backup-key

Create the offline age key for backups: prints only its age1… recipient.

Option

Type

Default

Description

--out

path

required

Where to write the private key (outside the store; offline: a USB drive, or print it and delete the file)

--add

boolean

False

Add its recipient to the remembered recipients

--force

boolean

False

Replace an existing file at –out

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: .backup.json (–add)

  • Writes: –out PATH (the age identity, mode 0600), .backup.json (–add: the remembered recipients)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.25.0. Runs age-keygen (PICELI_AGE_KEYGEN, next to PICELI_AGE, or on PATH; secrets-age-missing otherwise). Refuses a path inside the store or in a missing directory (secrets-backup-key-invalid) and an existing file without –force (secrets-backup-key-exists). Never prints the private key. Exit 1 when age-keygen fails (secrets-backup-key-failed).

piceli secrets cluster

Store another cluster’s credentials for the GitOps controller (never printed).

Option

Type

Default

Description

--cluster

text

required

MODULE:ATTR of the piceli.infra.Cluster the controller deploys to

--kubeconfig

path

A kubeconfig file holding its credentials

--context

text

The context of –kubeconfig to store

--prompt

boolean

False

Read a bearer token from stdin instead (typed without echo, or piped); the CA comes from the cluster’s credential profile

--server

text

The API address the controller uses (default: Cluster(api=))

--home

text

MODULE:ATTR of the cluster running the controller (default: the composition’s cluster with Controller(…))

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: –kubeconfig FILE –context NAME, or stdin (–prompt: a token), MODULE:ATTR (piceli.infra.Cluster), credential profiles

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: One context, certificates and token inlined, no exec plugin (cluster-credentials-unsupported); the kubeconfig’s server must be Cluster(api=) (cluster-api-mismatch); –server sets the address the controller uses. Writes the Secret on the cluster with Controller(…) (or –home) without a plan; prints names only, never a value. A token argument is refused (secrets-token-refused).

piceli secrets delete

Delete a stored credential (a spent bootstrap key, an old token); never printed.

Option

Type

Default

Description

NAME

text

required

--kind

text

Delete it only if it is this kind: provider, state-key, nix-cache, s3, age or user-data

--yes

boolean

False

Delete without asking (owner only)

Contract

  • Reads: $PICELI_CREDENTIALS_DIR/NAME.json (its kind, never the value)

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (removed)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: 0.24.0. Never prints the value. Without –yes it asks for the name on a terminal; otherwise it exits 3 (approval-required, with the command to run) and deletes nothing. –kind (provider, state-key, nix-cache, s3, age, user-data) refuses another kind (infra-credential-invalid); a missing one is infra-credential-missing.

piceli secrets git

Store the Git token the controller and cluster builds use (read from stdin, never printed).

Option

Type

Default

Description

--cluster

text

required

MODULE:ATTR of the piceli.infra.Cluster whose controller and builds use it

--prompt

boolean

False

Read the token from stdin (typed without echo, or piped); required

--username

text

git

Git user name stored with the token

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API

Contract

  • Reads: stdin (–prompt), MODULE:ATTR (piceli.infra.Cluster), credential profile

  • Writes: nothing (read-only)

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: The token is read from stdin only (typed without echo, or piped); a token argument or PICELI_GIT_TOKEN is refused (secrets-token-refused) without echoing it. Creates or updates the Secret without a plan; prints its name and key names, never a value. Needs piceli cluster init first (cluster-not-initialized).

piceli secrets git-ssh-key

Store a read-only deploy key a build host fetches private git+ssh flake inputs with.

Option

Type

Default

Description

NAME

text

required

--host

text

required

The Git host it is for (github.com); no other

--file

path

The deploy key: an OpenSSH private key file

--known-hosts

path

That host’s known_hosts lines (ssh-keyscan HOST); without it the host’s key is taken on first use, each time

Contract

  • Reads: –file PATH, –known-hosts PATH

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. The key, its host (–host; used for no other) and, optionally, that host’s known_hosts lines. Used before the build by the build host’s fetch step, never inside the build. Prints the name and the host, never the key.

piceli secrets git-token

Store a Git token a build host fetches private flake inputs with (never printed).

Option

Type

Default

Description

NAME

text

required

--host

text

required

The Git host it is for (github.com); used for no other

--prompt

boolean

False

Read the token from stdin (typed without echo, or piped)

--username

text

git

The Git user name sent with the token

Contract

  • Reads: stdin (–prompt)

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. The token, its host (–host; it is used for no other) and a user name (–username, default git). A build host fetches the private inputs of a NixRelease or dev nix build with it before the build, never inside it. Prints the name and the host, never the token; an argument is refused (infra-credential-refused) without echoing it. It reaches another build host with piceli secrets backup --only NAME and piceli secrets restore.

piceli secrets nix-cache

A Nix binary cache’s signing key: generate or import it; print its public key.

Option

Type

Default

Description

NAME

text

required

--generate

boolean

False

Generate a new key pair

--prompt

boolean

False

Read an existing secret key (NAME:base64) from stdin

--key-name

text

The key’s name in signatures (default: NAME)

--replace

boolean

False

Replace an existing key (hosts that trust the old one refuse new builds)

Contract

  • Reads: stdin (–prompt), $PICELI_CREDENTIALS_DIR/NAME.json

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600; –generate, –prompt)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. Prints the public key (NAME:base64), never the secret key. Without –generate or –prompt it only reads. Refuses to replace a key without –replace (infra-credential-exists): hosts that trust the old key refuse what a new one signs.

piceli secrets provider

Store a provider’s API credential, part by part (never printed).

Option

Type

Default

Description

NAME

text

required

--prompt

boolean

False

Ask for each part on stdin (typed: an identifier echoed, a secret not; piped: one part per line, in order)

--provider

text

Whose credential it is: porkbun, openstack (or infomaniak), hetzner (or hcloud), or token (one API token)

--infra

text

MODULE:ATTR of the Infrastructure whose provider uses credentials=NAME: it tells which provider NAME is for

--from-env

boolean

False

Read the parts from the provider’s standard variables instead of stdin (for scripts)

Contract

  • Reads: stdin (–prompt), the provider’s variables (–from-env), –infra MODULE:ATTR (which provider uses NAME)

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.25.0: a two-part credential (Porkbun API key pair, OpenStack application credential) is asked for part by part, each checked before anything is stored (infra-credential-part-invalid names the part), and stored by part; piped, one part per line. The provider is –provider, else –infra’s provider using NAME, else the one stored before, else the name; otherwise one token. –from-env reads the provider’s standard variables. An argument, or a token variable without –from-env, is refused (infra-credential-refused) without echoing it. Replaces a stored credential. Prints the name and the parts’ names, never a value.

piceli secrets restore

Restore the secret store from an encrypted backup (plans first when not empty).

Option

Type

Default

Description

PATH

path

required

--identity

path

An age identity file (age -i); without it age asks for a passphrase or uses its plugins

--approve

text

The plan digest, to restore into a used store

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: PATH (age ciphertext), –identity, the store (digests)

  • Writes: \(PICELI_CREDENTIALS_DIR and \)PICELI_PROFILES_DIR (files 0600, directories 0700; into a used store only with –approve)

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: 0.25.0. Decrypts in memory with age (identity file, plugin or passphrase) and refuses an unsafe archive (secrets-restore-archive-invalid). Into an empty store it restores directly; otherwise it prints what it would add, what is identical and what differs, with a digest (exit 3), and writes only with –approve DIGEST. Never prints a value. Exit 1 when age cannot decrypt (secrets-restore-decrypt-failed).

piceli secrets s3

Store a bucket’s S3 access keys, part by part (never printed).

Option

Type

Default

Description

NAME

text

required

--prompt

boolean

False

Read the access key id, then the secret, from stdin

--from-env

boolean

False

Read AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY instead of stdin (for scripts)

Contract

  • Reads: stdin (–prompt), AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (–from-env)

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. Two lines on stdin (the key id echoed, the secret not; or piped); since 0.25.0 each part is checked before anything is stored (infra-credential-part-invalid names the part) and they are stored by part, and –from-env reads AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. An argument is refused (infra-credential-refused) without echoing it. Prints the name and the parts’ names, never a value.

piceli secrets setup

Walk through the missing secrets of a declaration, in order.

Option

Type

Default

Description

REF

text

required

--yes

boolean

False

Generate the keys Piceli generates without asking (never replaces one, never answers a prompt)

--json

boolean

False

Print one JSON object per step on stdout

Contract

  • Reads: MODULE[:ATTR], stdin (each credential part; on a terminal, confirmations), $PICELI_CREDENTIALS_DIR

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600) for each secret it stores or generates, on a terminal, when chosen: the offline backup key, the backup and .backup.json

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.25.0. Provider credentials are asked for part by part (piped: one part per line, in the order status lists them; stdin at its end skips them). Keys Piceli generates (state key, Nix signing key, age identity) are generated after a confirmation on a terminal or with –yes, printing only public halves; a damaged key is replaced only after a confirmation on a terminal, never with –yes. User data is offered on a terminal only (default: later, right before infra apply); S3 pairs are left to infra apply. –json prints one object per step, then a summary. Never prints a value. Exit 0: everything stored but what is left for later on purpose (user data, the pairs infra apply makes); 1: something still missing, incomplete or damaged (a declined generation, a refused part, a profile); 2: a module that does not load or declares nothing.

piceli secrets signing-key

A release signing key: generate or import it; print its public key.

Option

Type

Default

Description

NAME

text

required

--generate

boolean

False

Generate a new ssh-ed25519 key

--file

path

Import an existing ed25519 private key file (OpenSSH, no passphrase)

--comment

text

The public key’s comment and the allowed_signers principal (default: NAME)

--replace

boolean

False

Replace an existing key (verifiers that trust the old one refuse new signatures)

Contract

  • Reads: –file PATH, $PICELI_CREDENTIALS_DIR/NAME.json

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600; –generate, –file)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.32.0. Prints the public key and its allowed_signers line, never the private key. –file takes an ed25519 key without a passphrase (a key with one stays in ssh-agent: sign-file –agent). Without –generate or –file it only reads. Refuses to replace a key without –replace (infra-credential-exists).

piceli secrets state-key

Store the passphrase that encrypts an infrastructure’s OpenTofu state.

Option

Type

Default

Description

NAME

text

required

--prompt

boolean

False

Read the value from stdin (typed without echo, or piped)

--generate

boolean

False

Generate a random passphrase (never printed)

--replace

boolean

False

Replace an existing key (the state it encrypts becomes unreadable)

Contract

  • Reads: stdin (–prompt)

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Never printed; back the file up, the state cannot be read without it. Refuses to replace an existing key without –replace (infra-credential-exists).

piceli secrets status

Every secret a declaration needs: present or missing, who creates it, the next command.

Option

Type

Default

Description

REF

text

required

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: MODULE[:ATTR] (Infrastructure, Bucket, NixCache, NixHost, NixRelease, DevBuilds, a composition’s clusters), \(PICELI_CREDENTIALS_DIR (kinds and parts; signing keys and age identities checked in memory), \)PICELI_PROFILES_DIR, the infrastructure’s state records (which servers exist), .backup.json (the last backup’s marker)

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.25.0. Read-only; safe to retry; never prints a value. For each secret: state (present, pending: a pair the next infra apply creates, or an S3 pair the owner makes by hand and has not stored (0.25.3; next: piceli secrets s3 NAME –prompt, detail: how to make it, e.g. openstack ec2 credentials create signed in as the project’s user), missing, incomplete, damaged, or not-needed: the user data of a server that exists), created_by (infra-apply, piceli: –generate, owner: –prompt), next (the exact command), purpose and where else it must live; then the backup’s state (empty, none, stale, single-recipient, current) and warnings (an S3 read pair the provider does not limit to reading, a spent user-data key). –json prints one piceli.secrets-status.v1 object. Exit 0: every secret stored and complete or pending (the backup does not count); a secret a NixRelease’s build host needs gets, once present, the backup –only command that carries it there; 1: something missing, incomplete or damaged; 2: a module that does not load or declares nothing (secrets-nothing-declared).

piceli secrets user-data

Store a server’s user data (a cloud-config, a script or a bootstrap key).

Option

Type

Default

Description

NAME

text

required

--prompt

boolean

False

Read it from stdin (typed: one line without echo; piped: until EOF)

--file

path

Read it from this file (a cloud-config, a script)

Contract

  • Reads: stdin (–prompt), PATH (–file)

  • Writes: $PICELI_CREDENTIALS_DIR/NAME.json (mode 0600)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.24.0. Prints the name, size and a short digest (the one the plan shows), never the value; an argument is refused (infra-credential-refused) without echoing it. Used only by a plan that creates the server (Server(user_data=UserData(NAME))).

piceli sign-file

Write FILE.sig for each file, as ssh-keygen -Y sign -n file would.

Option

Type

Default

Description

FILES

path

required

--key

text

The stored signing key’s credential name

--agent

path

Sign with an SSH agent ($SSH_AUTH_SOCK) holding the key of this public key file

--agent-socket

path

The agent’s socket (default: $SSH_AUTH_SOCK)

--namespace

text

file

The signature namespace (-n)

Contract

  • Reads: the files, $PICELI_CREDENTIALS_DIR/NAME.json (–key), SSH agent (–agent)

  • Writes: FILE.sig next to each file (replaced)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.32.0. The key is a stored signing-key (–key NAME) or one an SSH agent holds (–agent KEY.pub). Verify with ssh-keygen -Y verify -f allowed_signers -I PRINCIPAL -n file -s FILE.sig < FILE. Never prints the private key.

piceli state export

Write the release’s state to one file (secret material excluded unless asked).

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR naming a piceli Pipeline

--out

path

required

The export file to write

--include-secrets

boolean

False

Also export the secret store, stored discovery, journals and backups, encrypted with –key-file (left out otherwise)

--key-file

path

Owner-only file with the encryption key (at least 32 characters)

--force

boolean

False

Overwrite an existing –out file

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), state_dir, –key-file

  • Writes: –out file

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Secret store, stored discovery, journals, pending plans and backups are left out unless –include-secrets –key-file (AES-256-GCM, scrypt key); refuses an existing –out without –force.

piceli state import

Replace the release’s state with an export (needs –approve DIGEST).

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR naming a piceli Pipeline

--in

path

required

The export file (from piceli state export)

--key-file

path

The key the export’s secrets were encrypted with

--allow-partial

boolean

False

Import an export without secret material (the next release generates new secret values)

--approve

text

The import digest printed without –approve

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), –in file, –key-file

  • Writes: state_dir, shared state Secrets and Lease (state = “cluster”)

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object), 3 approval required; nothing was executed

  • Output contract: conforms

  • Notes: Without –approve it prints the import digest and exits 3; with it, it holds the release lock and replaces the state. An export without secret material needs –allow-partial.

piceli state pull

Refresh the local working copy from the shared state (reads the cluster).

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR naming a piceli Pipeline

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR)

  • Writes: state_dir (replaced by the shared snapshot)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Takes no release lock; skipped while a run on this machine holds the state directory. A no-op with local state.

piceli state show

Show where the state lives, its generation and who holds the release lock.

Option

Type

Default

Description

--spec

text

required

path/to/release.toml, or MODULE:ATTR naming a piceli Pipeline

Contract

  • Reads: release.toml or pipeline module (–spec MODULE:ATTR), state_dir

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only; never prints state content. With local state it does not contact the cluster.

piceli status

Say whether the app is up and how to reach it. Read-only.

Option

Type

Default

Description

TARGET

text

required

--json

boolean

False

Print one piceli.status.v1 JSON object

--timeout

float

10.0

Per-request API timeout (seconds)

Contract

  • Reads: release.toml or module:attr, state_dir, kubeconfig

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only. Exit 0 when every workload is ready, 1 otherwise (including an unreadable cluster). Probes forwards on 127.0.0.1 only. JSON schema: docs/schemas/piceli-status-v1.schema.json.

piceli support-bundle

Collect a read-only, redacted snapshot of a namespace (no Secrets, no env values).

Option

Type

Default

Description

--namespace

text

required

Namespace to collect

--out

path

required

The .tar.gz to write (must not exist)

--kubeconfig

path

required

Kubeconfig file (never the default one)

--context

text

required

Kubeconfig context to use (required; current-context is never used)

--log-lines

integer

200

Lines per container log

--allow-exec

boolean

False

Allow the context’s exec credential plugin (GKE, EKS, AKS, OIDC)

--exec-sha256

text

Expected sha256: of the resolved exec plugin file

--transport

text

https

https, or loopback-http for a local test API server only

Contract

  • Reads: kubeconfig

  • Writes: –out .tar.gz (mode 0600, never overwritten)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: --context is required (current-context is never used, also not by the kubectl processes it starts); exec credential plugins need --allow-exec (optionally --exec-sha256). GET requests only (any other method is refused before it is sent); Secrets are never requested; env and ConfigMap values are never collected; logs, events and conditions are redacted. The archive’s manifest.json lists every file, its sha256 and the request methods.

piceli targets

Every environment and NixHost: commit or tag, pinned product commit, checks, state.

Option

Type

Default

Description

--composition

text

MODULE (or file.py) declaring the environments and NixReleases

--infra

text

MODULE declaring NixHosts and the Infrastructure of their servers (applied addresses, pinned host keys)

--kubeconfig

path

Explicit kubeconfig file (never ~/.kube/config or KUBECONFIG)

--context

text

Kubeconfig context (required with –kubeconfig)

--namespace

text

piceli-system

The controller’s namespace

--state-dir

path

A local controller’s state directory instead of a cluster (the one gitops run --once --state-dir uses)

--transport

text

https

https, or loopback-http for a local test API

--timeout

float

20.0

Seconds to wait for each host

--json

boolean

False

Print one JSON object on stdout

Contract

  • Reads: –composition MODULE (environments, NixReleases), –infra MODULE (NixHosts, applied addresses, pinned host keys), the controller’s status, read once: –kubeconfig/–context or –state-dir, else the composition’s home Cluster with its piceli login profile, each host’s /var/lib/piceli-host/status.json (ssh, in parallel)

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.25.0. Read-only; safe to retry. –json prints one piceli.targets.v1 object. An unreachable controller or host never fails the view: its rows say unreachable with the reason (host rows still work with the home cluster down; a missing login profile of the home cluster shows profile-not-found with a piceli login hint). Exit 0: every target reachable, none failed; 1: a target failed, rolled back, is unreachable or its checks failed; 2: no module and no controller named (targets-input-required) or a module that does not load.

piceli train

Merge branches onto the base one tested merge at a time; eject failures.

Option

Type

Default

Description

APP

text

required

BRANCHES

text

--branches

boolean

False

Starts the list of candidate branches

--promote

boolean

False

Tag the joined head and move tested and the base by fast-forward only, then run the publish steps

--push

boolean

False

Push the tag, tested and the base (needs –promote)

--queue

boolean

False

When the train is busy, queue the request and return at once (its id and position); the running train serves it next

--json

boolean

False

Print the result object on stdout

--state-dir

path

Train state root (default $XDG_STATE_HOME/piceli/train, else ~/.local/state/piceli/train)

--retire

boolean

False

Once promoted, rename each joined branch to_delete__ (never deleted); a branch checked out with changes, or one that moved after it joined, is left alone

--retire-remote

boolean

False

–retire, and delete each retired branch on the remote after the push (only while it is at the joined commit; needs –push)

--promote-run

text

Promote the head an earlier run reached (its id, or ‘last’), without running it again; refused when the base moved in a way that is not a fast-forward of that head

--compare

text

Run this old command first, in a scratch clone ({branches}: the branches, {repo}: the clone), then the train on the same branches, and print both side by side; never promotes or pushes

--compare-phase

text

With –compare: a regular expression for the old command’s output lines that start a phase (its first group names it)

Contract

  • Reads: the train spec module (MODULE[:ATTR]), then the same module in each merged tree, the Git repository (branches, base, tested), the steps’ tools (cargo, scripts of the merged tree), Train(builds=): the declared build hosts (their engines, queues, health), –promote-run: an earlier run’s record

  • Writes: worktrees of the repository at stable paths under the train cache (removed after each trial), unreferenced merge commits; refs/piceli/train//last, \(XDG_STATE_HOME/piceli/train/<name> (run records, events, logs, flaky.jsonl, the queue), \)XDG_CACHE_HOME/piceli/train (slot locks, shared cargo targets, the content store), build hosts: dev runs of the merged tree (their queues, warm caches, health events), –promote: the tag, tested and the base (fast-forward only), publish steps, –promote with Step.images: images pushed to the cluster’s registry, a prebuilt request to its controller, –push: the remote’s tag, tested and base, –compare: a scratch clone (removed), the old command’s output in the run’s directory

  • Cluster: none

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. Runs the train’s steps, which run code: the explicit branch list is the approval, and –promote/–push the approval to move refs and push. Without –promote no ref changes; nothing is pushed without –push (which needs –promote). Each candidate set is merged with git merge –no-ff onto the train’s head in a temporary worktree; its steps come from the merged tree’s spec. A failing set is bisected. –json prints one piceli.train.v1 object. –queue on a busy train writes a queued request (keeping its flags, –promote-run too, with last resolved when queued) and returns at once (piceli.train.queued.v1, exit 0); every run serves the train’s queue when it ends. A run that raises midway (a –promote-run too) is recorded failed (run-failed: train-git-failed, train-host-unavailable, train-run-failed, train-run-cancelled), notified, exit 1. Exit 0: every branch joined (or was already in) and the promotion and push asked for succeeded; 1: a branch was ejected (train-step-failed, train-step-timeout, train-merge-conflict, train-merge-failed, train-spec-invalid), the promotion was refused (train-not-fast-forward, train-checkout-dirty), a publish step or the push failed; 2: rejected before anything ran (train-not-found, train-branch-unknown, train-busy, …). Steps may run on the train’s build hosts (Train(builds=, hosts=)) through the dev run machinery; a step with inputs that passed before is reused. –promote-run RUN promotes an earlier run’s head without running it (train-run-unknown, train-not-fast-forward); no host for a step fails the run (train-host-unavailable). –compare COMMAND (0.28.0) runs the old command in a scratch clone first, then the train on the same branches without promoting, and prints both side by side (piceli.train-compare.v1 under –json); exit 0 when both agree on pass or fail, 1 when they disagree; refuses –promote, –push, –queue, –retire, –promote-run (train-compare-invalid).

piceli train-init

Write a starting train spec, from a shell script or as a template.

Option

Type

Default

Description

PATH

path

train_spec.py

--from

path

A shell script to read: its test commands become steps, the rest stays as TODO comments

--name

text

The train’s name (default: the repository’s)

--base

text

The base branch (default: the script’s, else main)

--images

text

COMPOSITION[:ATTR]: add Step.images for the GitOps controller of this composition module (declared Controller(prebuilt=True))

--repository

text

With –images: the composition’s repository URL, when it is not this one

--branch

text

main

With –repository: the branch the controller follows

--host

text

Run the cargo steps on this declared build host

--builds

text

With –host: MODULE:ATTR of the DevBuilds (or Cluster with dev=) declaring it

--force

boolean

False

Overwrite an existing file

--json

boolean

False

Print the result object on stdout

Contract

  • Reads: –from: the shell script, the directory’s project files (Cargo.toml, pyproject.toml, package.json), the written spec, loaded once with the train’s loader

  • Writes: the spec file (only a new file, or an existing one with –force)

  • Cluster: none

  • Approval required: no

  • Safe to retry: no

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.28.0. Also spelled piceli train init. Never runs the script. cargo, pytest (and uv/poetry run, python -m), tox, nox, npm, pnpm, yarn, make, just and go commands become steps; git commands are what the train does; shell glue is skipped; every other command line stays in the spec as a TODO comment with a hint. –images COMPOSITION[:ATTR] [–repository URL –branch B] adds Step.images; –host NAME [–builds MODULE:ATTR] runs the cargo steps on a build host. –json prints one piceli.train-init.v1 object. Exit 0: written and it loads; 1: written but it does not load (load_error); 2: nothing written (train-init-exists, train-init-invalid).

piceli train-prune

Bound what a train keeps: worktrees, cargo targets, the content store, runs.

Option

Type

Default

Description

TRAIN

text

required

--dry-run

boolean

False

Say what would go; remove nothing

--json

boolean

False

Print the result object on stdout

--state-dir

path

Train state root (as for piceli train)

--cache-dir

path

The train cache (default $XDG_CACHE_HOME/piceli/train, else ~/.cache/piceli/train; a spec’s Train(cache=) wins)

Contract

  • Reads: the train cache ($XDG_CACHE_HOME/piceli/train), the train’s state directory (runs), a train spec, when given instead of a name (its retention)

  • Writes: removes leftover worktrees, unused or least recently used target directories and store records, unreferenced store bytes, old runs

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. Never removes what a running trial holds, the newest runs (keep_runs) or flaky.jsonl. –dry-run removes nothing. Every train run prunes the same way at its end. –json prints one piceli.train-prune.v1 object (removed: path, kind, bytes, why; sizes and limits).

piceli train-queue

A train’s queue: waiting requests with their flags; cancel one, or serve them.

Option

Type

Default

Description

NAME

text

required

--cancel

text

Cancel this waiting request (its q-… id)

--drain

boolean

False

Serve the queue here until it is empty (resumes a request whose process died); runs each request’s steps with its flags

--state-dir

path

Train state root (default $XDG_STATE_HOME/piceli/train, else ~/.local/state/piceli/train)

--json

boolean

False

Print one piceli.train.queue.v1 object on stdout

Contract

  • Reads: $XDG_STATE_HOME/piceli/train//queue (waiting, running, done)

  • Writes: –cancel: moves the request to queue/done as cancelled, –drain: what piceli train writes, for each request served

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. Without options read-only; –json prints one piceli.train.queue.v1 object (a request whose process died shows stale). –cancel ID cancels a waiting request (train-queue-not-waiting, train-queue-not-found). –drain runs each queued request’s steps with the flags it was queued with (the request was the approval) until the queue is empty, first putting back a request whose serving process died; a request whose branches are gone is rejected (train-branch-unknown).

piceli train-wait

Wait until a train run ends; exit with its verdict.

Option

Type

Default

Description

RUN

text

required

--timeout

float

0.0

Seconds to wait (0: no limit)

--interval

float

2.0

Seconds between checks

--state-dir

path

Train state root (default $XDG_STATE_HOME/piceli/train, else ~/.local/state/piceli/train)

--json

boolean

False

Print the run’s piceli.train.summary.v1 on stdout

Contract

  • Reads: $XDG_STATE_HOME/piceli/train//runs//run.json and the train’s lock (every –interval)

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. Read-only; safe to retry. RUN is a run id, a queue id (q-…, waits for the run that serves it; train-queue-cancelled, train-queue-not-found) or a train’s name (its running run, else its newest). A run that failed midway (run-failed) exits 1. –json prints the run’s piceli.train.summary.v1. Exit 0: the run ended ok; 1: a branch was ejected, the promotion or push failed, the run was killed (train-interrupted) or –timeout ran out (train-wait-timeout); 2: no such run (train-run-not-found).

piceli trains

The trains: the run in progress, recent runs, step trends, flaky tests, deployed by which run.

Option

Type

Default

Description

NAME

text

--runs

integer

10

Recent runs to show

--trend

integer

10

Executions per step a trend’s median uses

--follow

boolean

False

Stream the running step’s log until the run ends (needs NAME or a single train)

--composition

text

Also show what each environment and NixHost runs and the run that produced it (as piceli targets reads them)

--infra

text

MODULE declaring NixHosts (as piceli targets)

--timeout

float

20.0

Seconds to wait for each host

--interval

float

1.0

Seconds between –follow polls

--state-dir

path

Train state root (default $XDG_STATE_HOME/piceli/train, else ~/.local/state/piceli/train)

--json

boolean

False

Print one piceli.trains.v1 object on stdout

Contract

  • Reads: $XDG_STATE_HOME/piceli/train/ (run records, events.jsonl, step logs, flaky.jsonl, the lock’s owner), –composition/–infra: what piceli targets reads (the controller, hosts over ssh)

  • Writes: nothing (read-only)

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: 0.26.0. Read-only; safe to retry; never takes a train’s lock. –json prints one piceli.trains.v1 object. –follow streams the running step’s log until the run ends. A record still running with no live process holding the lock shows as interrupted. Reads a cluster only with –composition/–infra. Exit 2: an unknown train name (train-unknown).

piceli ui backup

Back up an offline UI control store and its release journal.

Option

Type

Default

Description

--control-dir

path

required

Stopped UI control directory

--output

path

required

New private backup archive

Contract

  • Reads: explicit offline UI control directory

  • Writes: new private verified backup archive

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Refuses an active dispatcher; archive includes private evidence and must be protected.

piceli ui cluster-observe

Serve OIDC-scoped cluster observation and configured delivery.

Option

Type

Default

Description

--api-server

text

required

Explicit in-cluster HTTPS Kubernetes API origin

--ca-file

path

required

Mounted service-account CA file

--token-file

path

required

Mounted rotating service-account token file

--namespace

text

required

One authorized namespace

--control-dir

path

required

Private directory for the generated kubeconfig

--origin

text

required

Public HTTPS browser origin

--oidc-issuer

text

required

Trusted OIDC issuer

--oidc-metadata-url

text

required

Explicit OIDC discovery document URL

--oidc-client-id

text

required

Registered public OIDC client

--authorized-sub

text (repeatable)

required

OIDC subject granted inspection; repeat

--authorized-deploy-sub

text (repeatable)

OIDC subject granted manual delivery; repeat

--authorized-access-sub

text (repeatable)

Inspection subject allowed local-client forwarding; repeat

--definition

path

Mounted release TOML definition

--source-root

path

Mounted root of allowed source files

--source-file

text (repeatable)

Allowed source file; repeat

--renderer-image

text

Immutable repository@sha256 renderer image

--renderer-platform

text

Renderer platform

--gitops-namespace

text

Controller namespace for scoped GitOps status and requests

--grant-file

path

Projected operator-owned grant map

--build-spec

text

Trusted relative host-build.toml path in Git

--build-image

text

Pinned cluster builder image

--build-repo

text

Credential-free Git remote URL

--build-registry-url

text

Node registry OCI URL

--build-git-secret

text

piceli-build-git

--build-cache-size

text

20Gi

--build-node-arch

text

amd64

--build-platform

text (repeatable)

--name

text

cluster

Application display name

--host

text

127.0.0.1

Loopback bind for a TLS gateway sidecar

--port

integer

8000

--url-prefix

text

--experimental, --no-experimental

boolean

False

Deprecated compatibility option; no longer required

Contract

  • Reads: explicit Kubernetes API origin, projected service-account CA and token files, OIDC issuer metadata

  • Writes: private generated kubeconfig, configured durable UI control state, separately approved cluster deployment

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Requires piceli[ui] and a separate HTTPS TLS gateway sidecar. Default subjects inspect one namespace and logs. Configured deploy grants enable exact-plan reviewed manual delivery and credential-free cluster builds through scoped Jobs. Access grants enable local-client tickets. The server never binds a laptop port or reads an ambient Kubernetes context.

piceli ui cluster-serve

Serve OIDC-scoped cluster observation and configured delivery.

Option

Type

Default

Description

--api-server

text

required

Explicit in-cluster HTTPS Kubernetes API origin

--ca-file

path

required

Mounted service-account CA file

--token-file

path

required

Mounted rotating service-account token file

--namespace

text

required

One authorized namespace

--control-dir

path

required

Private directory for the generated kubeconfig

--origin

text

required

Public HTTPS browser origin

--oidc-issuer

text

required

Trusted OIDC issuer

--oidc-metadata-url

text

required

Explicit OIDC discovery document URL

--oidc-client-id

text

required

Registered public OIDC client

--authorized-sub

text (repeatable)

required

OIDC subject granted inspection; repeat

--authorized-deploy-sub

text (repeatable)

OIDC subject granted manual delivery; repeat

--authorized-access-sub

text (repeatable)

Inspection subject allowed local-client forwarding; repeat

--definition

path

Mounted release TOML definition

--source-root

path

Mounted root of allowed source files

--source-file

text (repeatable)

Allowed source file; repeat

--renderer-image

text

Immutable repository@sha256 renderer image

--renderer-platform

text

Renderer platform

--gitops-namespace

text

Controller namespace for scoped GitOps status and requests

--grant-file

path

Projected operator-owned grant map

--build-spec

text

Trusted relative host-build.toml path in Git

--build-image

text

Pinned cluster builder image

--build-repo

text

Credential-free Git remote URL

--build-registry-url

text

Node registry OCI URL

--build-git-secret

text

piceli-build-git

--build-cache-size

text

20Gi

--build-node-arch

text

amd64

--build-platform

text (repeatable)

--name

text

cluster

Application display name

--host

text

127.0.0.1

Loopback bind for a TLS gateway sidecar

--port

integer

8000

--url-prefix

text

--experimental, --no-experimental

boolean

False

Deprecated compatibility option; no longer required

Contract

  • Reads: explicit Kubernetes API origin, projected service-account CA and token files, OIDC issuer metadata, optional mounted release definition and pinned renderer

  • Writes: private generated kubeconfig, configured durable UI control state, separately approved cluster deployment

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Requires piceli[ui] and a separate HTTPS TLS gateway sidecar. Observation is the default. Configured deploy grants permit exact-plan manual delivery and cluster build Jobs; access grants permit local-client tickets. No ambient Kubernetes context or server-side laptop port.

piceli ui connect

Bind a laptop port for an authenticated cluster UI ticket.

Option

Type

Default

Description

--server

text

required

Cluster UI HTTPS origin and prefix, or the loopback http address of piceli access ui

--ticket

text

required

Pending remote-access ticket ID

--kubeconfig

path

required

Explicit local kubeconfig file

--context

text

required

Explicit local kubeconfig context

--local-port

integer

required

--ca-file

path

Optional trusted UI server CA file

--kubectl

path

Pinned kubectl executable

--experimental, --no-experimental

boolean

False

Deprecated compatibility option; no longer required

Contract

  • Reads: explicit local kubeconfig and context, one-time UI pairing secret, scoped target and resource identity

  • Writes: owned local loopback port-forward process, private local forward ownership record

  • Cluster: reads

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Requires piceli[ui], a trusted HTTPS cluster UI and local kubectl. The pairing secret is prompted without echo; kubeconfig and context must be explicit. The port exists on the client host only while the supervised command runs.

piceli ui forward-serve

Serve the composition UI in its pod, reached only through piceli access ui.

Option

Type

Default

Description

--namespace

text

piceli-system

The controller’s namespace (status and requests)

--port

integer

8790

Loopback port in the pod

--launch-secret

text

piceli-ui-launch

Secret that receives the launch token

Contract

  • Reads: the pod’s projected service-account CA and token, the controller’s status ConfigMap, environments’ workloads, pods and logs

  • Writes: the UI’s launch Secret (its launch token), sync requests in the controller’s request ConfigMap

  • Cluster: writes

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Runs in the pod piceli cluster init installs (Ui(access=“forward”)). Listens on the pod’s loopback only, without OIDC; a fresh launch token goes into the Secret piceli-ui-launch and is never printed. The Sync button writes the same request as piceli gitops sync; nothing else is written.

piceli ui restore

Restore UI control state before starting a single new server.

Option

Type

Default

Description

--archive

path

required

Verified UI backup archive

--destination

path

required

Empty new control directory

Contract

  • Reads: explicit UI backup archive

  • Writes: new private UI control directory

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Stop the server first and restore before starting a new single replica.

piceli ui serve

Register an existing definition or inventory scope and serve the bundled UI.

Option

Type

Default

Description

--kubeconfig

path

Explicit kubeconfig file

--context

text

Explicit kubeconfig context

--namespace

text

Inventory namespace

--profile

text

Local credential profile (piceli profiles –json)

--definition

path

Existing release TOML definition

--pipeline

text

Trusted Pipeline MODULE:ATTR configured by the UI owner

--gitops-namespace

text

Show the GitOps controller in this explicit namespace

--name

text

my-app

Application display name

--host

text

127.0.0.1

Loopback bind address

--port

integer

8000

--url-prefix

text

URL prefix, e.g. /piceli

--allow-exec, --no-allow-exec

boolean

False

Authorize the target’s credential plugin

--exec-sha256

text

--control-dir

path

Private durable UI operation state directory

--source-root

path

Explicit root of allowed definition source files

--source-file

text (repeatable)

Allowed relative source file; repeat for each file

--renderer-image

text

Pinned local isolated renderer image ID (sha256:…)

--renderer-platform

text

Renderer platform: linux/amd64 or linux/arm64

--docker

path

Docker executable to pin for isolated evaluation

--docker-socket

path

/var/run/docker.sock

Explicit local Docker daemon socket

--state-dir

path

Private UI state directory (default: $XDG_STATE_HOME/piceli/ui)

--infra

text

Also show the machines of a piceli.infra.Infrastructure MODULE:ATTR (read-only)

--trains

boolean

False

Also show the local merge trains (piceli trains; read-only)

--train-state-dir

path

Train state root for –trains (default $XDG_STATE_HOME/piceli/train)

--train-composition

text

With –trains: also show which run produced what each environment and NixHost of this composition MODULE runs

Contract

  • Reads: kubeconfig, release or Pipeline definition, release state, approved source files, pinned Docker renderer

  • Writes: configured UI control directory, approved release state

  • Cluster: writes

  • Approval required: yes

  • Safe to retry: yes

  • Exit codes: 0 success, 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Requires piceli[ui]. Supply –pipeline for a trusted Pipeline, –definition for a release definition, or explicit –kubeconfig, –context and –namespace for inventory. Loopback only; no ambient target. Pipeline builds require a second exact approval after delivery. Starting the service approves no deployment.

piceli watch

Follow a deploy run until it settles: every stage change and progress line, then the outcome. Read-only; reads the local run journal (with shared state run piceli state pull first), never the cluster.

Option

Type

Default

Description

TARGET

text

--env

text

Only this environment’s state (default: every environment)

--state-dir

path

A pipeline state directory, instead of a pipeline (default: ./.piceli-deploy)

--run

text

Watch this run id (default: the newest run)

--once

boolean

False

Print the run’s current state and exit

--interval

float

0.5

Journal poll seconds

--timeout

float

Stop watching after this many seconds (watch-timeout, exit 1)

--json

boolean

False

Print JSON lines: snapshot, changes, then the result

Contract

  • Reads: pipeline module or –state-dir, state_dir

  • Writes: nothing (read-only)

  • Cluster: none

  • Approval required: no

  • Safe to retry: yes

  • Exit codes: 0 success, 1 the operation ran but did not succeed (not ready, drift, build failed), 2 rejected before any change (stdout: the rejection object)

  • Output contract: conforms

  • Notes: Read-only and offline (never the cluster); stdout is JSON lines piceli.watch-event.v1: snapshot, stage/run/progress, result. With shared state it reads the local working copy (piceli state pull first). –once prints the current state; –timeout ends with watch-timeout (exit 1) and leaves the run alone.