Ployz is built around a single design conviction: small-cluster infrastructure gets better when the system gives you explicit operations, not a policy engine that manages itself. Every change to the cluster happens because you ran a command. There are no controllers running in the background, no autoscalers silently mutating placement, and no desired-state document waiting to be reconciled. What you see is what is true — right now, on demand.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/getployz/ployz/llms.txt
Use this file to discover all available pages before exploring further.
What makes something a primitive
A primitive in Ployz has four properties:- Single command. The entire operation is one
ployzctlinvocation. If you find yourself writing a script to combine multiple commands for a routine task, that task is a missing primitive. - Bounded effect. The operation touches a clearly defined set of resources. You can know, before running it, what will change.
- Clear result. The command either succeeds and returns verifiable facts, or fails cleanly. Ambiguous progress — half-applied state reported as success — is the worst possible outcome.
- Safe to retry. Failed operations leave enough state for the operator or an agent to retry without reasoning about hidden partial progress.
A primitive fails loudly when preconditions are missing. It does not silently succeed with partial work, and it does not wait for eventual consistency to catch up.
Contrasting with the Kubernetes model
Kubernetes is a declarative system. You describe a desired state, and controllers continuously reconcile live state toward it. This is the right model for 10,000-node fleets where no human can track every decision. For small clusters — the 1–200 node range Ployz targets — that tradeoff inverts. You do not need the cluster to reason for itself. You need operations that are easy to inspect, honest when they cannot complete, and tractable for both humans and automation. Reconcilers add operational surface without adding capability at small scale.Kubernetes
Declare desired state. Controllers converge live state toward it in the background. Operators observe convergence and reason about reconciler behavior.
Ployz
Run one command. It inspects preconditions, executes bounded steps, and returns a result. The cluster does not change state in the background.
Why primitives make automation tractable
The same discipline that makes a CLI useful for humans makes it usable for agents. An agent can:- Inspect the current cluster state.
- Choose a primitive that achieves the desired outcome.
- Run it and observe the structured result.
- Verify the outcome and decide what comes next.
The eight primitives
machine add
machine add
Provisions a fresh machine into the cluster. The machine joins the WireGuard mesh, receives a NATS leaf connection, and becomes available for workload placement. The command does not complete until the machine is reachable and active.
machine rm
machine rm
Drains workloads off a machine, transfers their persistent state to surviving machines, and removes it from the cluster. Safe regardless of which machine is removed — there is no special node whose removal breaks the cluster. Use
--force to skip online cleanup for an unreachable machine.migrate
migrate
Moves a workload — including its persistent state — from one machine to another. Uses ZFS incremental send to transfer volumes. Preview before applying with
migrate preview.branch
branch
Forks an entire namespace — services, volumes, routing — as a single atomic operation. The branch is an independent copy backed by ZFS copy-on-write clones, so it is instant regardless of data size. Services and volumes can each be
branch (copy-on-write) or fresh (new empty).promote
promote
Promotion is done through the deploy path: deploy the branched service spec into the production namespace. Traffic flips atomically at the commit point. The prior namespace remains snapshotted for rollback.
rollback
rollback
Restores the previous deploy point, including state. Re-deploy the previous manifest to revert services and ZFS volume snapshots atomically. The rollback is itself a deploy — it produces a new commit recording the revert.
fork-volume
fork-volume
Volume forking is handled through the
branch operation with --volume-mode branch. ZFS copy-on-write clones are used to fork volumes instantly — the clone and origin share unchanged blocks until they diverge.dev (local cluster)
dev (local cluster)
ployzctl with the docker runtime runs the same cluster model locally on a developer machine. The daemon, mesh, NATS, gateway, and DNS all start inside Docker Desktop’s Linux VM. The primitives — branch, migrate, rollback — work identically to a multi-node cluster.