Loading...
Loading...
DDEV local development environment guidance for Docker-based PHP/Node projects. Use when: (1) running CLI tools (composer, npm, wp, drush, artisan, console, etc.) in a DDEV project, (2) executing commands inside DDEV containers, (3) working in a subdirectory of a DDEV project (e.g., wp-content/plugins/my-plugin), (4) managing databases, snapshots, or project lifecycle with DDEV, (5) any task involving ddev exec, ddev ssh, or ddev start/stop.
npx skill4agent add juvojustin/opencode-ddev ddevddev execddev composer install # runs composer inside the container
ddev npm run build # runs npm inside the container
ddev wp plugin list # runs wp-cli (WordPress only)
ddev drush cr # runs drush (Drupal only)
ddev artisan migrate # runs artisan (Laravel only)
ddev console cache:clear # runs bin/console (Symfony only)
ddev yarn add <pkg> # runs yarn inside the container
ddev php -v # runs PHP inside the containerddev helpddev wp plugin list
ddev mailpit
ddev db
ddev composer show
ddev npm ls
ddev drush cr
ddev start
ddev describe
ddev ssh--dir--dirddev execcomposer installcomposer.jsonnpm installpackage.jsonscripts/resolve-ddev-root.sh "$(pwd)"{
"project_root": "/Users/you/Projects/mysite",
"container_path": "/var/www/html/wp-content/plugins/my-plugin",
"relative_path": "wp-content/plugins/my-plugin",
"project_name": "mysite"
}relative_path--dirrelative_path--dircontainer_pathddev start# Install dependencies scoped to a plugin subdirectory
ddev exec --dir="/var/www/html/wp-content/plugins/my-plugin" bash -c "composer install"
ddev exec --dir="/var/www/html/wp-content/plugins/my-plugin" bash -c "npm install"
# Run a script that reads files relative to the working directory
ddev exec --dir="/var/www/html/wp-content/plugins/my-plugin" bash -c "phpunit"--dir/var/www/htmlcomposer.jsonpackage.jsonddev exec# Runs in web container at docroot
ddev exec ls -la
# Scope to a subdirectory for file-path-sensitive operations
ddev exec --dir="/var/www/html/wp-content/plugins/my-plugin" bash -c "composer install"
# Run in the database container
ddev exec -s db mysql -e "SHOW DATABASES"
# Shorthand alias
ddev . ls -laddev exec --dirddev exec --dirddev wpddev mailpitddev dbddev start# From any subdirectory within a DDEV project
scripts/resolve-ddev-root.sh /path/to/wp-content/plugins/my-plugin.ddev/config.yaml.ddev/config.yaml/var/www/html/ddev describe-jddev describe -jtypeprimary_urlurlsphp_versionnodejs_versiondatabase_typewebserver_typeservices