Skip to main content
Manage protected asset mappings and sync them to production environments.

Usage

dex assets <validate|diff|publish|bucket> [args]

Subcommands

validate

Verify protected asset coverage for all active catalog entries.
dex assets validate [--file data/protected.assets.json] [--env test|prod]
Flags:
  • --file <path> - Path to protected assets manifest (default: data/protected.assets.json)
  • --env <test|prod> - Environment for validation context
What it checks:
  • All active catalog lookups have corresponding asset mappings
  • Asset file references are valid
  • No missing or broken asset coverage

diff

Compare local protected assets manifest against remote environment.
dex assets diff --env <test|prod> [--file data/protected.assets.json] [--api-base <url>] [--token <token>]
Required flags:
  • --env <test|prod> - Target environment
Optional flags:
  • --file <path> - Local assets file (default: data/protected.assets.json)
  • --api-base <url> - Override API base URL
  • --token <token> - Admin auth token (falls back to DEX_ASSETS_ADMIN_TOKEN_TEST or DEX_ASSETS_ADMIN_TOKEN_PROD)
Output:
  • Shows which assets would be added, updated, or removed
  • Displays manifest hash comparison

publish

Publish protected assets manifest to remote environment.
dex assets publish --env <test|prod> [--dry-run] [--file data/protected.assets.json] [--api-base <url>] [--token <token>]
Required flags:
  • --env <test|prod> - Target environment
Optional flags:
  • --dry-run - Preview changes without applying them
  • --file <path> - Local assets file (default: data/protected.assets.json)
  • --api-base <url> - Override API base URL
  • --token <token> - Admin auth token
Always run dex assets validate and dex assets diff before publishing to production.
Environment variables:
  • DEX_ASSETS_ADMIN_TOKEN_TEST - Test environment admin token
  • DEX_ASSETS_ADMIN_TOKEN_PROD - Production environment admin token

bucket

Ensure storage bucket exists in target environment.
dex assets bucket ensure --env <test|prod> [--name dex-protected-assets] [--dry-run] [--api-base <url>] [--token <token>]
Required flags:
  • --env <test|prod> - Target environment
Optional flags:
  • --name <bucket-name> - Bucket name (default: dex-protected-assets)
  • --dry-run - Preview operation without creating bucket
  • --api-base <url> - Override API base URL
  • --token <token> - Admin auth token

Examples

Validate local assets before publish

dex assets validate --env prod

Check what would change in production

dex assets diff --env prod

Publish to test environment

dex assets publish --env test

Dry-run production publish

dex assets publish --env prod --dry-run

Workflow integration

Protected assets are automatically validated during preflight checks:
dex release preflight --env prod
See the release command for coordinated asset + catalog publishing.

dex release

Orchestrate full release with preflight checks

dex catalog

Manage catalog entries and metadata

Build docs developers (and LLMs) love