DDEV Site Devkit standardises everyday project tasks across multiple repositories while keeping each project in control of its own logic.
This add-on adds a set of first-class DDEV commands that orchestrate common site workflows such as scaffolding, authentication, build, synchronisation, installation, and testing, as well as switching between development and production modes. Some workflows provide both frontend and backend variants.
The heavy lifting lives in project-owned scripts under .ddev/site-devkit/site/scripts
, so teams can customise behaviour per project without forking the add-on.
What you get
site-
commands: each command calls a matching script from your project-owned scripts.devkit
commands: tools you can use directly or from within your project-owned scripts..ddev/site-devkit/site/scripts
.ddev add-on get colinstillwell/ddev-site-devkit
ddev restart
After installing or updating, commit the changes this add-on makes under .ddev
. In most cases these are in .ddev/site-devkit
and .ddev/commands
.
There are two types of commands provided by this add-on:
ddev site-*
: project workflows backed by your own scripts.ddev devkit-*
: helper tools you can use directly or inside those scripts.ddev devkit-*
commandsCommand | Description |
---|---|
devkit-config-diff |
Compare config and report keys present in reference but missing in target |
devkit-config-get |
Get a config value by name from a given format and location |
devkit-db-import |
Interactively import an SQL dump into the project database |
devkit-drupal-search-api-index |
Index Drupal Search API indexes |
devkit-file-copy |
Copy a file from source to destination within the project, skipping if it already exists |
devkit-log |
Print a formatted log message |
devkit-minio-create-bucket |
Create a MinIO bucket if it does not exist, and set its policy |
devkit-prompt |
Prompt the user for input |
devkit-script-run |
Run a script on the host or in a specified service |
devkit-typesense-delete-collections |
Delete Typesense collections |
ddev site-*
commandsCommand | Description | Examples |
---|---|---|
site-auth |
Authentication tasks | Authenticate SSH keys |
site-build |
Build tasks | Wraps tasks for the backend and frontend |
site-build-backend |
Backend build tasks | Composer install |
site-build-frontend |
Frontend build tasks | NPM install |
site-install |
Installation tasks | Wraps tasks for the backend and frontend |
site-install-backend |
Backend installation tasks | New project installs the application; existing project builds and syncs |
site-install-frontend |
Frontend installation tasks | New project installs the application; existing project builds and syncs |
site-mode-development |
Enable development mode | Disable caches, enable verbose logging |
site-mode-production |
Enable production mode | Enable caches, aggregate CSS and JS |
site-scaffold |
Scaffolding tasks | Copy required files, set permissions |
site-sync |
Synchronisation tasks | Wraps tasks for the backend and frontend |
site-sync-backend |
Backend synchronisation tasks | Database import, public files |
site-sync-frontend |
Frontend synchronisation tasks | Images, compiled CSS and JS |
site-test |
Testing tasks | Wraps tasks for the backend and frontend |
site-test-backend |
Backend testing tasks | Unit, kernel, integration |
site-test-frontend |
Frontend testing tasks | Unit, end to end |
When you install this add-on, example scripts are copied into your project at .ddev/site-devkit/site/scripts
.
Each ddev site-*
command maps 1:1 to a script in that directory. These scripts are yours to edit and should be committed to your repository.
If your project doesn’t need frontend or backend scripts, just leave them unused. They’ll reappear on update if deleted.
#ddev-generated
line (this prevents the script being replaced on update).## Script provided by https://github.com/colinstillwell/ddev-site-devkit.
line.#!/usr/bin/env bash
# Exit on error; treat unset variables as errors; fail pipelines if any command fails
set -euo pipefail
ddev devkit-*
commands provided by this add-on where useful.When you update the add-on, any script that still has #ddev-generated
will be overwritten. Once you remove that line, the script is considered project-owned and will not be touched.
To reset a script back to the example, delete it from your project and reinstall the add-on. A fresh copy will be generated.
main
using issue/<number>-<short-slug>
in lowercase with hyphens.[<number>]
.tests
as needed.README.md
as needed.# Branch
ddev add-on get https://github.com/colinstillwell/ddev-site-devkit/tarball/<branch>
# Pull request
ddev add-on get https://github.com/colinstillwell/ddev-site-devkit/tarball/refs/pull/<pr-number>/head
main
as the target.MAJOR.MINOR.PATCH
):
MAJOR
: incompatible changes.MINOR
: backwards compatible feature additions.PATCH
: backwards compatible fixes.Contributed and maintained by @colinstillwell