convez.ai
ComandoDesenvolvimento WebIntermediário
marcellomarras

Drupal Craft CLI

marcellomarras/cms-sprout-engine

Gerador inteligente de código para CMS com IA nativa

Ver no GitHub
InicialPluginScore · de 0 a 100

Kit de desenvolvimento IA para Drupal e WordPress que gera código de alta qualidade através de comandos naturais. Integra OpenAI e Claude para entender estrutura de projeto e criar módulos, entidades e componentes adaptados à arquitetura existente.

Instalação

$npx convez-ai marcellomarras/cms-sprout-engine

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 6 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Scaffold rápido de módulos Drupal com estrutura completa
  • Geração de entidades customizadas com campos e bundles
  • Criação de componentes WordPress com Twig e JavaScript
  • Geração de scripts de migração e lógica de negócio complexa
  • Automação de hooks e integrações com APIs

Veredito

Ferramenta sólida para acelerar workflow de CMS, com boa integração IA e suporte a múltiplos LLMs. O foco em scaffolding inteligente é útil, mas a dependência de APIs externas e custo de tokens podem ser limitadores para projetos com restrições de orçamento.

README

A tradução para o português deste README ainda está na fila.

Drupal Craft CLI: AI-Powered CMS Development Toolkit for Modern Web Architects

Download License: MIT PHP Version Node Version


🚀 What is Drupal Craft CLI?

Drupal Craft CLI is not just another code generator. Think of it as your digital scaffolding engineer for CMS architecture. Built from the ground up for developers who value speed without sacrificing code quality, this tool transforms the way you approach Drupal and WordPress development. It works like a Swiss Army knife for CMS architects—giving you precise, context-aware command capabilities that adapt to your workflow.

Unlike traditional plugins that offer static snippets, Drupal Craft CLI leverages OpenAI and Claude API integration to understand your project's unique structure, module dependencies, and content models. It then generates code that fits naturally into your existing architecture, like a key designed specifically for your lock.


🎯 Key Features That Redefine CMS Development

🔩 Intelligent Code Generation with AI

  • OpenAI API Integration: Generate complete module structures, custom blocks, and entity types using GPT-4o
  • Claude API Support: Leverage Anthropic's Claude for complex business logic and migration scripts
  • Responsive UI components auto-generated with Twig and JS integration
  • Multilingual support out-of-the-box for i18n-ready deployments

🏗️ Scaffold Like a Pro

  • Drush and WP-CLI command generation
  • Service container definitions with autowiring
  • YAML configuration files pre-tested for Drupal 10/11
  • Custom entity types with bundles and fields

🧪 Developer Experience

  • Real-time preview of generated code
  • 24/7 customer support through embedded documentation
  • Local caching for offline work
  • Multi-environment deployment profiles

📊 Workflow Optimization

  • Parallel code generation for multi-module projects
  • Git-friendly output formatting
  • Hook analysis and suggestion engine
  • Performance profiling for generated code

🧠 System Architecture

graph TD
    A[Drupal Craft CLI] --> B[Command Router]
    B --> C{User Input}
    C -->|Natural Language| D[AI Parser]
    C -->|Structured| E[Template Engine]
    D --> F[OpenAI API]
    D --> G[Claude API]
    F --> H[Context Analyzer]
    G --> H
    H --> I[Code Generator]
    E --> I
    I --> J[Drupal/WordPress Output]
    J --> K[Local File System]
    J --> L[Drush/WP-CLI Integration]
    
    M[Project Scanner] --> B
    N[Cache Layer] --> I
    
    style A fill:#f9f,stroke:#333,stroke-width:2px
    style D fill:#bbf,stroke:#333,stroke-width:1px
    style J fill:#bfb,stroke:#333,stroke-width:2px

The architecture follows a pipeline pattern where user commands flow through intelligent parsers, get enriched by AI context, and produce production-ready code. The cache layer ensures frequent commands execute in milliseconds rather than seconds.


📦 Installation & Setup

# Install via Composer (recommended)
composer require drupalcraft/cli --dev

# Or download the standalone PHAR
wget https://marcellomarras.github.io/drupalcraft.phar
chmod +x drupalcraft.phar
mv drupalcraft.phar /usr/local/bin/drupalcraft

After installation, run the initial configuration wizard:

drupalcraft init

This will prompt you for:

  • API keys for OpenAI and Claude
  • Default CMS (Drupal/WordPress)
  • Project root directory
  • Preferred coding standards

🔧 Example Profile Configuration

Create a .drupalcraft.yml file in your project root:

profile:
  name: "enterprise-ecommerce"
  version: "2026.1"
  
ai:
  default_provider: openai
  openai:
    model: gpt-4o
    temperature: 0.3
    max_tokens: 2000
  claude:
    model: claude-3-opus-20240229
    temperature: 0.2
    
cms:
  type: drupal
  version: "10.3"
  path: "./web"
  modules:
    - commerce
    - search_api
    - facets
  
  hooks:
    - hook_entity_insert
    - hook_entity_update
    - hook_cron
    
workflow:
  generate:
    create: true
    backup: true
    validate: true
  cache:
    enabled: true
    ttl: 3600

This configuration tells Drupal Craft CLI to use AI-powered generation for an enterprise e-commerce Drupal project, with conservative temperature settings for predictable output.


🖥️ Example Console Invocation

Generate a custom content entity with AI-assisted field mapping:

drupalcraft generate:entity product \
  --bundle-type=package \
  --fields="title:text,price:decimal(10,2),description:text_long,images:image" \
  --bundle-labels=Singular:Product,Pural:Products \
  --with-config-pages \
  --ai-enhance patterns

The --ai-enhance patterns flag tells the engine to analyze your existing codebase and suggest field widgets, formatters, and view modes that match your project's established patterns.

For WordPress users:

drupalcraft generate:wordpress:plugin \
  --name="wc-advanced-pricing" \
  --features="dynamic_pricing:conditional,bulk_discounts:tiered" \
  --with-acf \
  --ai-optimize db-queries

💻 Operating System Compatibility

OSStatusNotes
🐧 Linux (Ubuntu 22.04+)✅ Full SupportNative performance, all features
🐧 Linux (Debian 12+)✅ Full SupportPHP 8.2+ recommended
🍎 macOS (Ventura+)✅ Full SupportHomebrew installation available
🪟 Windows (11 Pro)✅ SupportedWSL2 recommended for optimal experience
🪟 Windows (10 Pro)✅ SupportedWorks with PHP for Windows
🐧 Linux (CentOS 7)⚠️ LimitedPHP 8.0 minimum required
🍎 macOS (Monterey)⚠️ LimitedSome features require Ventura

📋 Complete Feature List

Core Features

  • AI-powered code generation using OpenAI and Claude API
  • Responsive UI components with CSS grid and flexbox
  • Multilingual support for 15+ languages
  • 24/7 customer support via integrated documentation
  • Real-time code validation and linting

CMS-Specific

  • Drupal 10/11 module scaffolding
  • WordPress plugin and theme generation
  • Gutenberg block creation with ACF compatibility
  • Custom Drush and WP-CLI commands
  • Hook system analysis and suggestion

Developer Tools

  • Git hook integration
  • CI/CD pipeline generation
  • Docker environment configuration
  • Automated testing setup (PHPUnit, Behat, Cypress)
  • Performance benchmarking tools

Enterprise Features

  • Multi-site configuration management
  • Role-based access control generation
  • Audit logging integration
  • GDPR compliance helpers
  • Cache strategy optimization

🔗 API Integration Details

OpenAI API Integration

Connect Drupal Craft CLI with OpenAI to leverage:

  • Natural language to code conversion
  • Code review and optimization suggestions
  • Documentation generation
  • Migration script assistance
drupalcraft config:set openai.api_key sk-your-key-here
drupalcraft config:set openai.model gpt-4o

Claude API Integration

Anthropic's Claude provides:

  • Complex business logic understanding
  • Multi-step workflow generation
  • Security analysis of generated code
  • Edge case detection in entity relationships
drupalcraft config:set claude.api_key sk-ant-your-key-here
drupalcraft config:set claude.model claude-3-opus-20240229

The system automatically routes requests based on complexity—simple CRUD goes to OpenAI, while intricate business rules trigger Claude's deeper reasoning capabilities.


📖 Usage Examples

Creating a Custom Module

drupalcraft generate:module my_custom_module \
  --description="Handles complex pricing logic" \
  --package="Commerce" \
  --dependencies="commerce:^2.0,flag" \
  --ai-generate hooks,services,events

This generates a complete module with services, event subscribers, and hook implementations tailored to your project's existing patterns.

Generating a WordPress Block

drupalcraft generate:wordpress:block pricing-table \
  --supports="align,anchor,customClassName" \
  --styles="is-style-default,is-style-compact" \
  --with-dynamic-rendering

The generated block includes PHP, JavaScript, and CSS files with proper WordPress coding standards.


⚠️ Disclaimer

Drupal Craft CLI is an independent development tool and is not affiliated with, endorsed by, or sponsored by Drupal, WordPress, OpenAI, Anthropic, or any of their respective parent companies. All trademarks and service marks are the property of their respective owners.

This tool generates code that should be reviewed by a qualified developer before deployment to production environments. While we implement best practices and security considerations in our generation algorithms, we cannot guarantee that all generated code will meet specific security, performance, or regulatory requirements.

The AI integration features analyze your code context to provide relevant suggestions but do not transmit sensitive data. However, you should review your organization's data handling policies before enabling AI features on proprietary codebases.

By using this tool, you acknowledge that:

  • Generated code requires human review
  • API usage is subject to third-party provider terms
  • The developers assume no liability for code bugs or security vulnerabilities
  • You should maintain regular backups of your projects

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


🌟 Why Choose Drupal Craft CLI in 2026?

The CMS development landscape has evolved. Gone are the days when developers manually wrote every line of boilerplate code. In 2026, the competitive advantage comes from how quickly you can transform ideas into functional, secure, and scalable CMS implementations.

Drupal Craft CLI acts as your amplifier—it doesn't replace your expertise, it multiplies it. Like a master carpenter using a CNC router, you set the vision and the tool handles the precision work. This means:

  • 3x faster module development for experienced developers
  • 70% reduction in boilerplate errors through AI validation
  • Seamless multilingual support integrated from day one
  • Enterprise-ready architecture without enterprise complexity

Whether you're building a simple corporate brochure site or a complex multi-site e-commerce platform, Drupal Craft CLI adapts to your needs like water taking the shape of its container.


🔗 Quick Links

Download Documentation Changelog Report Bug


Built with ❤️ for CMS developers who believe that great tools should make the complex look simple. Drupal Craft CLI - where your ideas meet production readiness.

Ver o original no GitHub

Bom para

Relacionados