This module gives AI agents full creative AND destructive power over your Drupal site.

AI-Powered Drupal Site Management via Drush

Drush Webmaster provides a comprehensive suite of Drush commands (wm:*) designed for AI-assisted Drupal site management. Query, create, edit, and inspect entities, content types, views, menus, vocabularies, blocks, media, translations, and moderation workflows; all through structured YAML output optimised for AI agents and human operators alike.

You need Drush Webmaster if

Features

Command Reference

Category Commands Description
Discovery wm:schema:dump, wm:schema:sections, wm:site:info Full site schema dump with section filtering, site metadata
Entity Query wm:entity:query, wm:entity:list, wm:search Field-condition queries with operators, sorting, pagination, full-text search
Entity CRUD wm:entity:get, wm:entity:new, wm:entity:edit, wm:entity:apply Get, create, and edit entities via YAML export/apply workflow
Entity Fields wm:entity:field:get, wm:entity:field:set, wm:entity:fields Get/set individual field values, list fields on a bundle
Entity Operations wm:entity:clone, wm:entity:deep-clone, wm:entity:diff, wm:entity:history, wm:entity:revert Clone, compare, version history, and revert entities
Bulk wm:entity:bulk-create, wm:entity:bulk-update, wm:entity:bulk-delete Batch entity operations via YAML input
Content Types wm:content-type:list, wm:content-type:get, wm:content-type:create, wm:content-type:update, wm:content-type:delete, wm:content-type:stats Full content type lifecycle management
Fields wm:field:list, wm:field:get, wm:field:add, wm:field:update, wm:field:delete, wm:field:types Field management on entity bundles
Views wm:view:list, wm:view:get, wm:view:create, wm:view:clone, wm:view:edit, wm:view:apply, wm:view:preview, wm:view:delete, wm:view:enable, wm:view:disable Full views lifecycle with YAML edit/apply workflow
View Discovery wm:view:tables, wm:view:available:fields, wm:view:available:filters, wm:view:available:sorts, wm:view:available:arguments, wm:view:available:relationships, wm:view:available:areas Discover available base tables, fields, filters, sorts, and relationships for building views
Menus wm:menu:list, wm:menu:get, wm:menu:create, wm:menu:delete, wm:menu:link:list, wm:menu:link:add, wm:menu:link:update, wm:menu:link:delete Menu and menu link management with hierarchy
Vocabularies wm:vocabulary:list, wm:vocabulary:get, wm:vocabulary:create, wm:vocabulary:update, wm:vocabulary:delete Taxonomy vocabulary management
Blocks wm:block:list, wm:block:get, wm:block:place, wm:block:update, wm:block:remove, wm:block:types Block placement and management by region
Media wm:media-type:list, wm:media-type:get, wm:media:create, wm:media:list, wm:media:attach Media type inspection, entity creation (from file, URL, or base64), listing, and attachment to content
Translation wm:translation:languages, wm:entity:translations, wm:entity:translation:get, wm:entity:translation:set, wm:entity:translation:delete Multilingual content management
Moderation wm:entity:transitions, wm:entity:moderate Content moderation workflow transitions

Post-Installation

  1. Install with Composer: composer require drupal/drush_webmaster
  2. Enable the module: drush en drush_webmaster
  3. Set up AI integration: drush wm:setup-ai. This copies the Claude Code skill files to your project root so AI assistants can automatically discover and use wm:* commands. This step is required for Claude Code, Cursor, and other SKILL.md-compatible AI tools to work with Drush Webmaster.
  4. Verify installation: drush wm:schema:dump --section=site
  5. Run drush wm:[command] --help on any command for full documentation

Sub-modules

Key Workflow Pattern

Default to Discover → Inspect → Modify. Always run the appropriate discovery command before any write operation.

  1. Discover: wm:schema:dump, wm:content-type:get, wm:entity:query, wm:search
  2. Inspect: wm:entity:get, wm:view:get, wm:field:list, wm:entity:transitions
  3. Edit: wm:entity:edit → modify YAML → wm:entity:apply --dry-run → wm:entity:apply
  4. Create: wm:entity:new → fill template → wm:entity:apply node new

Pre-flight Discovery Checks

Operation Run first
Create entity wm:content-type:get [bundle]: see required fields and types
Edit entity fields wm:entity:get [type] [id]: see current field values
Delete entity wm:entity:get [type] [id]: confirm correct entity before deletion
Add field to bundle wm:field:list then wm:field:types: see existing fields and available types
Create/edit view wm:view:tables then wm:view:available:fields: see available fields, filters, sorts
Translate entity wm:translation:languages: see configured languages
Moderate entity wm:entity:transitions: see valid state transitions
Bulk operations wm:content-type:get [bundle] or wm:entity:query: verify scope before batch operations

AI Coding Assistant Integration

Drush Webmaster is designed from the ground up for AI-assisted site management. It implements the Agent Skills open standard, making it compatible with all major AI coding assistants:

And other tools that support the Agent Skills standard (Kiro, Junie, Factory Droid, etc.).

What is a SKILL.md?

A SKILL.md is a standard file format that teaches AI coding assistants how to use a tool. It describes available commands, when to use them, and how they work. AI tools discover skill files automatically and invoke them when your request matches. The standard is maintained at agentskills.io.

Setup

After installing the module, run drush wm:setup-ai to enable AI coding assistant support. This copies skill files to your project root so all supported AI tools can discover them automatically.

Your AI assistant will then respond to natural language like:

Your First 5 Minutes

  1. Run drush wm:setup-ai to install the skill
  2. Open your AI tool in the project directory
  3. Ask: "What content types does this site have?"
  4. Ask: "Show me the fields on the article content type"
  5. Ask: "Find the 5 most recent articles"
  6. Ask: "Create a new page called About Us with some placeholder content"

The AI will automatically use wm:* commands for all of these.

Skill Features

Troubleshooting

How Drush Webmaster Compares

Drupal has a growing ecosystem of AI integration projects. Here's how Drush Webmaster fits in:

Drush Webmaster MCP Tools AI Agents Agentic Skills
What it does CLI commands for AI-assisted site management MCP server exposing 223 Drupal tools LLM-powered agents inside Drupal SKILL.md files for Drupal development practices
Integration Agent Skills (SKILL.md) MCP protocol Drupal AI module + LLM API Agent Skills (SKILL.md)
Works with Claude Code, Codex, Gemini, Copilot, Cursor, Kiro, Junie Claude Desktop, Cursor, Windsurf Drupal chatbot UI, Drush Claude Code, Codex, Gemini, Copilot, Cursor
LLM API keys needed on server? No No Yes (per-call cost) No
Server process required? No: skill files only Yes: MCP server No: runs inside Drupal No: skill files only
Scope Content types, fields, entities, views, menus, blocks, media, vocabularies, webforms, redirects, translations, moderation Content types, fields, views, blocks, Layout Builder, config, roles, permissions, image styles Content types, fields, taxonomies Coding standards, testing, security, documentation
PHP requirement 8.1+ 8.3+ 8.1+ N/A
Dry-run support Yes: all write operations No No N/A
Command restrictions None: full access, use --dry-run to preview None Drupal permissions N/A
Production use Yes: for experienced users Local dev only Yes Yes
Setup drush wm:setup-ai MCP client configuration AI module + provider config npx skills add

Complementary projects

These projects serve different purposes and work well alongside Drush Webmaster:

FAQ

Is Drush Webmaster safe to use in production?

Yes, for experienced Drupal administrators. Every write operation supports --dry-run to preview changes before applying. The module also maintains a YAML version history for every entity edit, so you can revert to any prior state. That said, AI agents have full creative and destructive power over your site; use caution and review dry-run output before confirming write operations.

Does Drush Webmaster require an AI subscription or API keys?

No. Drush Webmaster is a set of Drush commands; it does not call any AI API. The AI integration works through SKILL.md files that teach your AI coding assistant (Claude Code, Codex, Cursor, etc.) how to use the wm:* commands. The AI runs on your coding tool's side, not on the Drupal server.

Which AI coding assistants does Drush Webmaster support?

Any tool that supports the Agent Skills standard: Claude Code, Codex CLI, Gemini CLI, GitHub Copilot, Cursor, Kiro, Junie, and Factory Droid, among others. Run drush wm:setup-ai to install the skill files for automatic discovery.

How does the YAML edit/apply workflow work?

Export any entity to a versioned YAML file with wm:entity:edit, modify the file, then apply with wm:entity:apply. Use --dry-run to preview what will change before saving. For new entities, wm:entity:new generates a template pre-filled with all available fields. The same workflow applies to Views.

Can Drush Webmaster manage translations?

Yes. The translation commands let you list configured languages, view existing translations, add or update translations with JSON field values, and delete translations. Requires Drupal's Language and Content Translation modules to be enabled.

How does Drush Webmaster differ from MCP Tools?

Drush Webmaster uses the Agent Skills standard (SKILL.md files) and runs through Drush; no server process is needed. MCP Tools uses the MCP protocol and requires a running MCP server. Drush Webmaster supports dry-run on all write operations and works in production; MCP Tools is designed for local development. They serve different workflows and can be used alongside each other.

Requirements

Prefer a turnkey demo site?

Spin up DXPR CMS: Drupal pre-configured with DXPR Builder, DXPR Theme, AI modules, and Drush Webmaster included.

Get DXPR CMS »