Overview
Thedex init command creates new entry folders with all required metadata, manifests, and generated HTML. You can use either the interactive wizard (TTY mode) or a non-interactive seeded flow.
Prerequisites
Before creating entries:- Workspace configured: Run
dex setupif this is your first time - Dependencies installed: Run
npm iin the repo - Template available: Dex will auto-detect the template from:
./index.html(current directory)entries/test-5/index.html(canonical template)entry-template/index.html(fallback)
Interactive Mode (Wizard)
Complete the wizard steps
The wizard will prompt you for:
- Title: Entry display name
- Slug: URL-safe identifier (auto-generated from title)
- Artist name: Performer name(s)
- Instruments: One or more instruments (use
--quickto skip multiple) - Lookup number: Catalog lookup identifier (e.g.,
LOOKUP-0042) - Video source: URL or raw embed HTML
- Description: Plain text description
- Series:
dex,inDex,dexFest, ornone - Buckets: Available download buckets (A, B, C, D, E, X)
- Attribution sentence: Credits attribution text
Review and confirm
Dex will:
- Validate all inputs against schema
- Generate
index.htmlfrom the template - Create the entry folder with:
entry.json(canonical metadata)manifest.json(download manifest skeleton)description.txt(plain text description)index.html(generated HTML)
Quick Mode
Skip optional prompts with--quick:
Open After Creation
Automatically open the generated HTML:Non-Interactive Mode
For automation, CI/CD, or bulk creation, use a seed JSON file:Advanced Options
Custom Template
Use a specific template file:Custom Output Directory
Write to a different directory:Flat Directory Structure
Create entry folder in current directory (noentries/ parent):
Dry Run
Preview what would be created without writing files:Catalog Integration
Link entries to the catalog during creation:Create and Link
Create a catalog entry simultaneously:Attach to Existing
Link to an existing catalog entry:Catalog Options
--catalog-link <mode>:create-linked,attach-existing, oroff(default)--catalog-file <path>: Path tocatalog.editorial.json--catalog-status <status>:draft,active, orarchived--catalog-entry-id <id>: Existing entry ID to attach--catalog-entry-href <href>: Entry href (e.g.,/entry/tim-feeney/)--catalog-lookup <number>: Catalog lookup number--catalog-season <season>: Season identifier (e.g.,S2)--catalog-performer <name>: Performer name--catalog-instrument <instrument>: Primary instrument
Common Errors
Template not found
Template not found
Error:Solution:
Ensure the template path is correct and the file exists:Or omit
--template to use auto-detection.Template validation failed
Template validation failed
Error:Solution:
Your template is missing required
<script> tags with IDs:dex-sidebar-configdex-sidebar-page-configdex-manifest
Schema validation failed
Schema validation failed
Error:Solution:
Your seed data doesn’t match the expected schema. Common issues:
- Missing required fields (
lookupNumber,attributionSentence) - Invalid bucket names (must be A, B, C, D, E, or X)
- Malformed credits structure
Generated HTML failed sanitizer
Generated HTML failed sanitizer
Error:Solution:
The generated HTML contains forbidden patterns or missing security markers. This usually happens with custom templates. Check:
- Auth trio scripts are present
- No legacy Auth0 blocks remain
- No forbidden runtime script hosts (squarespace, sqspcdn, etc.)
Best Practices
Use Seed Files
For production workflows, always use
--from with validated seed files instead of manual inputValidate Immediately
Run
dex entry audit --slug <slug> right after creation to catch issues earlyVersion Control Seeds
Store seed JSON files in version control for reproducibility and audit trails
Test with Dry Run
Use
--dry-run to preview changes before committing to file writes