Skip to main content

Overview

The dex init command creates a new entry through an interactive wizard (when running in a TTY) or a non-interactive seeded flow (when using --from flag).

Usage

dex init [slug] [flags]

Arguments

  • slug (optional): The entry slug. If not provided, it will be generated from the title.

Flags

--quick
boolean
default:"true"
Skip additional prompts for faster entry creation
--dry-run
boolean
Preview changes without writing files
--flat
boolean
Create entry in current directory instead of entries subdirectory
--open
boolean
Open the generated HTML file in default browser after creation
--template
string
Path to custom HTML template fileDefault: Uses canonical template or ./entry-template/index.html
--out
string
default:"./entries"
Output directory for entry
--from
string
Path to JSON seed file for non-interactive initEnables non-TTY mode with pre-populated data
Catalog linking modeOptions: create-linked, attach-existing, off
--catalog-file
string
Path to catalog file
--catalog-status
string
Initial catalog entry statusOptions: draft, active, archived
--catalog-entry-id
string
Catalog entry ID to link
--catalog-entry-href
string
Catalog entry href to link
--catalog-lookup
string
Lookup number for catalog entry (e.g., “LOOKUP-0001”)
--catalog-season
string
Season identifier (e.g., “S1”, “S2”)
--catalog-performer
string
Performer name for catalog entry
--catalog-instrument
string
Instrument for catalog entry

Behavior

Interactive Mode (TTY)

When running in a terminal with TTY support:
  1. Prompts for entry title and slug
  2. Collects performer name and instruments
  3. Prompts for lookup number
  4. Accepts video URL or raw embed HTML
  5. Collects description text
  6. Selects series and available buckets
  7. Configures attribution and credits
  8. Generates empty manifest skeleton

Non-Interactive Mode

When --from flag is provided or running in non-TTY environment:
  • Reads all data from JSON seed file
  • Requires video.dataUrl in seed file
  • Automatically generates slug from title if not provided
  • Creates entry without user interaction

Examples

Basic Interactive Init

dex init

Non-Interactive Init with Seed File

dex init --from ./tmp/seed.json --catalog-link create-linked --catalog-status draft

Custom Template and Output

dex init tim-feeney --template ./entry-template/index.html --out ./entries

Dry Run

dex init --from ./seed.json --dry-run

Output

The command creates an entry folder with the following files:
  • index.html - Generated HTML page
  • entry.json - Entry metadata and configuration
  • description.txt - Plain text description
  • manifest.json - Download manifest for audio/video files

Output Example

✓ Wrote ./entries/tim-feeney/index.html
✓ Wrote ./entries/tim-feeney/entry.json
✓ Wrote ./entries/tim-feeney/description.txt
✓ Wrote ./entries/tim-feeney/manifest.json
Slug: tim-feeney
Template: /path/to/entry-template/index.html
Recent entry: entries/tim-feeney/index.html
To preview in localhost mode: dex view

dex update

Edit an existing entry

dex doctor

Scan entries for issues

dex entry audit

Audit entry integrity

dex view

Preview entries locally

Notes

  • The init wizard requires a TTY. Use --from for CI/CD pipelines.
  • Slugs are automatically deduplicated if they already exist.
  • The template must contain required injection markers (validated automatically).
  • Generated HTML is sanitized and verified for security.

Build docs developers (and LLMs) love