Piceli Documentation¶
Kubernetes infrastructure as typed Python: model it, plan it, apply it safely, and observe it.
Piceli lets you describe a Kubernetes application in typed Python (a typed
App, Piceli templates, the official kubernetes client models, or plain
YAML/JSON), shows you exactly what would change in the live cluster, and
applies only the plan you approved, in dependency order, with a durable journal
that makes every run resumable. piceli deploy takes an app from source to a
running, checked release in one command. It is a Python-native alternative to
hand-maintained YAML, Kustomize overlays and Helm templates, and since 0.13.0
it also runs the delivery loop: a GitOps controller, one environment per
branch and a web UI.
Project status: pre-alpha
Piceli is under active development and its APIs change between releases. Every cluster change goes through one recoverable engine: server-side apply with preconditions, a durable journal and resume, always against an explicit kubeconfig file and context. See Overview and Architecture for the architecture and Roadmap for the status of each feature.
GitOps, environments and the web workspace¶
piceli gitops enable deploy/app.py:pipeline --repo <url> --branches 'main,wp-*' ... # install the controller (plan, then --approve)
piceli envs --pipeline deploy/app.py:pipeline # what runs where: branch, namespace, commit, health
piceli env up wp-login --plan # one environment per branch (plan, then --approve)
piceli ui serve --pipeline deploy/app.py:pipeline # the web UI
The controller keeps one environment per branch at its head (GitOps: Piceli’s controller and manifest export),
piceli env and piceli envs operate on them (Environments: one app for dev, staging and prod), and the
web workspace connects their source revisions to components, environments and
observed workloads. Explore the topology, compare exact commits and image
digests across environments, inspect resource ownership/configuration, and open
saved plans, deployment journals and captured logs in Deployment history.
Reviewed delivery retains its exact approval step (Piceli web application).
From a source checkout, with uv, Node.js and npm installed, run make ui to
build and open the current UI with disposable sample state. It normally opens
http://127.0.0.1:4178, with no cluster or credentials to configure. See
Piceli web application for preview access, explicit real-target launch commands and a map of
the views.
A first taste¶
# app.py
from piceli import App, Checks, Pipeline, Target
target = Target.kubeconfig("hello.kubeconfig", context="kind-hello", namespace="hello")
app = App("hello")
web = app.deployment(
"web",
image="docker.io/library/nginx:1.27@sha256:<digest>",
ports=[80],
ready=app.probe.http("/", 80),
)
app.service(web, port=80, access=app.access.forward(local=18080, health="/"))
pipeline = Pipeline(app, target, checks=Checks.http(web, "/", expect=200))
piceli render app.py:app --namespace hello # manifests, no cluster
piceli deploy app.py:pipeline --plan # review; prints a combined hash
piceli deploy app.py:pipeline --approve <combined-hash> # runs exactly that plan
piceli status app.py:pipeline # is it up, which URLs
Getting Started runs this end to end on a disposable kind
cluster.
Where to start¶
From nothing to a running, checked app in a disposable cluster.
The mental model (model → plan → execute → observe), the engine and a glossary.
Infrastructure topology, compact sources, workload configuration, saved plans,
revision comparisons and deployment logs. Try make ui from a checkout, or
serve an explicit target locally or in the cluster with OIDC.
piceli gitops enable keeps one environment per branch at its head; see also
Environments: one app for dev, staging and prod for piceli env and piceli envs.
What Piceli covers and its current limits, and the same app written in Piceli, Helm, Kustomize, cdk8s and Pulumi.
One typed module for dev, staging and prod: StatefulSet, Gateway route, custom resource, network policy, SOPS secret and checks.
piceli deploy: build, deliver, plan, apply and check in one resumable run.
release.toml, adoption, secrets, rollback and resume.
Import a live namespace or manifest files as a typed app.
Safe commands, approvals, the output contract and error recovery.
Every command and option, with side effects and approval rules.
Every refusal code: cause, fix and whether a retry can succeed.
The maturity of every feature, and where the project is heading.
Part of the Pynenc ecosystem¶
Piceli is developed alongside Pynenc, a distributed task orchestration library, but it does not depend on it. It works with any Kubernetes workload.