This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is annertech-ddev, a DDEV add-on providing Annertech's opinionated development workflow for Drupal projects. It's installed into client projects via ddev add-on get annertech/annertech-ddev and provides commands, configurations, and automation for Drupal development.
commands/
├── host/ # Host-side commands (run on developer machine)
└── web/ # Web container commands (run inside DDEV container)
scripts/
├── ddev/homeadditions/ # Bash aliases for container
├── ddev/web-build/ # Dockerfile customizations
├── git-hooks/ # pre-commit, commit-msg hooks
├── templates/gitlab/ # MR templates
└── varnish/ # Varnish VCL configs
nginx/ # Custom nginx configs
tests/ # BATS test suite
install.yaml- Add-on installation/removal logic, hooks, file mappingsconfig.annertech.yaml- DDEV hooks (post-start, post-import-db, post-pull)settings.local.devmode.php- Development mode Drupal settingssettings.local.perfmode.php- Performance/production mode settings
- post-start: installs git hooks, runs
ddev auth ssh, checks addon version, enables devmode - post-import-db: cache rebuild, sql sanitize, devmode on, enable stage_file_proxy, drush uli
- post-pull: removes temporary DB dumps from
.ddev/.downloads/
bats tests/test.bats- Run add-on installation tests (requires a running DDEV environment)
ucc/upsun-command-center-bash- Interactive menu: SSH, ULI, resume, activities, disk, logs, backup, Fastly (aliases:uptools,uptool,ucc)branch- Creates git branches from Teamwork IDs (format:YYYYMM_T-ID__description)drupal-updater- Automated Drupal core/contrib updatesdevmode- Toggle between dev/prod Drupal settingsmr- Create GitLab merge requestssanity-check- Project sanity checksteamwork-operations- Teamwork task managementremote-db- Pull remote databaselogin- Login to Upsun and authenticateprotect/cloudflare/travel-mode- Infrastructure helpers
upsun/platform- Run Upsun/Platform.sh CLI inside containerphpunit/behat/rector/robo- Testing and code quality toolssolr-update-config- Update Solr search configurationcheck-annertech-ddev- Verify addon version is current
#!/usr/bin/env bash
#ddev-generated
#annertech-ddev
## Description: Short description
## Usage: command-name
## Example: "ddev command-name"
## Aliases: alias1, alias2RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; NC='\033[0m'
echo_red() { echo -e "${RED}$1${NC}" >&2; }Commands use fzf for interactive selection with --reverse --height=50% flags.
project_files- Commands installed to project's.ddev/directory (no global_files — all commands are project-scoped)pre_install_actions- Cleanup old/renamed config files before installingpost_install_actions- Remove deprecated commands, copy git hooks, copy.vscode/, create GitLab MR templates,git addinstalled filesremoval_actions- Remove all files tagged#annertech-ddev, clean up.env.anner, remove tip-of-the-day config
- Commands use
ddev exec upsunorddev exec platformto run CLI tools inside container - Argument order matters:
upsun drush uli --project=ID -e ENV(subcommand before flags) - Project ID is stored in
.ddev/config.yamlasPLATFORM_PROJECTenvironment variable - Upstream provider config is stored in
.ddev/.env.anner(key:DDEV_UPSTREAM_PROVIDER)
- Reply using 300 words max
- Use
upsunCLI (notplatform) for new code - Test changes with
bats tests/test.bats - Commands must have
#ddev-generatedmarker for auto-cleanup and update - Commands must have
#annertech-ddevmarker for removal cleanup