Drush commands.
Manage pages, templates and elements from the command line
DXPR Builder provides Drush commands for managing pages,
templates, elements and content migrations from the command line.
Every command except dxb:migrate prints YAML.
Page commands
dxb:page:create
Creates a node from a DXPR Builder page template.
drush dxb:page:create drag_and_drop_page my_template \
--title="New Landing Page"
Arguments:
| Argument | Description |
|---|---|
type |
Content type machine name |
template_id |
Page template machine name |
Options:
| Option | Description |
|---|---|
--title |
Node title (required) |
--field |
Builder field name (auto-detected) |
--status |
Published status: 0 or 1 (default: 0) |
--dry-run |
Validate without creating |
Alias: dxpr-pc
dxb:page:get
Gets the DXPR Builder markup from an entity.
drush dxb:page:get 42
drush dxb:page:get 5 --entity-type=block_content
Arguments:
| Argument | Description |
|---|---|
entity_id |
Entity ID |
Options:
| Option | Description |
|---|---|
--entity-type |
Entity type (default: node) |
--field |
Builder field name (auto-detected) |
Alias: dxpr-pg
dxb:page:update
Updates DXPR Builder markup on an entity.
drush dxb:page:update 42 --markup="<div>new</div>"
drush dxb:page:update 42 --markup=@/tmp/page.html
Arguments:
| Argument | Description |
|---|---|
entity_id |
Entity ID |
Options:
| Option | Description |
|---|---|
--entity-type |
Entity type (default: node) |
--field |
Builder field name (auto-detected) |
--markup |
New HTML (string or @file path) |
--dry-run |
Show what would change |
Alias: dxpr-pu
Template commands
dxb:template:list
Lists available DXPR Builder page templates.
drush dxb:template:list
drush dxb:template:list --category=Landing
drush dxb:template:list --detail
Options:
| Option | Description |
|---|---|
--category |
Filter by template category |
--profile |
Filter by profile ID |
--detail |
Include template markup body |
Alias: dxpr-tl
User template commands
dxb:user-template:list
Lists all DXPR Builder user templates.
drush dxb:user-template:list
drush dxb:user-template:list --global
drush dxb:user-template:list --uid=1
drush dxb:user-template:list --status=disabled
Options:
| Option | Description |
|---|---|
--uid |
Filter by owner user ID |
--global |
Show only global templates |
--status |
Filter by status: enabled or disabled |
--profile |
Filter by profile ID |
--detail |
Include template markup body |
Each template's output includes its status.
Alias: dxpr-utl
dxb:user-template:create
Creates a reusable DXPR Builder user template.
drush dxb:user-template:create "Hero Section" \
--markup="<div class='container'>...</div>"
drush dxb:user-template:create "Hero" \
--markup=@/tmp/hero.html --global
Arguments:
| Argument | Description |
|---|---|
label |
Template display name |
Options:
| Option | Description |
|---|---|
--markup |
HTML (string or @file path) |
--global |
Make available to all users |
--dry-run |
Validate without creating |
Alias: dxpr-utc
Element commands
dxb:element:list
Lists available DXPR Builder elements (blocks, views).
drush dxb:element:list
drush dxb:element:list --type=block
drush dxb:element:list --profile=editor
Options:
| Option | Description |
|---|---|
--type |
Filter by type: block, view |
--profile |
Filter by profile ID |
Alias: dxpr-el
Setup commands
dxb:setup-ai
Installs the AI skill for coding assistants in the Composer project
root: .claude/skills/dxb for Claude Code and .agents/skills/dxb
for Codex, Gemini, Copilot and Cursor. Each copy holds SKILL.md,
references/ (one file per element, the Views and block elements,
the parser rules, A/B testing and the workflow) and scripts/ with
the markup validator. --check changes nothing and lists every file
that is not installed or is outdated.
drush dxb:setup-ai
drush dxb:setup-ai --check
drush dxb:setup-ai --host=claude
Options:
| Option | Description |
|---|---|
--host |
Target: claude, agents or all (default: all) |
--check |
Check if installed files are up to date, without changes |
Alias: dxpr-sa
Migration commands
dxb:migrate
Runs every content migration that has pending items, or only the one you name. It logs a line per migration and exits with a non-zero code when an item fails. The same migrations are listed at DXPR Studio > DXPR Builder > Content Items > Migrations.
drush dxb:migrate
drush dxb:migrate --migration=circle_counter_circliful_to_bootstrap
drush dxb:migrate --migration=counter_duplicate_ids
Options:
| Option | Description |
|---|---|
--migration |
Run only this migration ID, even when nothing is counted as pending |
--force |
Take over the lock of a run still marked as in progress, after an abandoned run |
Migration IDs: owl_carousel_to_bootstrap,
circle_counter_circliful_to_bootstrap,
progress_bar_legacy_to_bootstrap_extension,
counter_duplicate_ids, entity_link_enrichment and alias_link_enrichment.
The counter_duplicate_ids migration removes inner display IDs that repeat the
owning Number counter or Circle counter ID, including saved A/B variants and
displays inside additional HTML wrappers. It preserves wrapper anchors, distinct
custom inner IDs and nested element boundaries. DXPR Builder also repairs these
duplicates when rendering existing content.
Run Drupal's database updates (drush updb or update.php) after deployment.
The dedicated counter_duplicate_ids post-update migrates stored fields and
reusable templates even on sites that already ran the earlier content updates.
Use the command above for content imported afterward. Rebuild Drupal's caches
after deploying the updated services.
Alias: dxpr-migrate