recipes_helper
Recipes Helper is a Drush command suite that streamlines the export and import of Drupal entity bundles (content types, paragraph types, media types, vocabularies, and custom block types) using Drupal's native recipes system.
Key Features:
- Universal Bundle Export - Works with any bundleable entity type out of the box
- Smart Field Storage - Only exports field storage configurations actually used by each bundle, not all entity type storage
- Advanced Dependency Detection - Three-strategy approach automatically finds and exports:
- Referenced media types and vocabularies with all their configurations
- Required modules based on field types
- Edge case configs (
field_validation,conditional_fields, etc.) using bundle-level detection - Module dependencies inferred from config prefixes
- Safe Import by Default - Skips existing configurations to prevent accidental overwrites
- Force Overwrite Option - Optional
--forceflag for intentional overwrites - Automatic Module Installation - Installs required modules before importing configs
- Batch Operations - Export or import all bundles of an entity type in one command
Why Recipes Helper?
Exporting Drupal entity bundles with all dependencies typically requires manual identification of related configurations, tracking field storage dependencies, finding edge case configs, and multiple import steps. Recipes Helper automates this with intelligent bundle-level scanning that catches complex edge cases while avoiding false positives from Views, Search API indexes, and other configs that may reference field names.
Commands:
drush recipes-helper:list:types(rhlt) - List supported entity typesdrush recipes-helper:list [entity_type](rhlb) - List all bundles for an entity typedrush recipes-helper:export [entity_type] [bundle](rhex) - Export a single bundledrush recipes-helper:export:all [entity_type](rhexa) - Export all bundles of a typedrush recipes-helper:import [recipe_path] [--force](rhim) - Import a recipedrush recipes-helper:import:all [directory] [--force](rhima) - Batch import all recipes
Use Cases:
- Site-to-site migrations
- Multi-site deployments
- Development workflows (dev → staging → production)
- Distribution building
- Component libraries
- Configuration management with version control
Requirements:
- Drupal 10.x or 11.x
- Drush 12+ (Drush 13 recommended)
For detailed documentation, examples, and troubleshooting, see the README file. For more information about Drupal recipes, see the official Drupal recipes documentation.
Credits
Co-authored with Claude Code - AI pair programming assistant by Anthropic.