Operational procedures for projects managed by
quartzctl.
Commands assume you are in the target project root with quartz.yaml present. Use --config <path> when operating from another directory.
quartz check
quartz render --out ./out/quartz.generated.yamlReview the rendered file for expected name, dns.domain, provider settings, stage ids, and stage paths.
quartz install
quartz install --yesIf the run failed at a known stage:
quartz install --resume-from <stage> --yesIf OpenTofu needs deferred actions for a specific install:
quartz install --allow-deferral --yesBefore a full install, render and confirm any app-owned delivery settings:
quartz render --out ./out/quartz.generated.yamlCheck that each application includes:
repo_urlpointing at the app repositorypathpointing at the app-owned manifest entrypoint (defaults todeploy)settings.post_deploywith the expected enablement / gate policy
Quartz treats gitops.apps as optional and deprecated for application delivery. If it is omitted, that is expected.
quartz tofu plan --stage <stage> --init
quartz tofu apply --stage <stage> --initUse this for targeted validation before a full quartz install. The --init flag initializes the stage backend first.
quartz tofu output --stage <stage> --initUse outputs to confirm cross-stage values before debugging downstream failures.
When a resource exists in the cloud but is missing from OpenTofu state:
quartz tofu import --stage <stage> ADDRESS ID --initFlag form is also supported:
quartz tofu import --stage <stage> --address ADDRESS --id ID --initThen run:
quartz tofu plan --stage <stage>When OpenTofu reports a stale lock:
quartz tofu force-unlock --stage <stage> LOCK_ID --initFlag form:
quartz tofu force-unlock --stage <stage> --lock-id LOCK_ID --initPrefer this command to manual backend lock-table edits.
quartz tofu state list --stage <stage> --init
quartz tofu state show --stage <stage> ADDRESS --init
quartz tofu state rm --stage <stage> ADDRESS --initstate show redacts sensitive values. state rm removes objects from state without destroying real infrastructure; use it only when the resource should no longer be managed.
quartz login
quartz login --out /tmp/kubeconfig
export KUBECONFIG=./out/kubeconfigAliases:
quartz kubeconfig
quartz refresh-kubeconfigquartz refresh-secretsAlias:
quartz rsUse after rotating a secret in the upstream secret manager.
Restart all deployments, daemonsets, and statefulsets:
quartz restartRestart a specific workload:
quartz restart --kind deployment --namespace <namespace> --name <name>--kind can be repeated.
quartz exportResources are selected by export.objects and written under export.path.
quartz tofu validate --stage <stage>
quartz tofu format --stage <stage>
quartz tofu format-allformat is also available as fmt.
quartz clean
quartz clean --yesclean destroys stages in reverse dependency order. If a stage fails, cleanup continues and reports the failures. The remote backend is kept until all stage destroys succeed so operators can re-run cleanup with recoverable state.
Treat the final cleanup report as cumulative: earlier stage failures remain
visible even when later stages continue to make progress. A remaining backend is
not a leaked resource by itself; it means at least one stage still needs a
successful destroy so state can stay available for recovery. Re-run
quartz clean --yes after resolving the reported blocker.
While the cluster is still reachable, quartz clean now streams the Quartz
pre-delete hook's cumulative breadcrumbs as they change, including degraded but
still-progressing signals and the latest residual-resource snapshot reported by
the hook.
For CLI developers:
cd quartzctl
mise run test
mise run deploy
quartz --versionmise run deploy builds the local binary and atomically replaces common local install locations.