Skip to content
Praxis is in alpha. The supported API is praxis.io/alpha, and the contract can change while Praxis is in alpha.About the alpha contract

CUE templates

Praxis templates are CUE values with optional variables and data sections plus a required resources section. CUE provides types, constraints, defaults, composition, and validation before any provider call is made.

variables: {
application: string & =~"^[a-z][a-z0-9-]{2,30}$"
environment: "dev" | "staging" | "prod"
region: string | *"us-west-2"
}
resources: archive: {
apiVersion: "praxis.io/alpha"
kind: "S3Bucket"
metadata: {
name: "\(variables.application)-\(variables.environment)-archive"
labels: team: "payments"
}
spec: {
region: variables.region
versioning: true
encryption: {
enabled: true
algorithm: "AES256"
}
tags: {
application: variables.application
environment: variables.environment
}
}
}

Every resource uses the same outer envelope:

FieldPurpose
apiVersionThe current contract, praxis.io/alpha
kindA registered Praxis resource kind
metadata.nameStable logical name used by the template and driver
metadata.labelsPraxis metadata for organization and selection
specProvider-specific desired state validated by the resource schema
lifecycleOptional ownership, drift, and deletion policy

Supply variables with repeated flags or a JSON values file:

Terminal window
praxis plan stack.cue \
--account prod \
--var application=payments \
--var environment=prod
praxis plan stack.cue --account prod -f prod.vars.json

CUE validation runs before the plan. Missing variables, invalid enums, and constraint violations fail without touching AWS.

Terminal window
praxis list schemas
praxis get schema S3Bucket
praxis get schema S3Bucket -o json

The CLI embeds the CUE schemas, so discovery does not require a running Praxis environment.