Usage
Subcommands
preflight
Run comprehensive validation checks before publishing.--env <test|prod>- Environment for validation (default:test)
Entry runtime audit
Validates all non-legacy entries for data integrity, missing fields, and broken references.
Protected asset coverage
Ensures every active catalog lookup has corresponding protected asset mappings.
- Exits with status
0if all checks pass - Exits with non-zero status and descriptive error if any check fails
publish
Publish protected assets and catalog to the target environment.--env <test|prod>- Target environment (default:test)--dry-run- Preview changes without applying them--no-preflight- Skip preflight checks (emergency use only)
--api-base <url>- Override base API URL for both assets and catalog--token <token>- Override admin token for both assets and catalog--assets-api-base <url>- Override assets API URL only--assets-token <token>- Override assets admin token only--catalog-api-base <url>- Override catalog API URL only--catalog-token <token>- Override catalog admin token only
Environment variables
Release commands use these environment variables for authentication: Test environment:DEX_ASSETS_ADMIN_TOKEN_TESTDEX_CATALOG_ADMIN_TOKEN_TEST
DEX_ASSETS_ADMIN_TOKEN_PRODDEX_CATALOG_ADMIN_TOKEN_PROD
DEX_ASSETS_ADMIN_TOKENDEX_CATALOG_ADMIN_TOKEN
Export these tokens in your shell profile or
.envrc file. Never commit secrets to the repository.Preflight failures
Preflight fails if:- Entry audit failures - Any entry has invalid data, broken recording index refs, or missing required fields
- Missing asset coverage - Active catalog lookups lack protected asset mappings
- Active exemptions in prod - Production environment has asset coverage exemptions (prod must have 100% coverage)
- Catalog validation errors - Catalog manifest has structural issues or linkage failures
- HTML security violations - Generated HTML contains unsafe patterns detected by
scripts/verify-generated-html.mjs
Recommended workflows
Test → Production release
Dry-run production publish
Preview production changes without applying:Examples
Run preflight for production
Publish to test environment
Publish to production with dry-run
Emergency publish (skip preflight)
Override API endpoints
Override admin tokens
High-risk flags policy
From the README:High-risk flags policy
dex deploy --no-preflightis emergency-only.dex release publish --no-preflightis emergency-only.dex catalog manifest remove --force-removebypasses linkage safety; use only with explicit approval.
Preflight output
Successful preflight prints:Publish output
Successful publish prints:Snapshot sync
After successful publish (non-dry-run), the release command writes:data/catalog.snapshot.test.json(for test publishes)data/catalog.snapshot.prod.json(for prod publishes)
Troubleshooting
Missing admin token
Preflight fails on missing asset coverage
Active exemptions in prod
data/protected.assets.json and add proper asset mappings before publishing to production.
Related commands
dex deploy
Deploy site after release publish
dex assets
Manage protected assets standalone
dex catalog
Manage catalog entries and metadata
dex entry audit
Audit entry runtime integrity