chi-teck/drupal-code-generator
Drupal Code Generator is a CLI tool that scaffolds Drupal modules, plugins, entities, forms, services, tests, and more. It speeds development with interactive commands and customizable templates for modern Drupal projects.
drush generate, so the org inherits years of maintained templates (modules, plugins, services, forms, entities, theme hooks, tests) instead of owning a bespoke boilerplate generator.generate command) rather than a wiki page nobody reads.Consider adoption when all of the following hold:
Look elsewhere when:
artisan make:*, or a stubs package.To executives: This is a free, actively maintained (last release June 2025) open-source tool that automates the repetitive first 60–70% of writing a Drupal module, plugin, or service. It costs nothing to license for internal use, is already bundled with the Drush tooling our engineers use daily, and its maintenance burden sits with an external community rather than our headcount. The measurable return is reduced onboarding time and fewer review cycles spent on convention violations. The one item needing sign-off is legal confirmation that GPL-2.0 fits our distribution model — it does for internal tooling and for the code it generates.
To engineering: It is the successor to the abandoned Drupal Console and the generator behind drush generate. It is Composer-installable, PHP 8+, ships a broad template set out of the box, and — importantly for us — exposes an API for authoring our own generators, so "how we build a module here" becomes executable rather than documented. Star count (268) understates real adoption, because most users reach it through Drush rather than directly.
Recommendation: Adopt for the Drupal portfolio as a DX and standardization lever; do not carry it into Laravel workstreams. Validate GPL-2.0 with legal before any scenario involving redistribution of a customized generator.
How can I help you explore Laravel packages today?