strata — CLI Command Reference
All commands are invoked as strata <command> [options] (or uv run strata <command>).
Standard Options
These options are accepted by every command and subcommand:
Option |
Type |
Default |
Description |
|---|---|---|---|
|
path |
auto-detected |
Root workspace directory. Falls back to |
|
|
|
Output format. Defaults to |
|
flag |
off |
Enable verbose output. |
|
flag |
off |
Suppress console output. |
|
flag |
off |
Disable all ANSI color output. Also honoured via the |
Automation / AI agents: Always use
--output json(or setSTRATA_OUTPUT=json). Every CLI flag has anXYZ_<OPTION>environment-variable equivalent — set them once rather than passing flags on every call. In console mode, errors are written to stderr; the JSON envelope always goes to stdout.
Exit Codes
Code |
Meaning |
|---|---|
|
Success |
|
System / execution failure (crash, missing file, init error) |
|
Usage error — invalid CLI arguments (Click default) |
|
Validation failure — file processed but schema-invalid |
|
Lock conflict — another deployment holds the lock; safe to retry after delay. Only returned by |
Using strata in CI/CD? See ci-integration.md for complete GitHub Actions and Azure Pipelines examples that leverage these exit codes.
Idempotency & Retry Safety
This table answers: “If this command fails, is it safe to re-run without manual cleanup?”
Category |
Commands |
Safe to re-run? |
|---|---|---|
Read-only |
All |
✅ Always safe — no state is written |
Write-idempotent |
|
✅ Safe — produces the same result each time; re-running after failure leaves no partial state |
Retry-safe with caveats |
|
⚠️ Safe to retry — provisioners are designed for re-entrant execution, but a failed deploy may leave infrastructure in an intermediate state; inspect |
Destructive / side-effecting |
|
❌ Manual review required before re-running — these commands delete infrastructure, overwrite secret values in external stores, or re-send audit records that may already have been partially processed |
Lock conflicts (exit 4): If
deploy runordeploy destroyexits with code 4, another process holds the deployment lock. Wait for it to release (or usedeploy lock statusto inspect), then retry. Do not usedeploy lock releaseunless the lock is stale from a crashed pipeline.
Command Groups
Group |
Subcommands |
Description |
|---|---|---|
|
|
Solution workspace lifecycle |
|
|
Manage persistent workspace defaults and logging config |
|
|
View execution logs (read-only) |
|
|
Manage environment profiles |
|
|
Manage file references within profiles |
|
|
Manage repositories in the solution |
|
|
Build platform and Terraform artifacts; generate SBOMs |
|
|
Validate YAML files and visualize workspace dependencies |
|
|
Inspect environment configuration and infrastructure |
|
— |
Show workspace setup progress and suggest the next action |
|
— |
Interactive workspace REPL |
|
|
Inspect JSON schemas for platform YAML kinds |
|
|
Inspect and evaluate deployment guardrails |
|
|
Generate and manage secret values |
|
|
Query deploy-log evidence and forward to audit sinks |
|
|
Deploy platform using provisioners |
|
|
Deploy and manage individual services |
|
|
Query and export deployment manifests |
|
|
Model Context Protocol server for AI integration |
|
|
Inspect and manage resolved deployment values |
|
|
Manage team-shared template variables |
|
|
Manage and inspect external tool integrations |
|
— |
Create a platform config file from a template |
|
— |
Show CLI version |
|
|
Output shell completion script for the given shell |
|
— |
Show help topics |
† Requires an initialized workspace (
.strata/directory). Runstrata sln init --name NAMEfirst.
sln
Solution workspace lifecycle commands.
sln init
Initialize a new strata solution workspace. Creates the .strata/ state directory, workspace defaults, and a ready-to-use .devcontainer/ for VS Code Dev Containers and GitHub Codespaces.
strata sln init --name NAME [--template NAME-OR-PATH] [--list] [standard options]
Option |
Required |
Description |
|---|---|---|
|
✅ |
Name of the solution workspace |
|
— |
Built-in template name (e.g. |
|
— |
List available scaffold templates and exit. Does not require |
|
— |
Ask a short series of questions (stack type, cloud provider) to select and apply the right template. Requires an interactive terminal. |
Discovering templates:
strata sln init --list
Shows built-in templates (shipped with strata) and workspace-local templates (.strata/templates/ directories with a scaffold/ subdirectory). Each template’s description is pulled from its template.yaml manifest.
Files created:
Path |
Description |
|---|---|
|
Solution registry |
|
Workspace CLI defaults |
|
Logging configuration |
|
Dev container definition (Python 3.13, Terraform, Azure CLI, kubectl/Helm) |
|
Post-create script — installs |
All .devcontainer/ files are written idempotently — existing files are never overwritten.
Exit codes: 0 success · 1 failure · 2 missing --name
strata sln init --name my-platform
strata sln init --name my-platform --template aks
strata sln init --name my-platform --template .strata/templates/my-corp-base/
strata sln init --guided
Dev container: After
strata sln init, open the workspace in VS Code and select Reopen in Container to start a pre-configured environment with all tools installed. The container also works with GitHub Codespaces.
sln update
Refresh package-owned files in an existing workspace after upgrading the strata package. Overwrites files that ship with the package (schemas, example templates, CI workflows, devcontainer config) while leaving user-customised files untouched.
strata sln update [standard options]
Requires an initialized workspace (solution.json must exist).
Files updated (package-owned — always overwritten):
Path / Pattern |
Description |
|---|---|
|
JSON Schemas derived from Pydantic models |
|
Package documentation stub |
|
Package-standard ignore rules |
|
Example custom integration starter |
|
Example YAML document templates |
|
Dev container definition and post-create script |
|
CI/CD workflow templates |
|
Copilot instructions |
|
Package-standard root ignore rules |
Files preserved (user-owned — never overwritten):
Path / Pattern |
Description |
|---|---|
|
User-customised VS Code workspace file |
|
User VS Code settings, tasks, and launch configs |
|
User CLI preferences |
|
User logging configuration |
|
User solution documentation |
Exit codes: 0 success · 1 failure (workspace not initialised, or file write error)
strata sln update
strata sln update --work-path /path/to/workspace
sln clean
Remove workspace artifacts (log files, temp files) without touching solution state.
strata sln clean [--dry-run] [standard options]
Option |
Default |
Description |
|---|---|---|
|
off |
Report what would be deleted without removing anything |
strata sln clean
strata sln clean --dry-run
sln status
Show workspace health: solution identity, active profile, repositories, and integration availability.
strata sln status [standard options]
Works inside and outside an initialized workspace (degrades gracefully when solution.json is absent).
strata sln status
strata sln status --output json
sln export
Export the current workspace as a reusable scaffold template. Copies all workspace files into .strata/templates/<name>/scaffold/, replaces every occurrence of the solution name with {{ solution_name }} in file content and file paths, then generates a template.yaml manifest.
strata sln export --name NAME [--force] [--dry-run] [standard options]
Option |
Required |
Description |
|---|---|---|
|
✅ |
Template name — used as the output directory under |
|
— |
Overwrite an existing template with the same name |
|
— |
List files that would be copied without writing anything |
Output structure:
Path |
Description |
|---|---|
|
Workspace files with |
|
Template manifest (name, description, variables) |
Excluded from export: .git/, repos/, .venv/, node_modules/, .strata/logs/, __pycache__/, *.pyc, *.log
Exit codes: 0 success · 1 failure (includes target directory already exists without --force)
strata sln export --name my-corp-base
strata sln export --name my-corp-base --dry-run
strata sln export --name my-corp-base --force
Next steps: Use the exported template with
strata sln init --name new-ws --template .strata/templates/my-corp-base/
vars
Manage team-shared template variables stored in solution.json. Variables are substituted as {{ key }} in platform YAML files.
Subcommand |
Description |
|---|---|
|
Set or overwrite a template variable |
|
Remove a template variable |
|
Show all current template variables |
strata vars set owner myteam
strata vars unset owner
strata vars list
strata vars list --output json
tools
Manage and inspect external tool integrations (Terraform, Docker, kubectl, Helm, Azure CLI, etc.).
Subcommand |
Description |
|---|---|
|
List all known integrations and their availability |
|
Deep-check a single integration (version, auth, connectivity) |
|
Show download URL, env vars, and auth methods for an integration |
tools install accepts --env-file PATH to write a commented env-var template to a file.
tools status options
Option |
Description |
|---|---|
|
Load a deployment file to add a Requirement column ( |
|
Show only integrations marked |
|
Show only integrations marked |
|
Show only integrations that are installed and available |
|
Show only integrations that are not available. Exits 3 if any |
strata tools status
strata tools status --output json
strata tools status --deployment deployment.yaml
strata tools status --deployment deployment.yaml --required --missing
strata tools check terraform
strata tools install terraform
strata tools install terraform --env-file .env.template
new
Create a new platform configuration file (or set of files) from a built-in or workspace-local template.
strata new TEMPLATE NAME [--output-file FILE] [--overwrite] [--set KEY=VALUE ...] [standard options]
strata new --list
Option / Argument |
Description |
|---|---|
|
Template name (e.g. |
|
Injected as |
|
Output file path or directory (default: current directory) |
|
Overwrite output file(s) if they already exist |
|
Inject an extra variable into the template (repeatable) |
|
List available templates and bundles, then exit |
|
After creation, detect any missing files referenced by the new file and offer to scaffold them automatically. |
Template discovery — strata new --list shows all templates grouped by type:
Single-file templates — create one YAML file (e.g.
namespace,provider,tenant)Scaffold bundles — multi-file workspace starters from
templates/examples/and.strata/templates/(e.g.aks,compose). Use viastrata sln init --template <name>.
Workspace-local templates are marked with * in the output.
strata new namespace my-app
strata new provider azure --output-file config/
strata new workspace my-ws --set owner=myteam
strata new dns my-zones --output-file config/dns/
strata new tenant newcorp --output-file repos/xyz-config/ --set zone=eu --set tier=premium
strata new --list
Template resolution order
For any TEMPLATE name, strata searches in this order — first match wins:
.strata/templates/<name>/— workspace bundle directory.strata/templates/<name>.yaml— workspace single filePackage bundle directory
Package single-file template
Workspace templates always override the package defaults.
Bundle templates
A bundle is a directory under .strata/templates/ that contains multiple
template files. The directory tree is the output structure — {{ var }}
substitution runs on both file content and path segments using the same
{{ var }} syntax as single-file templates.
Built-in tenant bundle example:
.strata/templates/tenant/
├── template.yaml ← metadata + description
├── README.md
└── {{ name }}/ ← rendered to tenant name
├── {{ name }}.yaml ← tenant config
├── README.md
├── CHECKLIST.md
└── environments/
├── dev.yaml ← environment overrides
├── qa.yaml
└── prd.yaml
Running strata new tenant contoso --output-file tenants/ produces:
tenants/contoso/
├── contoso.yaml (tenant config with {{ name }} → contoso)
├── README.md
├── CHECKLIST.md
└── environments/
├── dev.yaml (dev environment template)
├── qa.yaml (qa environment template)
└── prd.yaml (prd environment template)
All {{ var }} references in content and path segments are substituted from:
name— theNAMEargument (always available)--set KEY=VALUEoverridesTeam context from
solution.json(if present)
Workspace-local bundles — Teams can create custom bundles in .strata/templates/<name>/
to standardize tenant provisioning, CI/CD pipelines, or deployment structures. Teams maintain
these templates locally; they are not shipped with strata.
config
Manage persistent workspace defaults stored in .strata/cli.yaml.
config set KEY VALUE
strata config set output json
strata config set verbose true
Allowed keys: output, verbose, quiet, work_path.
config unset KEY
strata config unset output
config list
strata config list
strata config list --output json
config log {#config-log}
Manage logging.yaml — the workspace logging configuration.
Subcommand |
Description |
|---|---|
|
Show the full current |
|
Get a single value by dot-notation key |
|
Set a logging config value |
|
Remove a logging config key (restore default) |
|
Reset |
strata config log list
strata config log get level
strata config log set level DEBUG
strata config log unset level
strata config log reset
log
View execution logs (read-only).
Note: To configure logging behaviour (levels, output format), use
strata config log. Seeconfig logfor details.
log list
strata log list [--lines N] [--minutes N] [--level LEVEL] [--execution-id ID] [--last]
Option |
Default |
Description |
|---|---|---|
|
50 |
Maximum number of log entries to show |
|
— |
Show only entries from the last N minutes |
|
— |
Filter by minimum log level: |
|
— |
Filter to a specific execution ID |
|
off |
Show logs for the most recent command execution |
strata log list
strata log list --last
strata log list --level ERROR --lines 20
profile
Manage environment profiles within the solution.
profile add NAME
Create a new environment profile.
Option |
Description |
|---|---|
|
Activate this profile immediately after creating it |
strata profile add staging
strata profile add prd --activate
profile remove NAME
strata profile remove staging
profile list [--name NAME]
strata profile list
strata profile list --name staging
profile activate NAME
Activate a profile (deactivates all others).
strata profile activate staging
profile show NAME
Show all registered ref paths for a profile, grouped by type.
strata profile show staging
ref
Manage file references (env, config, data, secret) within profiles.
Each file type has its own subgroup: ref env, ref config, ref data, ref secret. All four expose the same four subcommands.
Type |
What it registers |
|---|---|
|
Environment variable files ( |
|
Platform YAML config files — merged by kind into the build artifact |
|
Arbitrary data files (JSON, TOML, text) — copied verbatim into the build output without merging. Use for non-YAML assets your Terraform or scripts need. |
|
Secret files (YAML or env format) — loaded at deploy time, values masked in logs |
All ref subcommands accept --profile NAME (optional; defaults to the active profile).
ref <type> add NAME PATH
strata ref env add base-env .env
strata ref config add app-config @myrepo/config/app.yaml --profile staging
ref <type> remove NAME
strata ref env remove base-env --profile staging
ref <type> list
strata ref config list
strata ref config list --profile staging
ref <type> show NAME
Display the file content of a ref path entry.
strata ref config show app-config --profile staging
repo
Manage repositories registered in the solution.
repo add NAME URL
strata repo add NAME URL [--branch BRANCH] [--path PATH] [--clone]
Option |
Default |
Description |
|---|---|---|
|
|
Default branch to track (git repos only) |
|
— |
Local path relative to work-path (default: |
|
off |
Clone the repository immediately after registering |
URL / path auto-detection:
Remote git URL (any
https://,git@, etc.) → registered as typegitops. Use--branchand--cloneas needed.Local path starting with a drive letter (
C:/…,C:\…) or a network path (//server/…,\\server\…) → registered as typelocal. The path must exist and be a directory at registration time.--branchand--cloneare ignored. No sync is needed — the folder is already on disk.
--type local: You can also pass--type localexplicitly to force local registration when the auto-detection heuristic doesn’t match (e.g. a relative path or an unusual UNC format). This is the same as what the workspace template’sGETTING_STARTED.mduses for repos that already live on disk.
# Remote git repository
strata repo add platform https://github.com/org/platform.git
strata repo add platform https://github.com/org/platform.git --branch develop --clone
# Local folder (Windows drive path)
strata repo add infra C:/repos/xyz-infrastructure
# Local network share
strata repo add shared //fileserver/repos/platform
repo list [--name NAME]
strata repo list
strata repo list --name platform
repo remove NAME [--purge]
--purge also deletes the local clone directory from disk.
strata repo remove old-repo
strata repo remove old-repo --purge
repo sync [--name NAME] [--force]
Clone or pull repositories. --force hard-resets dirty working trees instead of skipping them.
strata repo sync
strata repo sync --name platform --force
repo status [--name NAME]
Show git working-tree state and tag status for registered repositories.
strata repo status [--name NAME] [standard options]
Output includes:
Repository path, current branch, tracking remote
Ahead/behind counts vs. tracking remote
File status: count of staged, unstaged, untracked, conflicted files
NEW: Latest release tag and quality-gate tag with age (if any tags exist)
Console output example:
Repository Status
─────────────────
✅ my-service [main → origin/main]
Tags:
Release: v1.2.0 (14 days ago, abc1234)
Quality: tested (2 days ago, def5678)
✅ tf-landscape [main → origin/main]
Tags:
Release: v2.4.0 (7 days ago, ghi9abc)
Quality: tested-20260701 (1 day ago, jkl2def)
⚠️ config-repo [dev → origin/main ↑0 ↓2]
2 unstaged, 1 untracked
JSON output (with --output json) includes full tag metadata:
{
"repos": [{
"name": "my-service",
"tags": {
"latest_release": {
"name": "v1.2.0",
"commit": "abc1234567890abcdef",
"short_commit": "abc1234",
"created": "2026-06-20T10:30:00+00:00",
"age_days": 14,
"age_str": "14 days ago"
},
"latest_quality": {
"name": "tested",
"commit": "def567890123",
"short_commit": "def5678",
"created": "2026-07-01T10:15:00+00:00",
"age_days": 2,
"age_str": "2 days ago"
}
}
}]
}
Options:
Option |
Description |
|---|---|
|
Show status for a single repository |
|
List individual changed files |
Discovering release candidates:
strata repo status --output json | jq '.repos[] | select(.tags.latest_quality) | .tags.latest_quality'
Usage:
strata repo status
strata repo status --name my-service
strata repo status --output json
strata repo status --verbose
build
Note:
buildrequires the Terraform CLI (terraform) to be installed and onPATH. The--dry-runmode (plan only, no files written) works without it. Full artifact generation targets production-ready environments.
Build platform and Terraform artifacts from a deployment YAML file.
All build subcommands accept --file/-f PATH to specify the deployment file.
build run
strata build run [-f FILE] [--dry-run] [standard options]
Runs the full build pipeline (platform → terraform → ansible → compose → helm → SBOM). --dry-run validates and plans without writing output files.
strata build run -f xyz-deploy-prd.yaml
strata build run --dry-run
build plan
strata build plan [-f FILE] [--stage NAME] [--artifacts-only] [standard options]
Builds into a temp directory, diffs against existing artifacts, then runs terraform init → validate → plan per stage. Nothing is written to the real build path.
Also shows a value status table derived from YAML alone (no store access required) — useful for verifying that all required values have a source before deploying.
Option |
Description |
|---|---|
|
Limit terraform plan to one stage |
|
Skip terraform plan — show artifact diff only |
Value status column values:
Status |
Meaning |
|---|---|
|
Built-in store ( |
|
Integration-backed with |
|
Secret with |
|
Integration-backed with no |
strata build plan -f xyz-deploy-prd.yaml
strata build plan --stage production --artifacts-only
build sbom
strata build sbom [-f FILE | --scan PATH] [--report MODE] [--output-file PATH] [--no-deps] [--audit] [--severity LEVEL] [--fail-on LEVEL] [standard options]
Two modes of operation:
Deployment mode (
-f FILE): Regenerates the SBOM from an existingplatform.jsonwithout a full rebuild. Requires a priorstrata build run.Scan mode (
--scan PATH): Scans any directory for SBOM components without a deployment file or workspace init. Useful for generating an SBOM from existing Terraform, Helm, Compose, or application repos.
Collectors run in both modes:
Collector |
Deployment mode |
Scan mode |
|---|---|---|
Container images (platform model) |
✅ |
— (empty model) |
Compose images ( |
✅ |
✅ |
Helm charts (platform model) |
✅ |
— (empty model) |
Helm charts ( |
✅ |
✅ |
Terraform providers ( |
✅ |
✅ |
Terraform modules ( |
✅ |
✅ |
Ansible collections ( |
✅ |
✅ |
Application dependencies (lockfiles) |
✅ |
✅ |
--scan and -f are mutually exclusive.
--report selects the output style:
Flag |
Behaviour |
|---|---|
|
Write |
|
Print a human-readable grouped listing to stdout |
|
Write to PATH instead of the default location / stdout |
|
Skip |
|
Run CVE vulnerability scan after generating the SBOM (requires trivy or grype in PATH) |
|
Minimum severity to report: |
|
Exit non-zero (code 3) if findings at this severity or above exist. Optional — without it, audit is advisory only |
# Regenerate sbom.json from deployment
strata build sbom -f xyz-deploy-prd.yaml
# Print a human-readable platform inventory
strata build sbom -f xyz-deploy-prd.yaml --report inventory
# Save the inventory to a file
strata build sbom -f xyz-deploy-prd.yaml --report inventory --output-file inventory.txt
# Skip lockfile scanning (faster)
strata build sbom -f xyz-deploy-prd.yaml --no-deps
# Scan a directory (no strata workspace required)
strata build sbom --scan ./my-terraform-repo
# Scan + human-readable overview
strata build sbom --scan ./infra --report inventory
# Scan + write SBOM to a specific file
strata build sbom --scan . --output-file sbom.json
# Generate SBOM + run CVE audit (advisory — prints findings, never fails)
strata build sbom --scan . --audit
# Audit with CI gate — fail if any HIGH or CRITICAL findings
strata build sbom -f xyz-deploy-prd.yaml --audit --fail-on HIGH
# Audit only CRITICAL vulnerabilities
strata build sbom --scan . --audit --severity CRITICAL --fail-on CRITICAL
build clean
strata build clean [-f FILE] [--dry-run] [standard options]
Remove build artifacts for the selected deployment.
strata build clean -f xyz-deploy-prd.yaml
strata build clean --dry-run
validate
validate is a command group with two subcommands. Bare invocation (strata validate -f file.yaml) delegates to run for backward compatibility.
strata validate run [OPTIONS] ← validate a YAML file
strata validate graph [OPTIONS] ← build a dependency graph
strata validate -f FILE ← shorthand; equivalent to `validate run -f FILE`
validate run
Validate a single platform YAML file against its kind-specific schema.
strata validate run -f FILE_PATH [--deep] [--explain] [standard options]
Option |
Description |
|---|---|
|
File to validate. Required (unless |
|
Validate multiple files matching a glob. Requires an initialized workspace with an active profile. |
|
Enable Phase 2 (cross-reference) validation against the active profile’s configuration sources. Requires an initialized workspace with an active profile. |
|
After validation, emit a plain-English summary of what the file describes. |
Exit codes: 0 valid · 1 system failure · 2 missing argument · 3 schema-invalid
strata validate run -f config/xyz-config.yaml
strata validate run -f config/xyz-ws-platform.yaml --deep
strata validate run --path "deployments/**"
strata validate -f config/xyz-config.yaml # backward compat
validate graph
Build a Mermaid dependency diagram of the workspace. Two modes:
--mode files(default) — nodes are YAML files, edges are cross-file references. Shows which files wire together and highlights missing or invalid files.--mode resources— nodes are logical resources/modules/namespaces, edges aredepends_onchains, module attachments, and subnet assignments. Shows the infrastructure topology organized by provisioner.
strata validate graph [--mode files|resources] [--entry PATH] [--save PATH] [--direction LR|TD|BT|RL] [--no-validate] [standard options]
Option |
Default |
Description |
|---|---|---|
|
|
Graph type: |
|
auto-detect |
Entry point file (deployment or workspace YAML). Discovers all deployments if omitted. |
|
— |
Write Mermaid markdown to file. Defaults to |
|
LR (files), TD (resources) |
Mermaid graph direction: |
|
off |
Skip validation — all nodes shown as neutral. Faster for large workspaces. |
Node status colours (file mode):
Status |
Colour |
Condition |
|---|---|---|
Valid |
green |
File exists and passes Phase 1 validation |
Invalid |
orange |
File exists but fails validation |
Missing |
red |
Referenced by another file but not present on disk |
External |
grey |
|
Orphan |
dashed |
File exists and validates but no other file references it |
Exit codes: 0 success (including missing nodes — graph always produces output) · 1 system failure
strata validate graph
strata validate graph --entry deploy/deploy-prd.yaml
strata validate graph --mode resources --entry stack/ws-platform.yaml
strata validate graph --save graph.md
strata validate graph --output json
guide
Show workspace setup progress and suggest the next action. Use strata guide to understand where you are in the setup sequence — whether you are onboarding to a new workspace for the first time or returning after making changes.
strata guide [OPTIONS]
Option |
Type |
Default |
Description |
|---|---|---|---|
|
path |
— |
Inspect a specific YAML file (file mode). Supports |
|
path |
auto-detected |
Root workspace directory. Falls back to |
|
|
|
Output format. |
|
flag |
off |
Emit structured log lines to console. |
|
flag |
off |
Suppress all output. |
Exit code: always 0 — guide is advisory and never a pipeline gate.
Works outside an initialized workspace: degrades gracefully when .strata/solution.json is absent (shows Phase 1 as ⬜ and stops).
Workspace mode
Run strata guide without --file to see the 7-phase workspace setup checklist. Each phase is marked ✅ done, ⚠️ needs attention, or ⬜ not started. The → Next step block identifies the first phase that is not ✅ and shows the exact command to address it.
# |
Phase |
✅ Done |
⚠️ Attention |
⬜ Not started |
|---|---|---|---|---|
1 |
Workspace initialized |
|
File exists but cannot be parsed |
File absent |
2 |
Repositories registered |
At least one repo in |
— |
None registered |
3 |
Repositories on disk |
All registered repos exist locally |
Some paths missing (shows count and names) |
Phase 2 is ⬜ |
4 |
Profile created |
At least one profile in |
— |
None created |
5 |
Profile activated |
One profile has |
— |
None active |
6 |
File references registered |
Active profile has at least one ref |
Zero refs on active profile |
Phase 5 is ⬜ |
7 |
Build artifact exists |
|
Directory exists but is empty |
Directory absent |
Workspace: my-platform (e:\src\my-config-repo)
Setup progress:
✅ Workspace initialized
✅ Repositories registered (3)
⚠️ Repositories on disk (2/3 cloned — xyz-svc-traefik not found)
✅ Profile created (prd, stg, dev)
✅ Profile activated (prd)
⚠️ File references (0 registered on active profile 'prd')
⬜ Build artifact
→ Next step: Register config files with your active profile:
strata ref config add <name> @<repo>/path/to/config.yaml --profile prd
See: strata help --topic environments
Next-step hints by phase:
First incomplete phase |
Suggested command |
|---|---|
1 — Workspace not initialized |
|
2 — No repos registered |
|
3 — Repos not all on disk |
|
4 — No profiles |
|
5 — No active profile |
|
6 — No refs registered |
|
7 — No build artifact |
|
All ✅ |
|
File mode (--file)
Supply --file (or -f) to inspect a specific YAML file. The workspace setup checklist is suppressed and replaced by a 5-phase structural check, followed by ready-to-use validate and register commands for the detected kind.
# |
Phase |
Check |
|---|---|---|
1 |
File readable |
Path exists and YAML parses without error |
2 |
Kind recognized |
|
3 |
apiVersion present |
|
4 |
Name present |
|
5 |
Spec present |
|
File: path/to/my-config.yaml (kind: configuration)
Workspace: my-platform (e:\src\my-config-repo)
File structure:
✅ File readable
✅ Kind: configuration
✅ apiVersion: strata.huybrechts.xyz/v1
✅ Name: my-config
✅ Spec present
→ Validate:
strata validate -f path/to/my-config.yaml
→ Register with your active profile:
strata ref config add my-config @<repo>/path/to/my-config.yaml --profile prd
See: strata help --topic environments
@repo/path references are resolved via solution.spec.repositories and require an initialized workspace.
Project customisation
Create .strata/guide.yaml to override the default next-step hints and see_also links for any phase:
hints:
phase_6:
hint: "strata ref config add infra-config @infra/config/infra.yaml --profile prd"
see_also: "strata help --topic environments"
strata guide
strata guide --output json
strata guide --file config/my-config.yaml
strata guide -f @myrepo/config/app.yaml
schema
Inspect JSON schemas for platform YAML document kinds. Useful for editors, linters, and AI agents that need to understand what fields a document type requires.
schema list
List all supported platform document kinds.
strata schema list [--output FORMAT]
--output json returns {"kinds": ["configuration", "deployment", ...]}. --output text prints one kind per line.
strata schema list
strata schema list --output json
schema get KIND
Emit the full JSON Schema for a platform document kind.
strata schema get KIND [--output FORMAT]
Default and --output json both emit the complete Pydantic-generated JSON Schema. --output text shows a compact summary (required fields and top-level property names).
Valid kinds: configuration deployment dns environment firewall module namespace network platform_model provider resource workspace
Exit codes: 0 success · 2 unknown kind
strata schema get deployment
strata schema get deployment --output json
strata schema get environment --output text
policy
Inspect policies declared in the active configuration. Policies define guardrails evaluated at the validate, build, and plan lifecycle phases. See policies.md for the policy engine reference.
policy list
List all policies declared in configuration.spec.policies.
strata policy list [-f PATH] [standard options]
Loads the active configuration from the workspace’s active profile. Displays a table of every policy with its type, phase, enforcement level, and enabled state. deny enforcement is highlighted red; warn is highlighted yellow.
Option |
Description |
|---|---|
|
Optional path to a deployment YAML. When given, annotates the output with which lifecycle phases that deployment can trigger (inferred from provisioner names). |
Output keys (--output json): source, deployment, policy_count, enabled_count, phases_triggered, policies[] (each with name, type, phase, enforcement, enabled, description, configuration).
Exit codes: 0 success · 1 workspace not initialised or configuration load failure
strata policy list
strata policy list -f config/deploy-prd.yaml
strata policy list --output json
strata policy list -f config/deploy.yaml --output json
policy check
strata policy check -f FILE [--phase PHASE]... [--plan-file PATH] [standard options]
Evaluate all enabled policies for a deployment and report results. Policies are grouped by phase (validate, build, plan, deploy).
Option |
Description |
|---|---|
|
✅ Required. Path to the deployment YAML file. |
|
Filter to one or more phases. Repeatable. Defaults to all phases. |
|
Path to a Terraform plan JSON file used for plan-phase policies. Auto-discovered if omitted. |
When context artifacts are not available (no platform build, no plan file), the command includes notes with the exact command to run to generate the missing artifact. These notes appear in console output and in the notes[] field of JSON output — they do not fail the command.
Exit codes: 0 all policies passed · 1 execution error · 3 one or more deny policies failed
Output keys (--output json): deployment, phases, policies_checked, passed, failed, denied, notes[], results[] (each with phase, policy, enforcement, result, violations[]).
strata policy check -f xyz-deploy-prd.yaml
strata policy check -f xyz-deploy-prd.yaml --phase validate --phase plan
strata policy check -f xyz-deploy-prd.yaml --plan-file build/infra.tfplan.json
strata policy check -f xyz-deploy-prd.yaml --output json
secret
Generate and manage secret values. These utilities are useful for creating passwords, tokens, and other sensitive values to be stored in vaults or used in configuration files.
secret generate
Generate a cryptographically secure secret value in various formats.
strata secret generate [--format FORMAT] [--length N] [standard options]
Option |
Default |
Description |
|---|---|---|
|
|
Output encoding. Valid formats: |
|
32 |
For most formats: number of bytes (output will be longer after encoding). For |
Format descriptions:
Format |
Use Case |
Output Example |
|---|---|---|
|
Passwords, tokens, API keys (safe for URLs and env vars) |
|
|
Binary data, checksums, hashing |
|
|
Restrictive password policies (letters + digits only) |
|
|
General-purpose passwords (mix of letter+digit+symbols) |
|
|
PINs, OTPs, numeric-only contexts |
|
|
Kubernetes secrets, Docker auth, config formats |
|
|
Distributed IDs, uncorrelated identifiers |
|
|
Time-ordered IDs, sortable identifiers, Postgres v13+ |
|
Typical use cases:
Store in a vault:
strata secret generate --format password --length 20 | vault write secret/app_password -Generate API token:
strata secret generate --format urlsafe --length 48Create database password:
strata secret generate --format password --length 32
Exit codes: 0 success · 1 invalid format or options
# Generate a 20-character password with symbols
strata secret generate --format password --length 20
# Generate a 64-byte URL-safe token (outputs base64-URL, ~86 chars)
strata secret generate --format urlsafe --length 64
# Generate a UUID v7 (time-ordered)
strata secret generate --format uuid7
# Get structured JSON output
strata secret generate --format password --length 32 --output json
secret mask
Mask a secret value for safe display in logs or output. The first N characters remain visible; the rest are replaced.
strata secret mask VALUE [--show N] [--char C] [standard options]
Option |
Default |
Description |
|---|---|---|
|
4 |
Number of leading characters to keep visible |
|
|
Replacement character for the masked portion |
Typical use cases:
Log tokens safely:
echo "Token: $(strata secret mask $TOKEN --show 4 --char '*')"Display credentials in output:
strata secret mask "dbpassword123" --show 2 --char '#'Audit trail: Show enough to identify, but not leak secrets
Exit codes: 0 success · 1 invalid arguments
# Show first 4 chars of a token, mask the rest with asterisks
strata secret mask "akiaiosfodnn7example" --show 4
# Show first 2 chars with custom mask character
strata secret mask "s3cr3t_p@ssw0rd" --show 2 --char '#'
# Get structured JSON output
strata secret mask "mysecretvalue" --show 3 --output json
Output examples:
# Token with 4 visible chars (default)
$ strata secret mask "token_abc123xyz789"
token****
# Password with 2 visible chars and custom replacement
$ strata secret mask "myP@ssw0rd" --show 2 --char '#'
my########
deploy
Note: Requires the CLI tool for the provisioner used by each stage (
terraform,helm,ansible-playbook). Usestrata tools statusto verify availability. Configure integration credentials (Bitwarden, Vault, Azure Key Vault, etc.) before running. Use--dry-runto validate and plan without applying any changes.
Deploy platform infrastructure using provisioners defined in a deployment YAML file.
All deploy subcommands accept --file/-f PATH and --stage NAME.
deploy run
strata deploy run [-f FILE] [--stage NAME] [--force] [--dry-run] [standard options]
Execute the deploy pipeline (setup → check → plan → apply).
Option |
Description |
|---|---|
|
Limit execution to one deployment stage |
|
Skip confirmation prompts and approval gates |
|
Validate and plan only — no provisioners run |
After resolving values, the command prints a summary of any values that were seeded or generated for the first time:
✓ Resolved 3 variable(s), 2 secret(s), 1 feature(s).
↳ Seeded on first run: LOG_LEVEL=info, DARK_MODE=false
↳ Generated on first run: DB_PASSWORD
These lines only appear when values were actually seeded or auto-generated (i.e., on the first deploy against a new store). Subsequent runs are silent.
strata deploy run -f xyz-deploy-prd.yaml
strata deploy run --stage production --dry-run
strata deploy run --force
deploy destroy
strata deploy destroy [-f FILE] [--stage NAME] [--force] [--dry-run] [standard options]
Tear down provisioned infrastructure. --force is required for a real destroy (runs non-interactively). --dry-run runs terraform plan -destroy only.
strata deploy destroy -f xyz-deploy-prd.yaml --dry-run
strata deploy destroy --stage production --force
deploy show
strata deploy show [-f FILE] [standard options]
Show resolved deployment configuration: effective remote versions after applying environment overrides, plus the workspace and environment files in use.
For each remote, displays the effective reference and whether it came from an environment override or the workspace default.
strata deploy show -f xyz-deploy-prd.yaml
strata deploy show -f xyz-deploy-prd.yaml --output json
Example output:
📋 Deployment: acme-prd
File: deployments/acme-prd.yaml
Workspace: workspaces/customer-acme.yaml
Environment: env-prd (environments/env-prd.yaml)
Remote Versions:
Remote Effective Ref Source
───────────────────────────────────────────────
tf_landscape v2.2.0 env-prd (override)
ans_deploy v1.1.0 workspace default
deploy list
strata deploy list [-p DIR] [standard options]
Enumerate deployment manifests with extracted metadata. Scans a directory
recursively for kind: deployment YAML files and returns one entry per
manifest. Designed for CI matrix generation — pipe --output json into
jq or consume directly as a GitHub Actions matrix input.
All spec.layers dimensions are promoted to top-level fields so any layer
key (e.g. environment, zone, tier) is directly usable as a matrix
variable without further parsing.
Option |
Description |
|---|---|
|
Directory to scan (default: current directory, recursive) |
# Console table — all deployment manifests under ./deployments/
strata deploy list -p deployments/
# JSON for CI matrix
strata deploy list -p deployments/ --output json
Example JSON output (inside the standard data envelope):
{
"deployments": [
{
"file": "/repos/xyz-config/deployments/acme-prd.yaml",
"name": "acme_deploy_prd",
"environment": "prd",
"zone": "eu",
"customer": "acme",
"workspace": "xyz_platform"
},
{
"file": "/repos/xyz-config/deployments/globex-dev.yaml",
"name": "globex_deploy_dev",
"environment": "dev",
"zone": "eu",
"customer": "globex",
"workspace": "xyz_platform"
}
],
"count": 2
}
GitHub Actions matrix usage:
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.list.outputs.matrix }}
steps:
- id: list
run: |
matrix=$(strata deploy list -p deployments/ --output json | jq -c '.data.deployments')
echo "matrix=$matrix" >> $GITHUB_OUTPUT
deploy:
needs: matrix
strategy:
matrix:
deployment: ${{ fromJson(needs.matrix.outputs.matrix) }}
steps:
- run: strata deploy run --file "${{ matrix.deployment.file }}"
deploy plan
strata deploy plan -f FILE [--stage NAME] [standard options]
Show the resource change summary from the last saved .tfplan file produced by deploy run --dry-run. Runs terraform show -json locally — no backend calls.
Option |
Description |
|---|---|
|
Limit to a single deployment stage |
strata deploy plan -f xyz-deploy-prd.yaml
strata deploy plan -f xyz-deploy-prd.yaml --stage production
strata deploy plan -f xyz-deploy-prd.yaml --output json
deploy history
strata deploy history [--lines N] [--operation run|destroy] [standard options]
Show deployment execution history from workspace logs.
strata deploy history
strata deploy history --lines 20 --operation run
deploy health
strata deploy health -f FILE [--stage NAME] [standard options]
Run health checks against provisioned infrastructure stages. Exit code 3 if any check fails.
strata deploy health -f xyz-deploy-prd.yaml
strata deploy health -f xyz-deploy-prd.yaml --stage production
deploy output
strata deploy output -f FILE [--stage NAME] [--key NAME] [--refresh] [standard options]
Show Terraform outputs from the local cache (.tf-outputs.json) or fetch live from the backend with --refresh.
Option |
Description |
|---|---|
|
Limit to a single deployment stage |
|
Print only a single output key (useful for scripting) |
|
Re-run |
strata deploy output -f xyz-deploy-prd.yaml
strata deploy output -f xyz-deploy-prd.yaml --stage production --key endpoint
strata deploy output -f xyz-deploy-prd.yaml --refresh
strata deploy output -f xyz-deploy-prd.yaml --version 2.0.0
strata deploy output -f xyz-deploy-prd.yaml --all-versions --output json
deploy lock
Manage deployment state locks. Locking is enabled in the deployment YAML via spec.locking.enabled: true. When enabled, deploy run acquires a lock before the first stage and releases it in a finally block — protecting the full pipeline (hooks, Terraform, Ansible, health checks) from concurrent runs.
The lock backend is chosen automatically from the provisioner’s backend.type — no separate connection configuration needed.
deploy lock status
strata deploy lock status -f FILE [standard options]
Show the current lock state for the deployment. Exits 0 whether locked or unlocked.
strata deploy lock status -f xyz-deploy-prd.yaml
strata deploy lock status -f xyz-deploy-prd.yaml --output json
JSON output keys: locked (bool), deployment, and when locked: lock_id, holder, hostname, pid, acquired_at, expires_at, reason.
deploy lock release
strata deploy lock release -f FILE [--force] [standard options]
Release the deployment lock. Without --force, release is denied if the lock is held by a different user or host (exit code 3). With --force, the lock is released regardless of holder — use for stuck CI runs or crashed deploys.
Option |
Description |
|---|---|
|
Release even if held by a different user or host |
strata deploy lock release -f xyz-deploy-prd.yaml
strata deploy lock release -f xyz-deploy-prd.yaml --force
Exit codes: 0 released (or was not locked); 1 backend error; 3 lock held by another holder and --force not supplied.
deploy lock history
strata deploy lock history -f FILE [--last N] [standard options]
Show recent lock events for the deployment (most recent first). History is stored locally in {work_path}/.strata/locks/ as an append-only NDJSON file.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
Number of recent events to show (max 100) |
strata deploy lock history -f xyz-deploy-prd.yaml
strata deploy lock history -f xyz-deploy-prd.yaml --last 25
strata deploy lock history -f xyz-deploy-prd.yaml --output json
JSON output keys: deployment, entries[] — each entry: lock_id, holder, hostname, pid, acquired_at, expires_at, reason, stage.
env
Inspect environment configuration and live infrastructure state.
env info
strata env info [standard options]
Show instant workspace context — solution name, active profile, strata version, and work path. No subprocess calls.
strata env info
strata env info --output json
JSON output keys: solution_id, active_profile, version, work_path.
env output
strata env output -f FILE [--name NAME] [--provisioner NAME] [--raw] [--json] [standard options]
Show live Terraform outputs per stage by running terraform output -json against the backend. Results are grouped by provisioner in a table.
Option |
Description |
|---|---|
|
Show only a single output key across all stages |
|
Limit to stages referencing a specific provisioner |
|
Print the bare value only — requires |
|
Emit the raw outputs dict as JSON — bypasses the strata envelope |
strata env output -f xyz-deploy-prd.yaml
strata env output -f xyz-deploy-prd.yaml --name endpoint
strata env output -f xyz-deploy-prd.yaml --provisioner platform_iac
IP=$(strata env output -f deploy.yaml --name hearth_ip --raw)
strata env output -f xyz-deploy-prd.yaml --json
JSON output keys: file, stages{} — each stage: provisioner, outputs{}, ok, error.
env show
strata env show -f FILE [--stage NAME] [standard options]
Show the full resolved environment for a deployment: meta, properties, variables, secrets (masked), feature flags, overrides, and stages. Uses cached resolution — no subprocess calls.
Option |
Description |
|---|---|
|
Filter secrets visibility to a specific stage’s allowlist (default: all) |
strata env show -f xyz-deploy-prd.yaml
strata env show -f xyz-deploy-prd.yaml --stage production
strata env show -f xyz-deploy-prd.yaml --output json
JSON output keys: file, deployment, meta{}, properties{}, variables[], secrets[], features[], overrides{}, stages[].
env status
strata env status [-f FILE | --path DIR | --all] [--stage NAME] [--offline] [standard options]
Show infrastructure status. Supports three modes:
Mode |
Flags |
Description |
|---|---|---|
Single (live) |
|
Per-stage detail via |
Single (offline) |
|
Per-stage detail from build cache only — no backend contact |
Multi |
|
One-line summary per deployment found — always offline (reads build cache) |
Option |
Description |
|---|---|
|
Query only a single stage. Single-deployment mode only. |
|
Use cached data only — no remote backend contact. Single-deployment mode only. |
|
Scan a directory for deployment manifests and show a summary for each. |
|
Scan the entire workspace for deployment manifests and show a summary for each. |
strata env status -f xyz-deploy-prd.yaml
strata env status -f xyz-deploy-prd.yaml --offline
strata env status -f xyz-deploy-prd.yaml --stage production
strata env status --all
strata env status --path deploy/
strata env status --all --output json
JSON output keys (single): file, deployment, mode, stages[] — each stage: name, provisioner, reachable, resources, outputs, serial, cache{}.
JSON output keys (multi): scan_path, deployments[] — each: file, name, stage_count, cached_count, stages[].
env drift
strata env drift -f FILE [--stage NAME] [standard options]
Detect configuration drift by running terraform plan -detailed-exitcode against the live backend. Reports create/update/delete/replace counts per stage. Exit code 3 if drift is detected.
Option |
Description |
|---|---|
|
Check only a single stage (default: all) |
strata env drift -f xyz-deploy-prd.yaml
strata env drift -f xyz-deploy-prd.yaml --stage production
strata env drift -f xyz-deploy-prd.yaml --output json
JSON output keys: file, deployment, stages[] — each stage: name, provisioner, drift_detected, to_add, to_change, to_destroy, to_replace, plan_output.
env doctor
strata env doctor [-f FILE] [--category CATEGORY] [--deep] [standard options]
Run a workspace health check across five categories. Exit code 3 if any check fails.
Category |
What is checked |
|---|---|
|
Python version, OS, available memory and disk |
|
|
|
External tool availability (terraform, helm, docker, ansible, git, …) |
|
Deployment file validity, stage configuration, provisioner references |
|
Backend authentication and secret store reachability |
Option |
Description |
|---|---|
|
Check only the tools referenced by this deployment file |
|
Run only one category ( |
|
Enable deeper checks (requires an active profile) |
strata env doctor
strata env doctor -f xyz-deploy-prd.yaml
strata env doctor --category tools
strata env doctor --deep --output json
JSON output keys: categories[] — each: name, status, checks[] — each check: name, ok, message.
audit
Note: Requires an initialized workspace. Audit records are written automatically by
strata deploy runto.strata/deploy-log/— no extra configuration required to start collecting evidence. Configurespec.deployment.auditin the configuration YAML to enable remote push, structured path layout, and SIEM forwarding.
Query deployment audit logs and manage compliance evidence (ISO 27001 / ISAE 3402 layer 2 audit trail).
Every strata deploy run execution writes a structured JSON audit record to the local deploy-log directory. These records capture who ran the deployment, from which commit, which stages ran, whether they succeeded, step timings, and any PR metadata linked to the commit.
All audit subcommands accept standard options (--work-path, --output, --verbose, --quiet).
audit changes
strata audit changes [--last N] [--since TIMESTAMP] [--stage NAME] [standard options]
List recent deployment executions from the local deploy-log. Results are sorted by timestamp descending (most recent first).
Option |
Default |
Description |
|---|---|---|
|
|
Maximum number of entries to show |
|
— |
Show only entries on or after an ISO 8601 timestamp (e.g. |
|
— |
Show only entries that include a stage with this exact name |
# Show the 10 most recent deployments
strata audit changes
# Show all deployments in the last 7 days
strata audit changes --since 2026-06-25T00:00:00Z
# Show deployments that ran the 'infrastructure' stage
strata audit changes --stage infrastructure
# Machine-readable output for CI / compliance tooling
strata audit changes --last 50 --output json
Console output columns: timestamp, deployment, environment, success, duration, stages (count), commit (short SHA).
JSON output keys (per entry): execution_id, timestamp, version, deployment, workspace, environment, file, success, duration_seconds, commit_sha, stages[], pull_request{}.
audit resend
strata audit resend [--last N] [--since TIMESTAMP] [standard options]
Re-forward local deploy-log entries to all configured audit sinks (webhook, ndjson, syslog, SIEM integrations). Useful after adding a new sink or recovering from a delivery failure.
Option |
Default |
Description |
|---|---|---|
|
— |
Resend only the last N entries |
|
— |
Resend only entries since an ISO 8601 timestamp |
# Resend all local records to currently configured sinks
strata audit resend
# Resend only the most recent 5 entries
strata audit resend --last 5
# Resend entries from the last 24 hours (machine-readable result)
strata audit resend --since 2026-07-01T00:00:00Z --output json
JSON output keys: sent (int), failed (int).
audit export
strata audit export [--last N] [--since TIMESTAMP] [--format json|ndjson] [--out PATH] [standard options]
Export deploy-log entries to a file or stdout. Useful for offline compliance reviews and feeding records into external tooling.
Option |
Default |
Description |
|---|---|---|
|
— |
Export only the last N entries |
|
— |
Export only entries since an ISO 8601 timestamp |
|
|
Output format: |
|
stdout |
Write to a file instead of stdout |
# Export all records as JSON array to stdout
strata audit export
# Export as NDJSON (one JSON object per line — preferred for log pipelines)
strata audit export --format ndjson --out audit-$(date +%Y%m).ndjson
# Export the last 30 days and pipe into jq
strata audit export --since 2026-06-01T00:00:00Z --format ndjson | jq 'select(.success == false)'
audit diff
strata audit diff FROM_ID TO_ID [standard options]
Show the YAML configuration changes between two deployment executions. Retrieves the commit_sha fields from both deploy-log entries and runs git diff <sha_before> <sha_after> on the deployment YAML file. Useful for auditors who need to see exactly what configuration values changed between two deployments.
Argument |
Description |
|---|---|
|
Execution ID of the earlier deployment (from |
|
Execution ID of the later deployment (from |
Exit codes: 0 no changes · 1 system error · 3 changes detected (scriptable CI gate)
# Compare two consecutive deployments
strata audit diff 12345678-aabb-ccdd-eeff-000000000001 12345678-aabb-ccdd-eeff-000000000002
# Machine-readable — check whether configuration changed
strata audit diff $FROM_ID $TO_ID --output json | jq '.has_changes'
# Use as a CI gate — exits 3 if configuration changed
strata audit diff $FROM_ID $TO_ID
Console output: colourised unified diff with a metadata header showing deployment name, file, commit SHAs, timestamps, and PR numbers (if PR enrichment is configured).
JSON output keys: from{}, to{}, file, has_changes, diff (raw unified diff string).
Audit configuration
Configure audit output in the spec.audit block of your configuration YAML (kind: configuration):
spec:
deployment:
paths:
by-execution: "{{ deployment }}/{{ timestamp }}"
by-tenant: "{{ tenant }}/{{ deployment }}/{{ timestamp }}"
audit:
path: .strata/deploy-log # base directory (relative to workspace root)
structure: by-execution # built-in or inline Jinja2 template
repository: xyz-configuration # registered solution repo to push audit records to (optional)
Path templates — structure accepts one of the built-in names or an inline Jinja2 template. Built-in options:
Name |
Pattern |
Best for |
|---|---|---|
|
|
Simple single-env setups |
|
|
Per-stage history |
|
|
Default — one folder per run |
|
|
Group runs by calendar day |
|
|
Multi-env: browse by environment first |
|
|
Multi-workspace |
|
|
Multi-tenant |
|
|
Enterprise: all layers |
Available template tokens:
Token |
Example |
Always available |
|---|---|---|
|
|
Yes |
|
|
Yes |
|
|
Yes |
|
|
Yes |
|
|
Yes |
|
|
No (if labelled) |
|
|
No (if labelled) |
|
|
Per-stage only |
SIEM sink configuration
Configure structured event forwarding to external immutable stores in the spec.audit.sinks[] block of your configuration YAML. Each sink forwards every deploy_audit event to an external receiver.
Built-in sink types (no integration credentials required):
spec:
audit:
sinks:
- name: local-ndjson
type: ndjson
enabled: true
path: .strata/audit-events.ndjson # appended on every deployment
- name: ops-webhook
type: webhook
enabled: true
url: https://hooks.example.com/audit
headers:
X-API-Key: "${WEBHOOK_SECRET}"
- name: syslog-server
type: syslog
enabled: true
address: "syslog.internal:514" # UDP
Integration-backed sinks (sentinel, elk, otel) — reference an integration declared in spec.integrations[]:
spec:
integrations:
# Azure Sentinel — DCR Logs Ingestion API
- name: sentinel-audit
type: sentinel
enabled: true
endpoints:
address: https://my-dce.eastus-1.ingest.monitor.azure.com
properties:
data_collection_rule_id: dcr-abc123abc456abc789
stream_name: Custom-DeployAudit_CL
# Authentication: DefaultAzureCredential — managed identity, service principal, or az CLI
# ELK — TCP (Logstash JSON codec input)
- name: elk-audit
type: elk
enabled: true
endpoints:
address: "logstash.internal:5000" # host:port for TCP
properties:
protocol: tcp # or "http" for Elasticsearch Bulk API
# OpenTelemetry — OTLP/HTTP to any OTel-compatible backend
- name: otel-audit
type: otel
enabled: true
endpoints:
address: https://otel-collector.internal:4318
properties:
resource_attributes:
environment: production
team: platform
audit:
sinks:
- name: sentinel
type: integration
integration: sentinel-audit
enabled: true
events: [deploy_audit]
- name: elk
type: integration
integration: elk-audit
enabled: true
- name: otel
type: integration
integration: otel-audit
enabled: true
Non-blocking design: SIEM delivery failures are always logged at WARNING level but never fail a deployment. The deploy-log JSON on disk is the primary source of truth; SIEM sinks are best-effort secondary delivery.
service
Deploy and manage individual services (namespaces or modules). Useful for selective deployments, health checks, and targeted updates to specific services without deploying the entire deployment.
service list
strata service list -f FILE [standard options]
List all services declared in a deployment definition. Shows namespace and module names.
Option |
Description |
|---|---|
|
✅ Required. Path to the deployment YAML file |
strata service list -f xyz-deploy-prd.yaml
strata service list -f xyz-deploy-prd.yaml --output json
JSON output keys: deployment, services[] (each with name, type — namespace or module, provisioner, configured_replicas).
service status
strata service status -f FILE NAME [standard options]
Show runtime status of a specific service by name (live query against the provisioner backend).
Option |
Description |
|---|---|
|
✅ Required. Path to the deployment YAML file |
|
✅ Required. Service name as shown in |
strata service status -f xyz-deploy-prd.yaml core-services
strata service status -f xyz-deploy-prd.yaml my-namespace --output json
JSON output keys: service, type, status, replicas_ready, replicas_total, events[], resources[].
service deploy
strata service deploy -f FILE NAME [--force] [--dry-run] [standard options]
Deploy or update a single service by name. Runs the provisioner only for that service’s stages.
Option |
Description |
|---|---|
|
✅ Required. Path to the deployment YAML file |
|
✅ Required. Service name to deploy |
|
Continue even if health check fails |
|
Validate and plan only — no provisioners run |
strata service deploy -f xyz-deploy-prd.yaml core-services
strata service deploy -f xyz-deploy-prd.yaml my-namespace --dry-run
strata service deploy -f xyz-deploy-prd.yaml my-namespace --force --output json
Exit codes: 0 success · 1 execution error · 3 service not found or health check failed (without --force).
service destroy
strata service destroy -f FILE NAME [--force] [standard options]
Tear down a single service by name. Runs destroy provisioners for that service only.
Option |
Description |
|---|---|
|
✅ Required. Path to the deployment file |
|
✅ Required. Service name to destroy |
|
Required. Non-interactive destroy. |
strata service destroy -f xyz-deploy-prd.yaml core-services --force
manifest
Query and export deployment manifests. Build and deploy manifests are first-class records captured at artifact generation and deployment execution time. They contain configuration snapshots, SBOM data, policy results, and deployment outcomes.
manifest list
strata manifest list [--deployment NAME] [--last N] [--work-path PATH] [standard options]
List all deployment manifests in the workspace. Manifests are stored in .strata/build/{deployment_name}/manifest.json (build manifests) and .strata/deploy/{deployment_name}_{timestamp}.json (deploy manifests).
Option |
Description |
|---|---|
|
Filter by deployment name (optional) |
|
Show only the last N manifests (default: all) |
strata manifest list
strata manifest list --deployment xyz-deploy-prd
strata manifest list --last 20 --output json
JSON output keys: manifests[] — each with path, deployment, action, status, started_at, deployed_by.
manifest show
strata manifest show [--deployment NAME] [--last 1] [standard options]
Display the full content of a deployment manifest (build or deploy). By default shows the most recent manifest; use --deployment and --last to select a specific one.
Option |
Description |
|---|---|
|
Show manifest for this deployment (required) |
|
Show the Nth most recent manifest (default: |
strata manifest show --deployment xyz-deploy-prd
strata manifest show --deployment xyz-deploy-prd --last 5
strata manifest show --deployment xyz-deploy-prd --output json
Displayed fields: kind, apiVersion, meta (name, timestamp), spec (deployment name, action, status, configuration snapshot, SBOM, policy results, stages, commit hash).
manifest export
strata manifest export [--deployment NAME] [--last N] [--format json|csv] [--out PATH] [standard options]
Export manifests to a file for compliance, audit, or external tooling. Supports JSON and CSV formats.
Option |
Description |
|---|---|
|
Export manifests for this deployment (required) |
|
Export only the last N manifests |
|
Output format: |
|
Write to this file (default: stdout) |
strata manifest export --deployment xyz-deploy-prd
strata manifest export --deployment xyz-deploy-prd --last 30 --format csv --out manifests.csv
strata manifest export --deployment xyz-deploy-prd --format json --out manifests.json
mcp
Model Context Protocol server for AI agent integration. Start an MCP server that exposes strata workspace operations as tools, allowing AI assistants (Claude, GitHub Copilot, custom agents) to validate, plan, and query infrastructure without parsing CLI output.
mcp serve
strata mcp serve [--transport stdio|sse]
Start the strata MCP server. The server exposes the following tools to connected AI clients:
Tool |
Action |
|---|---|
|
Validate a single YAML file |
|
Validate files matching a glob pattern |
|
Preview a build (platform, Terraform, SBOM) |
|
Preview a deploy (what would run, stages, changes) |
|
Query live infrastructure state and drift |
|
Query deployment history and audit logs |
|
Generate a new YAML file from a template |
|
Resolve variables, secrets, features for a deploy |
|
Evaluate deployment policies |
Option |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Transport protocol. Use |
Setup (VS Code):
Add to .vscode/settings.json or user settings:
{
"mcp-servers": {
"strata": {
"command": "uv",
"args": ["run", "strata", "mcp", "serve", "--transport", "stdio"],
"cwd": "${workspaceFolder}"
}
}
}
Then restart VS Code and Copilot Chat will gain access to strata workspace operations.
Setup (Claude Desktop):
Add to ~/.config/claude/claude.json (macOS) or %APPDATA%\Claude\claude.json (Windows):
{
"mcpServers": {
"strata": {
"command": "uv",
"args": ["run", "strata", "mcp", "serve", "--transport", "stdio"],
"cwd": "/path/to/workspace"
}
}
}
Restart Claude Desktop and the server will be available.
Requires the optional mcp dependency:
pip install xyz-strata[mcp]
strata mcp serve
strata mcp serve --transport sse
Inspect resolved deployment values (variables, secrets, feature flags).
values list
strata values list -f FILE [--stage NAME] [--type TYPE] [--show-store] [--unresolved] [standard options]
Option |
Description |
|---|---|
|
✅ Required. Path to the deployment YAML file |
|
Use the environment from this stage (default: first stage) |
|
Show only this value type |
|
Include the store reference (env var name, key path) in output |
|
Show only entries that failed to resolve |
Secrets are masked (first 3 chars + *****). Exit code 3 if any entry is unresolved.
strata values list -f xyz-deploy-prd.yaml
strata values list -f xyz-deploy-prd.yaml --type secrets --show-store
strata values list -f xyz-deploy-prd.yaml --unresolved
values get
strata values get -f FILE KEY... [standard options]
Retrieve the full resolved value for one or more keys. Secrets are revealed in plain text.
strata values get -f xyz-deploy-prd.yaml DB_PASSWORD
strata values get -f xyz-deploy-prd.yaml DB_PASSWORD API_KEY
values set
strata values set -f FILE -k KEY {--value VALUE | --from-file PATH | --stdin} [standard options]
Write a value to its configured store backend. Behaviour depends on the store type:
Store type |
Action |
|---|---|
|
Prints the file path and key location (cannot write to YAML) |
|
Prints the env var name and export instruction |
|
Calls |
Integration-backed ( |
Calls the integration’s |
Multiline values (SSH keys, certificates) use --from-file or --stdin:
strata values set -f xyz-deploy-prd.yaml -k DB_HOST --value "new-host.example.com"
strata values set -f xyz-deploy-prd.yaml -k TLS_CERT --from-file cert.pem
cat key.pem | strata values set -f xyz-deploy-prd.yaml -k SSH_KEY --stdin
values resolve
strata values resolve -f FILE [-k KEY] [--probe] [standard options]
Diagnose the resolution chain for each value key without revealing actual values.
Reports store type, integration registration, availability, and optionally
(with --probe) whether the reference exists in the backend.
Flag |
Effect |
|---|---|
|
Diagnose a single key only |
|
Also attempt resolution against backends (pass/fail only, no value shown) |
strata values resolve -f xyz-deploy-prd.yaml
strata values resolve -f xyz-deploy-prd.yaml -k DB_PASSWORD
strata values resolve -f xyz-deploy-prd.yaml --probe
version
Show the current CLI version.
strata version
strata version --output json
help
Show help topics for common workflows.
strata help
strata help quickstart
strata help profiles
Available topics: quickstart, workspace, profiles, refs, config-merge, cross-repo, environments, troubleshooting.