Manifest CLI Referenceο
Complete reference for the strata manifest command group, used to query, display, and export deployment manifests.
Commandsο
strata manifest listο
List all available manifests from build and deployment outputs.
strata manifest list [OPTIONS]
Optionsο
Flag |
Type |
Description |
|---|---|---|
|
string |
Filter manifests by deployment name (optional) |
|
integer |
Show only the last N manifests (optional) |
|
string |
Output format: |
|
string |
Workspace root (default: auto-detect) |
|
flag |
Verbose output |
|
flag |
Suppress output |
Outputο
Console format:
Deployment Manifests
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Path Deployment Action Status User
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
.strata/build/prod/manifest.json prod build success ops@acme.com
.strata/deployments/prod/v2.3.0/2024-06-17.json prod deploy success ops@acme.com
.strata/deployments/prod/v2.2.9/2024-06-16.json prod deploy success ops@acme.com
JSON format:
[
{
"path": ".strata/build/prod/manifest.json",
"deployment": "prod",
"action": "build",
"status": "success",
"timestamp": "2024-06-17T10:35:20Z",
"user": "ops@acme.com"
},
{
"path": ".strata/deployments/prod/v2.3.0/2024-06-17T10:45:33Z.json",
"deployment": "prod",
"action": "deploy",
"status": "success",
"timestamp": "2024-06-17T10:45:33Z",
"user": "ops@acme.com"
}
]
Examplesο
# List all manifests
strata manifest list
# List only production manifests
strata manifest list --deployment prod
# List last 5 manifests, JSON output
strata manifest list --last 5 --output json
# Query with jq
strata manifest list --output json | jq '.[] | select(.action == "build")'
strata manifest showο
Display details of a single manifest.
strata manifest show <manifest-path> [OPTIONS]
Argumentsο
Arg |
Description |
|---|---|
|
Path to manifest file (relative or absolute) |
Optionsο
Flag |
Type |
Description |
|---|---|---|
|
string |
Output format: |
|
string |
Workspace root (default: auto-detect) |
|
flag |
Verbose output |
Outputο
Console format:
Deployment Manifest
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Deployment: prod
Action: build
Status: success
Timestamp: 2024-06-17T10:35:20Z
User: ops@acme.com
Version: 2.3.0
Duration: 87 seconds
Build Artifacts
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Platform Hash: sha256:abc123def456...
SBOM Format: cyclonedx-1.6
SBOM Path: .strata/build/prod/sbom.json
Repositories
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
xyz-infrastructure
URL: git@github.com:acme/xyz-infra.git
Ref: v2.3.0
Commit: a1b2c3d4e5f6g7h8...
xyz-config
URL: git@github.com:acme/xyz-config.git
Ref: main
Commit: f7g8h9i0j1k2l3m4...
Policy Results
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Status: passed
Policies: 12/12 passed
Violations: 0
JSON format:
Full manifest JSON structure (see Manifest Structure).
Examplesο
# Show manifest in console format
strata manifest show .strata/build/prod/manifest.json
# Show manifest as JSON
strata manifest show .strata/build/prod/manifest.json --output json
# Extract specific fields with jq
strata manifest show manifest.json --output json | jq '.spec.artifacts.repositories'
# Check policy results
strata manifest show manifest.json --output json | jq '.spec.policy_results'
# View all repository commits
strata manifest show manifest.json --output json | \
jq '.spec.artifacts.repositories | to_entries[] | {repo: .key, commit: .value.commit}'
strata manifest exportο
Export manifests to a directory for compliance evidence packaging.
strata manifest export [OPTIONS]
Optionsο
Flag |
Type |
Description |
|---|---|---|
|
string |
Output directory (required) |
|
flag |
Include SBOM files alongside manifests |
|
flag |
Include platform.json artifacts alongside manifests |
|
string |
Workspace root (default: auto-detect) |
|
string |
Output format for summary: |
|
flag |
Verbose output |
Output Structureο
Basic export:
compliance_package/
βββ manifests/
β βββ prod-build-2024-06-17.json
β βββ prod-deploy-2024-06-17.json
β βββ prod-deploy-2024-06-16.json
βββ summary.json
With --include-sbom:
compliance_package/
βββ manifests/
β βββ prod-build-2024-06-17.json
β βββ prod-deploy-2024-06-17.json
βββ sboms/
β βββ prod-build-2024-06-17-sbom.json
β βββ prod-deploy-2024-06-17-sbom.json
βββ summary.json
With --include-sbom --include-platform:
compliance_package/
βββ manifests/
β βββ prod-build-2024-06-17.json
β βββ prod-deploy-2024-06-17.json
βββ sboms/
β βββ prod-build-2024-06-17-sbom.json
β βββ prod-deploy-2024-06-17-sbom.json
βββ artifacts/
β βββ platform-prod-build-2024-06-17.json
β βββ platform-prod-deploy-2024-06-17.json
βββ summary.json
Summary Fileο
{
"export_timestamp": "2024-06-17T14:30:00Z",
"exported_by": "ops@acme.com",
"manifest_count": 10,
"sbom_count": 5,
"artifacts_count": 3,
"manifests": [
{
"path": "manifests/prod-build-2024-06-17.json",
"deployment": "prod",
"action": "build",
"status": "success"
}
]
}
Examplesο
# Basic export (manifests only)
strata manifest export --output-dir ./compliance
# Export with SBOMs for supply chain review
strata manifest export --output-dir ./compliance --include-sbom
# Full export for compliance audit
strata manifest export --output-dir ./compliance \
--include-sbom \
--include-platform
# Compress for archival
strata manifest export --output-dir ./temp_compliance && \
zip -r compliance-$(date +%Y-%m-%d).zip ./temp_compliance && \
rm -rf ./temp_compliance
Integration with strata auditο
The strata audit export command now supports manifests:
# Export deploy logs plus manifests
strata audit export --output-dir ./evidence --include-manifests
# Result:
# evidence/
# deploy_logs/ β existing deploy logs
# manifests/ β NEW: all manifests associated with deployments
# summary.json
Common Workflowsο
Audit Manifest Before Deployingο
# 1. Build
strata build run -f deploy/prod.yaml
# 2. Inspect build manifest
strata manifest show .strata/build/prod/manifest.json
# 3. Check policy results
strata manifest show .strata/build/prod/manifest.json --output json | \
jq '.spec.policy_results | select(.status != "passed")'
# 4. If satisfied, deploy
strata deploy run -f deploy/prod.yaml
# 5. Compare build vs. deploy
strata manifest show .strata/build/prod/manifest.json --output json > build.json
strata manifest list --deployment prod --last 1 --output json | \
jq '.[0].path' | xargs strata manifest show --output json > deploy.json
diff <(jq '.spec.artifacts.repositories' build.json) \
<(jq '.spec.artifacts.repositories' deploy.json)
Create Compliance Evidence Packageο
# Gather all manifests, SBOMs, and configs
strata manifest export \
--output-dir ./compliance-evidence-2024-q2 \
--include-sbom \
--include-platform
# Submit to auditors
zip -r compliance-evidence-2024-q2.zip compliance-evidence-2024-q2/
email -to auditor@firm.com -file compliance-evidence-2024-q2.zip
Query Manifest Historyο
# Find all successful builds in the last 7 days
strata manifest list --output json | \
jq '[.[] | select(.action == "build" and .status == "success") | .timestamp]' | \
jq --arg cutoff "$(date -d '7 days ago' --iso-8601)" '.[] | select(. > $cutoff)'
# List users who deployed in production
strata manifest list --deployment prod --output json | \
jq '[.[] | select(.action == "deploy")] | group_by(.user) | .[] | {user: .[0].user, count: length}'
# Find last build for rollback
strata manifest list --deployment prod --output json | \
jq '[.[] | select(.action == "build")] | sort_by(.timestamp) | .[-1]'
Troubleshootingο
No Manifests Foundο
Cause: strata build run or strata deploy run havenβt been executed.
Fix:
# Build first
strata build run -f deploy.yaml
# List should now show manifests
strata manifest list
Manifest File Not Readableο
Cause: Permissions issue or corrupted file.
Fix:
# Check file exists and is readable
ls -lh .strata/build/prod/manifest.json
# Try reading as JSON
jq . .strata/build/prod/manifest.json
Export Directory Not Createdο
Cause: Output directory doesnβt exist or no write permissions.
Fix:
# Create directory first
mkdir -p ./compliance_package
# Export with explicit path
strata manifest export --output-dir ./compliance_package
Exit Codesο
Code |
Meaning |
|---|---|
|
Success |
|
System error (file not found, permission denied) |
|
Invalid arguments (missing required flag, bad format) |
|
Validation error (malformed manifest) |
See Alsoο
Deployment Manifests Guide β User guide for manifests
Audit & Compliance β Compliance framework overview
ADR 0021: Manifests as First-Class Build Artifacts β Design rationale